@little-samo/samo-ai-sdk 0.2.1 → 0.3.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.
- package/dist/dto/entities/agents/agent.d.ts +1 -0
- package/dist/dto/entities/agents/agent.requests.d.ts +10 -10
- package/dist/dto/entities/gimmicks/gimmick.config.d.ts +2 -1
- package/dist/dto/entities/gimmicks/gimmick.config.js +1 -0
- package/dist/dto/entities/gimmicks/gimmick.config.js.map +1 -1
- package/dist/dto/entities/users/user.d.ts +3 -0
- package/dist/dto/locations/location.d.ts +5 -1
- package/dist/dto/locations/location.events.d.ts +19 -1
- package/dist/dto/locations/location.events.js +3 -0
- package/dist/dto/locations/location.events.js.map +1 -1
- package/dist/dto/locations/location.message.d.ts +1 -0
- package/dist/dto/locations/location.preset.d.ts +29 -6
- package/dist/dto/locations/location.preset.js +10 -2
- package/dist/dto/locations/location.preset.js.map +1 -1
- package/dist/dto/locations/location.requests.d.ts +284 -62
- package/dist/dto/locations/location.requests.js +49 -4
- package/dist/dto/locations/location.requests.js.map +1 -1
- package/dist/dto/locations/location.snapshot.d.ts +2 -0
- package/dist/dto/rankings/ranking.d.ts +1 -0
- package/dist/models/entities/agents/agent.config.d.ts +4 -4
- package/dist/models/entities/agents/agent.config.js +7 -1
- package/dist/models/entities/agents/agent.config.js.map +1 -1
- package/dist/models/locations/location.config.d.ts +48 -25
- package/dist/models/locations/location.config.js +15 -2
- package/dist/models/locations/location.config.js.map +1 -1
- package/package.json +3 -3
|
@@ -50,7 +50,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
|
|
|
50
50
|
}, {
|
|
51
51
|
name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
|
|
52
52
|
}>>;
|
|
53
|
-
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">]>>;
|
|
53
|
+
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<"xai-low">, z.ZodLiteral<"xai-medium">]>>;
|
|
54
54
|
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
55
55
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
56
56
|
greeting: z.ZodOptional<z.ZodString>;
|
|
@@ -152,7 +152,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
|
|
|
152
152
|
rules?: string[] | undefined;
|
|
153
153
|
appearance?: string | undefined;
|
|
154
154
|
avatar?: string | undefined;
|
|
155
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
155
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
156
156
|
languages?: string[] | undefined;
|
|
157
157
|
timeZone?: string | undefined;
|
|
158
158
|
greeting?: string | undefined;
|
|
@@ -185,7 +185,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
|
|
|
185
185
|
rules?: string[] | undefined;
|
|
186
186
|
appearance?: string | undefined;
|
|
187
187
|
avatar?: string | undefined;
|
|
188
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
188
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
189
189
|
languages?: string[] | undefined;
|
|
190
190
|
timeZone?: string | undefined;
|
|
191
191
|
greeting?: string | undefined;
|
|
@@ -220,7 +220,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
|
|
|
220
220
|
rules?: string[] | undefined;
|
|
221
221
|
appearance?: string | undefined;
|
|
222
222
|
avatar?: string | undefined;
|
|
223
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
223
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
224
224
|
languages?: string[] | undefined;
|
|
225
225
|
timeZone?: string | undefined;
|
|
226
226
|
greeting?: string | undefined;
|
|
@@ -256,7 +256,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
|
|
|
256
256
|
rules?: string[] | undefined;
|
|
257
257
|
appearance?: string | undefined;
|
|
258
258
|
avatar?: string | undefined;
|
|
259
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
259
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
260
260
|
languages?: string[] | undefined;
|
|
261
261
|
timeZone?: string | undefined;
|
|
262
262
|
greeting?: string | undefined;
|
|
@@ -378,7 +378,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
|
378
378
|
}, {
|
|
379
379
|
name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
|
|
380
380
|
}>>;
|
|
381
|
-
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">]>>;
|
|
381
|
+
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<"xai-low">, z.ZodLiteral<"xai-medium">]>>;
|
|
382
382
|
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
383
383
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
384
384
|
greeting: z.ZodOptional<z.ZodString>;
|
|
@@ -480,7 +480,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
|
480
480
|
rules?: string[] | undefined;
|
|
481
481
|
appearance?: string | undefined;
|
|
482
482
|
avatar?: string | undefined;
|
|
483
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
483
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
484
484
|
languages?: string[] | undefined;
|
|
485
485
|
timeZone?: string | undefined;
|
|
486
486
|
greeting?: string | undefined;
|
|
@@ -513,7 +513,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
|
513
513
|
rules?: string[] | undefined;
|
|
514
514
|
appearance?: string | undefined;
|
|
515
515
|
avatar?: string | undefined;
|
|
516
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
516
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
517
517
|
languages?: string[] | undefined;
|
|
518
518
|
timeZone?: string | undefined;
|
|
519
519
|
greeting?: string | undefined;
|
|
@@ -548,7 +548,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
|
548
548
|
rules?: string[] | undefined;
|
|
549
549
|
appearance?: string | undefined;
|
|
550
550
|
avatar?: string | undefined;
|
|
551
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
551
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
552
552
|
languages?: string[] | undefined;
|
|
553
553
|
timeZone?: string | undefined;
|
|
554
554
|
greeting?: string | undefined;
|
|
@@ -583,7 +583,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
|
583
583
|
rules?: string[] | undefined;
|
|
584
584
|
appearance?: string | undefined;
|
|
585
585
|
avatar?: string | undefined;
|
|
586
|
-
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
|
|
586
|
+
llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
|
|
587
587
|
languages?: string[] | undefined;
|
|
588
588
|
timeZone?: string | undefined;
|
|
589
589
|
greeting?: string | undefined;
|
|
@@ -2,7 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const GimmickCoreDescriptions: {
|
|
3
3
|
readonly web_search: "Searches the web for up-to-date or missing information using an LLM, providing both a summary and detailed results. Execution takes approximately 30 seconds";
|
|
4
4
|
readonly image_generator: "Generates an image using an LLM based on text prompts and optional reference images. Execution takes approximately 30 seconds";
|
|
5
|
+
readonly character_image_generator: "Generates consistent character images by using the gimmick's appearance configuration as a common prompt, which helps maintain character identity and physical traits. The style, defaulting to \"anime style\", can be customized in the appearance settings with comma-separated values. Supported values include \"realistic\" for a photorealistic style. Can optionally select one description from the images array to combine with the common prompt for enhanced image generation.";
|
|
5
6
|
readonly notion: "Interacts with Notion platform for content management and collaboration";
|
|
6
7
|
};
|
|
7
8
|
export type GimmickCore = keyof typeof GimmickCoreDescriptions;
|
|
8
|
-
export declare const GimmickCoreSchema: z.ZodUnion<[z.ZodLiteral<"
|
|
9
|
+
export declare const GimmickCoreSchema: z.ZodUnion<[z.ZodLiteral<"web_search" | "image_generator" | "character_image_generator" | "notion">, z.ZodLiteral<"web_search" | "image_generator" | "character_image_generator" | "notion">, ...z.ZodLiteral<"web_search" | "image_generator" | "character_image_generator" | "notion">[]]>;
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.GimmickCoreDescriptions = {
|
|
6
6
|
web_search: 'Searches the web for up-to-date or missing information using an LLM, providing both a summary and detailed results. Execution takes approximately 30 seconds',
|
|
7
7
|
image_generator: 'Generates an image using an LLM based on text prompts and optional reference images. Execution takes approximately 30 seconds',
|
|
8
|
+
character_image_generator: 'Generates consistent character images by using the gimmick\'s appearance configuration as a common prompt, which helps maintain character identity and physical traits. The style, defaulting to "anime style", can be customized in the appearance settings with comma-separated values. Supported values include "realistic" for a photorealistic style. Can optionally select one description from the images array to combine with the common prompt for enhanced image generation.',
|
|
8
9
|
notion: 'Interacts with Notion platform for content management and collaboration',
|
|
9
10
|
};
|
|
10
11
|
exports.GimmickCoreSchema = zod_1.z.union(Object.keys(exports.GimmickCoreDescriptions).map((key) => zod_1.z.literal(key).describe(exports.GimmickCoreDescriptions[key])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gimmick.config.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/gimmick.config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,uBAAuB,GAAG;IACrC,UAAU,EACR,8JAA8J;IAChK,eAAe,EACb,+HAA+H;IACjI,MAAM,EACJ,yEAAyE;CACnE,CAAC;AAIE,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CACtC,MAAM,CAAC,IAAI,CAAC,+BAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC/C,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,+BAAuB,CAAC,GAAkB,CAAC,CAAC,CAKrE,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"gimmick.config.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/gimmick.config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,uBAAuB,GAAG;IACrC,UAAU,EACR,8JAA8J;IAChK,eAAe,EACb,+HAA+H;IACjI,yBAAyB,EACvB,ydAAyd;IAC3d,MAAM,EACJ,yEAAyE;CACnE,CAAC;AAIE,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CACtC,MAAM,CAAC,IAAI,CAAC,+BAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC/C,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,+BAAuB,CAAC,GAAkB,CAAC,CAAC,CAKrE,CACF,CAAC"}
|
|
@@ -9,6 +9,9 @@ export interface UserPublicDto {
|
|
|
9
9
|
appearance: string | null;
|
|
10
10
|
}
|
|
11
11
|
export interface UserPrivateDto extends UserPublicDto {
|
|
12
|
+
locale: string;
|
|
13
|
+
country: string;
|
|
14
|
+
adminLevel: number;
|
|
12
15
|
birthDate: Date | null;
|
|
13
16
|
email: string | null;
|
|
14
17
|
defaultCredits: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentId, EntityId, EntityType, LocationId, UserId } from '@little-samo/samo-ai';
|
|
2
|
-
import type { LocationConfig, LocationEnvironment, LocationPlatform, LocationType } from '@little-samo/samo-ai-sdk/models';
|
|
2
|
+
import type { LocationConfig, LocationConfigCanvas, LocationEnvironment, LocationPlatform, LocationType } from '@little-samo/samo-ai-sdk/models';
|
|
3
3
|
import type { LocationMessageDto } from './location.message';
|
|
4
4
|
import type { AgentCostDto } from '../entities/agents/agent';
|
|
5
5
|
import type { GimmickCostDto, GimmickPublicDto } from '../entities/gimmicks/gimmick';
|
|
@@ -12,7 +12,9 @@ export interface LocationPublicDto {
|
|
|
12
12
|
maxUsers: number;
|
|
13
13
|
thumbnail: string | null;
|
|
14
14
|
ownerUserId: UserId | null;
|
|
15
|
+
canvasConfigs: LocationConfigCanvas[];
|
|
15
16
|
gimmicks: GimmickPublicDto[];
|
|
17
|
+
sourceLocationPresetId: bigint | null;
|
|
16
18
|
isPublished: boolean;
|
|
17
19
|
publishedAt: Date | null;
|
|
18
20
|
publishDescription: string | null;
|
|
@@ -37,6 +39,8 @@ export interface LocationPublicDto {
|
|
|
37
39
|
export interface LocationPrivateDto extends LocationPublicDto {
|
|
38
40
|
config: LocationConfig | null;
|
|
39
41
|
credentialTypes: string[];
|
|
42
|
+
overrideAgentLlmLevel: 'FREE' | 'LOW' | 'MEDIUM' | 'HIGH' | null;
|
|
43
|
+
isEditable: boolean;
|
|
40
44
|
}
|
|
41
45
|
export interface LocationListItemDto extends LocationPublicDto {
|
|
42
46
|
lastMessage: LocationMessageDto | null;
|
|
@@ -5,6 +5,8 @@ export declare const LocationEventType: {
|
|
|
5
5
|
readonly AgentJoined: "AgentJoined";
|
|
6
6
|
readonly AgentLeft: "AgentLeft";
|
|
7
7
|
readonly AgentExecuting: "AgentExecuting";
|
|
8
|
+
readonly AgentSendMessageStream: "AgentSendMessageStream";
|
|
9
|
+
readonly AgentExecuteNextAction: "AgentExecuteNextAction";
|
|
8
10
|
readonly AgentExecuted: "AgentExecuted";
|
|
9
11
|
readonly UserJoined: "UserJoined";
|
|
10
12
|
readonly UserLeft: "UserLeft";
|
|
@@ -15,6 +17,7 @@ export declare const LocationEventType: {
|
|
|
15
17
|
readonly MessageProcessed: "MessageProcessed";
|
|
16
18
|
readonly RenderingUpdated: "RenderingUpdated";
|
|
17
19
|
readonly CanvasUpdated: "CanvasUpdated";
|
|
20
|
+
readonly CanvasCleared: "CanvasCleared";
|
|
18
21
|
readonly PauseUpdateUntilUpdated: "PauseUpdateUntilUpdated";
|
|
19
22
|
readonly LocationUpdated: "LocationUpdated";
|
|
20
23
|
};
|
|
@@ -28,6 +31,18 @@ export interface LocationAgentExecutingEventDto extends LocationEventDtoBase {
|
|
|
28
31
|
type: typeof LocationEventType.AgentExecuting;
|
|
29
32
|
agentId: AgentId;
|
|
30
33
|
}
|
|
34
|
+
export interface LocationAgentSendMessageStreamEventDto extends LocationEventDtoBase {
|
|
35
|
+
type: typeof LocationEventType.AgentSendMessageStream;
|
|
36
|
+
agentId: AgentId;
|
|
37
|
+
index: number;
|
|
38
|
+
sequence: number;
|
|
39
|
+
delta: string;
|
|
40
|
+
}
|
|
41
|
+
export interface LocationAgentExecuteNextActionEventDto extends LocationEventDtoBase {
|
|
42
|
+
type: typeof LocationEventType.AgentExecuteNextAction;
|
|
43
|
+
agentId: AgentId;
|
|
44
|
+
index: number;
|
|
45
|
+
}
|
|
31
46
|
export interface LocationAgentExecutedEventDto extends LocationEventDtoBase {
|
|
32
47
|
type: typeof LocationEventType.AgentExecuted;
|
|
33
48
|
agentId: AgentId;
|
|
@@ -82,6 +97,9 @@ export interface LocationCanvasUpdatedEventDto extends LocationEventDtoBase {
|
|
|
82
97
|
name: string;
|
|
83
98
|
canvas: LocationCanvasDto;
|
|
84
99
|
}
|
|
100
|
+
export interface LocationCanvasClearedEventDto extends LocationEventDtoBase {
|
|
101
|
+
type: typeof LocationEventType.CanvasCleared;
|
|
102
|
+
}
|
|
85
103
|
export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDtoBase {
|
|
86
104
|
type: typeof LocationEventType.PauseUpdateUntilUpdated;
|
|
87
105
|
pauseUpdateUntil: Date | null;
|
|
@@ -90,4 +108,4 @@ export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDt
|
|
|
90
108
|
export interface LocationUpdatedEventDto extends LocationEventDtoBase {
|
|
91
109
|
type: typeof LocationEventType.LocationUpdated;
|
|
92
110
|
}
|
|
93
|
-
export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationUpdateMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
|
|
111
|
+
export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentSendMessageStreamEventDto | LocationAgentExecuteNextActionEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationUpdateMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationCanvasClearedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
|
|
@@ -5,6 +5,8 @@ exports.LocationEventType = {
|
|
|
5
5
|
AgentJoined: 'AgentJoined',
|
|
6
6
|
AgentLeft: 'AgentLeft',
|
|
7
7
|
AgentExecuting: 'AgentExecuting',
|
|
8
|
+
AgentSendMessageStream: 'AgentSendMessageStream',
|
|
9
|
+
AgentExecuteNextAction: 'AgentExecuteNextAction',
|
|
8
10
|
AgentExecuted: 'AgentExecuted',
|
|
9
11
|
UserJoined: 'UserJoined',
|
|
10
12
|
UserLeft: 'UserLeft',
|
|
@@ -15,6 +17,7 @@ exports.LocationEventType = {
|
|
|
15
17
|
MessageProcessed: 'MessageProcessed',
|
|
16
18
|
RenderingUpdated: 'RenderingUpdated',
|
|
17
19
|
CanvasUpdated: 'CanvasUpdated',
|
|
20
|
+
CanvasCleared: 'CanvasCleared',
|
|
18
21
|
PauseUpdateUntilUpdated: 'PauseUpdateUntilUpdated',
|
|
19
22
|
LocationUpdated: 'LocationUpdated',
|
|
20
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.events.js","sourceRoot":"","sources":["../../../src/dto/locations/location.events.ts"],"names":[],"mappings":";;;AAKa,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;CAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"location.events.js","sourceRoot":"","sources":["../../../src/dto/locations/location.events.ts"],"names":[],"mappings":";;;AAKa,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,sBAAsB,EAAE,wBAAwB;IAChD,sBAAsB,EAAE,wBAAwB;IAChD,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;CAC1B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { UserId } from '@little-samo/samo-ai';
|
|
1
|
+
import { LocationId, UserId } from '@little-samo/samo-ai';
|
|
2
2
|
import z from 'zod';
|
|
3
|
+
import type { LocationConfigCanvas } from '@little-samo/samo-ai-sdk/models';
|
|
3
4
|
import type { AgentCostDto, AgentPublicDto, GimmickCostDto, GimmickPublicDto } from '../entities';
|
|
4
5
|
export declare const LocationPresetMessageSchema: z.ZodObject<{
|
|
5
6
|
entityType: z.ZodNativeEnum<{
|
|
@@ -9,31 +10,52 @@ export declare const LocationPresetMessageSchema: z.ZodObject<{
|
|
|
9
10
|
readonly Gimmick: "gimmick";
|
|
10
11
|
}>;
|
|
11
12
|
entityId: z.ZodBigInt;
|
|
12
|
-
message: z.ZodString
|
|
13
|
+
message: z.ZodOptional<z.ZodString>;
|
|
14
|
+
image: z.ZodOptional<z.ZodString>;
|
|
13
15
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
|
|
15
|
-
entityType: "system" | "agent" | "user" | "gimmick";
|
|
16
|
+
entityType: "user" | "system" | "agent" | "gimmick";
|
|
16
17
|
entityId: bigint;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
image?: string | undefined;
|
|
17
20
|
}, {
|
|
18
|
-
|
|
19
|
-
entityType: "system" | "agent" | "user" | "gimmick";
|
|
21
|
+
entityType: "user" | "system" | "agent" | "gimmick";
|
|
20
22
|
entityId: bigint;
|
|
23
|
+
message?: string | undefined;
|
|
24
|
+
image?: string | undefined;
|
|
21
25
|
}>;
|
|
22
26
|
export type LocationPresetMessageDto = z.infer<typeof LocationPresetMessageSchema>;
|
|
27
|
+
export declare const LocationPresetCanvasSchema: z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
text: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
text: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}, {
|
|
34
|
+
text: string;
|
|
35
|
+
name: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type LocationPresetCanvasDto = z.infer<typeof LocationPresetCanvasSchema>;
|
|
23
38
|
export interface LocationPresetDto {
|
|
24
39
|
id: bigint;
|
|
25
40
|
name: string;
|
|
41
|
+
version: number;
|
|
42
|
+
versionUpdatedAt: Date;
|
|
26
43
|
presetDescription: string;
|
|
44
|
+
presetShortDescription: string;
|
|
27
45
|
thumbnail: string | null;
|
|
28
46
|
ownerUserId: UserId | null;
|
|
47
|
+
sourceLocationId: LocationId | null;
|
|
29
48
|
agents: AgentPublicDto[];
|
|
30
49
|
agentCosts: AgentCostDto[];
|
|
31
50
|
gimmicks: GimmickPublicDto[];
|
|
32
51
|
gimmickCosts: GimmickCostDto[];
|
|
52
|
+
canvases: LocationPresetCanvasDto[];
|
|
53
|
+
canvasConfigs: LocationConfigCanvas[];
|
|
33
54
|
messages: LocationPresetMessageDto[];
|
|
34
55
|
isPublished: boolean;
|
|
35
56
|
publishedAt: Date | null;
|
|
36
57
|
hashtags: string[];
|
|
58
|
+
likeCount: number;
|
|
37
59
|
isPublic: boolean;
|
|
38
60
|
isAllowImport: boolean;
|
|
39
61
|
isSensitive: boolean;
|
|
@@ -41,6 +63,7 @@ export interface LocationPresetDto {
|
|
|
41
63
|
updatedAt: Date;
|
|
42
64
|
}
|
|
43
65
|
export interface LocationPresetDetailDto extends LocationPresetDto {
|
|
66
|
+
userRating: 'LIKE' | 'DISLIKE' | null;
|
|
44
67
|
locationCount: number;
|
|
45
68
|
totalUsedCredit: number;
|
|
46
69
|
totalMessageCount: number;
|
|
@@ -3,12 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.LocationPresetMessageSchema = void 0;
|
|
6
|
+
exports.LocationPresetCanvasSchema = exports.LocationPresetMessageSchema = void 0;
|
|
7
7
|
const samo_ai_1 = require("@little-samo/samo-ai");
|
|
8
8
|
const zod_1 = __importDefault(require("zod"));
|
|
9
9
|
exports.LocationPresetMessageSchema = zod_1.default.object({
|
|
10
10
|
entityType: zod_1.default.nativeEnum(samo_ai_1.EntityType),
|
|
11
11
|
entityId: zod_1.default.coerce.bigint(),
|
|
12
|
-
message: zod_1.default.string().max(800),
|
|
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),
|
|
13
21
|
});
|
|
14
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":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"location.preset.js","sourceRoot":"","sources":["../../../src/dto/locations/location.preset.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAsE;AACtE,8CAAoB;AAWP,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;IAE3B,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"}
|