@little-samo/samo-ai-sdk 0.1.4 → 0.1.5-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.
- package/dist/dto/entities/agents/agent.d.ts +1 -0
- package/dist/dto/entities/agents/agent.requests.d.ts +458 -62
- package/dist/dto/entities/agents/agent.requests.js +9 -12
- package/dist/dto/entities/agents/agent.requests.js.map +1 -1
- package/dist/dto/entities/gimmicks/gimmick.config.d.ts +8 -0
- package/dist/dto/entities/gimmicks/gimmick.config.js +11 -0
- package/dist/dto/entities/gimmicks/gimmick.config.js.map +1 -0
- package/dist/dto/entities/gimmicks/gimmick.d.ts +10 -2
- package/dist/dto/entities/gimmicks/index.d.ts +1 -0
- package/dist/dto/entities/gimmicks/index.js +1 -0
- package/dist/dto/entities/gimmicks/index.js.map +1 -1
- package/dist/dto/entities/users/user.requests.d.ts +5 -0
- package/dist/dto/entities/users/user.requests.js +2 -1
- package/dist/dto/entities/users/user.requests.js.map +1 -1
- package/dist/dto/items/item.d.ts +5 -1
- package/dist/dto/locations/location.d.ts +17 -3
- package/dist/dto/locations/location.events.d.ts +7 -1
- package/dist/dto/locations/location.events.js +1 -0
- package/dist/dto/locations/location.events.js.map +1 -1
- package/dist/dto/locations/location.requests.d.ts +471 -76
- package/dist/dto/locations/location.requests.js +77 -9
- package/dist/dto/locations/location.requests.js.map +1 -1
- package/dist/models/entities/agents/agent.config.d.ts +221 -8
- package/dist/models/entities/agents/agent.config.js +112 -30
- package/dist/models/entities/agents/agent.config.js.map +1 -1
- package/dist/models/locations/location.config.d.ts +85 -24
- package/dist/models/locations/location.config.js +45 -21
- package/dist/models/locations/location.config.js.map +1 -1
- package/dist/models/locations/location.constants.d.ts +1 -2
- package/dist/models/locations/location.constants.js +1 -2
- package/dist/models/locations/location.constants.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.DeleteAgentParamsSchema = exports.UploadAgentAvatarParamsSchema = exports.GetAgentCostParamsSchema = exports.GetAgentLocationsParamsSchema = 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({
|
|
@@ -27,10 +27,8 @@ exports.AgentUpdateCredentialSchema = zod_1.z.object({
|
|
|
27
27
|
agentId: zod_1.z.coerce.bigint(),
|
|
28
28
|
credential: zod_1.z.union([
|
|
29
29
|
zod_1.z.object({
|
|
30
|
-
type: zod_1.z.literal('
|
|
31
|
-
|
|
32
|
-
password: zod_1.z.string().max(255),
|
|
33
|
-
username: zod_1.z.string().max(255),
|
|
30
|
+
type: zod_1.z.literal('notion'),
|
|
31
|
+
token: zod_1.z.string().max(255),
|
|
34
32
|
}),
|
|
35
33
|
zod_1.z.object({
|
|
36
34
|
type: zod_1.z.literal('notion'),
|
|
@@ -47,13 +45,9 @@ exports.AgentPresetsPaginationQuerySchema = zod_1.z.object({
|
|
|
47
45
|
limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(20),
|
|
48
46
|
});
|
|
49
47
|
exports.CreateAgentSchema = zod_1.z.object({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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.'),
|
|
48
|
+
config: models_1.AgentConfigSchema.partial()
|
|
49
|
+
.strict()
|
|
50
|
+
.describe('Agent configuration settings (e.g., name, avatar, character, etc.)'),
|
|
57
51
|
});
|
|
58
52
|
exports.CreateAgentFromPresetSchema = zod_1.z.object({
|
|
59
53
|
presetId: zod_1.z.coerce.bigint(),
|
|
@@ -61,6 +55,9 @@ exports.CreateAgentFromPresetSchema = zod_1.z.object({
|
|
|
61
55
|
exports.GetHelperAgentSchema = zod_1.z.object({
|
|
62
56
|
helperType: zod_1.z.nativeEnum(models_1.AgentHelperType),
|
|
63
57
|
});
|
|
58
|
+
exports.GetAgentLocationsParamsSchema = zod_1.z.object({
|
|
59
|
+
agentId: zod_1.z.coerce.bigint(),
|
|
60
|
+
});
|
|
64
61
|
exports.GetAgentCostParamsSchema = zod_1.z.object({
|
|
65
62
|
agentId: zod_1.z.coerce.bigint(),
|
|
66
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/agents/agent.requests.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"agent.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/agents/agent.requests.ts"],"names":[],"mappings":";;;AACA,4DAIyC;AACzC,6BAAwB;AAUX,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,EAAE,OAAC,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6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAWU,QAAA,wBAAwB,GAAG,OAAC,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,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GimmickCoreDescriptions: {
|
|
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
|
+
readonly image_generator: "Generates an image using an LLM based on text prompts and optional reference images. Execution takes approximately 30 seconds";
|
|
5
|
+
readonly notion: "Interacts with Notion platform for content management and collaboration";
|
|
6
|
+
};
|
|
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">[]]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GimmickCoreSchema = exports.GimmickCoreDescriptions = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.GimmickCoreDescriptions = {
|
|
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
|
+
image_generator: 'Generates an image using an LLM based on text prompts and optional reference images. Execution takes approximately 30 seconds',
|
|
8
|
+
notion: 'Interacts with Notion platform for content management and collaboration',
|
|
9
|
+
};
|
|
10
|
+
exports.GimmickCoreSchema = zod_1.z.union(Object.keys(exports.GimmickCoreDescriptions).map((key) => zod_1.z.literal(key).describe(exports.GimmickCoreDescriptions[key])));
|
|
11
|
+
//# sourceMappingURL=gimmick.config.js.map
|
|
@@ -0,0 +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,5 +1,13 @@
|
|
|
1
|
+
import { GimmickId } from '@little-samo/samo-ai/models';
|
|
2
|
+
import type { GimmickCore } from './gimmick.config';
|
|
3
|
+
export interface GimmickPublicDto {
|
|
4
|
+
id: GimmickId;
|
|
5
|
+
name: string;
|
|
6
|
+
core: GimmickCore;
|
|
7
|
+
appearance: string;
|
|
8
|
+
}
|
|
1
9
|
export interface GimmickCostDto {
|
|
2
|
-
core:
|
|
10
|
+
core: GimmickCore;
|
|
3
11
|
executionCost: number;
|
|
4
|
-
|
|
12
|
+
canvasMaxLength: number;
|
|
5
13
|
}
|
|
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./gimmick.config"), exports);
|
|
17
18
|
__exportStar(require("./gimmick"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,4CAA0B"}
|
|
@@ -16,3 +16,8 @@ export type GetUsersByIdsQueryDto = z.infer<typeof GetUsersByIdsQuerySchema>;
|
|
|
16
16
|
export interface GetUserPublicsByIdsResponseDto {
|
|
17
17
|
users: UserPublicDto[];
|
|
18
18
|
}
|
|
19
|
+
export declare const GetCurrentUserSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
20
|
+
export type GetCurrentUserDto = z.infer<typeof GetCurrentUserSchema>;
|
|
21
|
+
export interface GetCurrentUserResponseDto {
|
|
22
|
+
user: UserPrivateDto;
|
|
23
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetUsersByIdsQuerySchema = exports.GetCurrentUserQuerySchema = void 0;
|
|
3
|
+
exports.GetCurrentUserSchema = exports.GetUsersByIdsQuerySchema = exports.GetCurrentUserQuerySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.GetCurrentUserQuerySchema = zod_1.z.object({});
|
|
6
6
|
exports.GetUsersByIdsQuerySchema = zod_1.z.object({
|
|
@@ -11,4 +11,5 @@ exports.GetUsersByIdsQuerySchema = zod_1.z.object({
|
|
|
11
11
|
message: 'userIds must contain 1-25 user IDs',
|
|
12
12
|
}),
|
|
13
13
|
});
|
|
14
|
+
exports.GetCurrentUserSchema = zod_1.z.object({});
|
|
14
15
|
//# sourceMappingURL=user.requests.js.map
|
|
@@ -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"}
|
|
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"}
|
package/dist/dto/items/item.d.ts
CHANGED
|
@@ -2,11 +2,15 @@ export interface ItemDto {
|
|
|
2
2
|
id: number;
|
|
3
3
|
itemDataId: number;
|
|
4
4
|
name: string;
|
|
5
|
-
description
|
|
5
|
+
description: string | null;
|
|
6
6
|
count: number;
|
|
7
|
+
param1: number;
|
|
8
|
+
param2: number;
|
|
7
9
|
updatedAt: Date;
|
|
8
10
|
}
|
|
9
11
|
export interface ItemUpdateDto {
|
|
10
12
|
count: number;
|
|
13
|
+
param1: number;
|
|
14
|
+
param2: number;
|
|
11
15
|
updatedAt: Date;
|
|
12
16
|
}
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
import { AgentId, EntityId, EntityType, LocationId, UserId } from '@little-samo/samo-ai';
|
|
2
|
-
import { LocationConfig, LocationEnvironment, LocationPlatform, LocationType } from '@little-samo/samo-ai-sdk/models';
|
|
2
|
+
import type { LocationConfig, 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
|
-
import type { GimmickCostDto } from '../entities/gimmicks/gimmick';
|
|
5
|
+
import type { GimmickCostDto, GimmickPublicDto } from '../entities/gimmicks/gimmick';
|
|
6
6
|
export interface LocationPublicDto {
|
|
7
7
|
id: LocationId;
|
|
8
8
|
name: string;
|
|
9
9
|
platform: LocationPlatform;
|
|
10
10
|
type: LocationType;
|
|
11
11
|
environment: LocationEnvironment;
|
|
12
|
+
maxUsers: number;
|
|
13
|
+
thumbnail: string | null;
|
|
14
|
+
ownerUserId: UserId | null;
|
|
15
|
+
gimmicks: GimmickPublicDto[];
|
|
16
|
+
isPublished: boolean;
|
|
17
|
+
publishedAt: Date | null;
|
|
18
|
+
publishDescription: string | null;
|
|
12
19
|
param1: bigint;
|
|
13
20
|
param2: bigint;
|
|
14
21
|
param3: bigint;
|
|
15
22
|
param4: bigint;
|
|
23
|
+
freeCreditBalance: number;
|
|
24
|
+
paidCreditBalance: number;
|
|
25
|
+
useLocationCreditOnly: boolean;
|
|
26
|
+
creditCostPerChat: number;
|
|
27
|
+
chatRequiresPaidCredit: boolean;
|
|
28
|
+
isPublic: boolean;
|
|
29
|
+
isAdminChat: boolean;
|
|
16
30
|
createdAt: Date;
|
|
17
31
|
updatedAt: Date;
|
|
18
32
|
}
|
|
@@ -22,10 +36,10 @@ export interface LocationPrivateDto extends LocationPublicDto {
|
|
|
22
36
|
}
|
|
23
37
|
export interface LocationListItemDto extends LocationPublicDto {
|
|
24
38
|
lastMessage: LocationMessageDto | null;
|
|
39
|
+
messageCount: number;
|
|
25
40
|
unreadCount: number;
|
|
26
41
|
agentIds: AgentId[];
|
|
27
42
|
userIds: UserId[];
|
|
28
|
-
gimmickCount: number;
|
|
29
43
|
pauseUpdateUntil: Date | null;
|
|
30
44
|
pauseUpdateReason: string | null;
|
|
31
45
|
}
|
|
@@ -11,6 +11,7 @@ export declare const LocationEventType: {
|
|
|
11
11
|
readonly GimmickExecuting: "GimmickExecuting";
|
|
12
12
|
readonly GimmickExecuted: "GimmickExecuted";
|
|
13
13
|
readonly AddMessage: "AddMessage";
|
|
14
|
+
readonly UpdateMessage: "UpdateMessage";
|
|
14
15
|
readonly MessageProcessed: "MessageProcessed";
|
|
15
16
|
readonly RenderingUpdated: "RenderingUpdated";
|
|
16
17
|
readonly CanvasUpdated: "CanvasUpdated";
|
|
@@ -63,6 +64,11 @@ export interface LocationAddMessageEventDto extends LocationEventDtoBase {
|
|
|
63
64
|
type: typeof LocationEventType.AddMessage;
|
|
64
65
|
message: LocationMessageDto;
|
|
65
66
|
}
|
|
67
|
+
export interface LocationUpdateMessageEventDto extends LocationEventDtoBase {
|
|
68
|
+
type: typeof LocationEventType.UpdateMessage;
|
|
69
|
+
messageId: string;
|
|
70
|
+
message: LocationMessageDto;
|
|
71
|
+
}
|
|
66
72
|
export interface LocationMessageProcessedEventDto extends LocationEventDtoBase {
|
|
67
73
|
type: typeof LocationEventType.MessageProcessed;
|
|
68
74
|
lastMessageId: string;
|
|
@@ -84,4 +90,4 @@ export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDt
|
|
|
84
90
|
export interface LocationUpdatedEventDto extends LocationEventDtoBase {
|
|
85
91
|
type: typeof LocationEventType.LocationUpdated;
|
|
86
92
|
}
|
|
87
|
-
export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
|
|
93
|
+
export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationUpdateMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
|
|
@@ -11,6 +11,7 @@ exports.LocationEventType = {
|
|
|
11
11
|
GimmickExecuting: 'GimmickExecuting',
|
|
12
12
|
GimmickExecuted: 'GimmickExecuted',
|
|
13
13
|
AddMessage: 'AddMessage',
|
|
14
|
+
UpdateMessage: 'UpdateMessage',
|
|
14
15
|
MessageProcessed: 'MessageProcessed',
|
|
15
16
|
RenderingUpdated: 'RenderingUpdated',
|
|
16
17
|
CanvasUpdated: 'CanvasUpdated',
|
|
@@ -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,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,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"}
|