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

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 +221 -20
  3. package/dist/dto/entities/agents/agent.requests.js +37 -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 +660 -169
  30. package/dist/dto/locations/location.requests.js +147 -44
  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 +26 -23
  39. package/dist/models/locations/location.config.js +19 -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
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"location.events.js","sourceRoot":"","sources":["../../../src/dto/locations/location.events.ts"],"names":[],"mappings":";;;AAMa,QAAA,iBAAiB,GAAG;IAC/B,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,uBAAuB,EAAE,yBAAyB;CAC1C,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,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;CAC1B,CAAC"}
@@ -4,6 +4,7 @@ export interface LocationMessageDto {
4
4
  entityType: EntityType;
5
5
  entityId: EntityId;
6
6
  name: string;
7
+ avatar?: string;
7
8
  expression?: string;
8
9
  message?: string;
9
10
  action?: string;