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

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.
@@ -6,11 +6,11 @@ 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
- page: number;
10
9
  limit: number;
10
+ page: number;
11
11
  }, {
12
- page?: number | undefined;
13
12
  limit?: number | undefined;
13
+ page?: number | undefined;
14
14
  }>;
15
15
  export type AgentsPaginationQueryDto = z.infer<typeof AgentsPaginationQuerySchema>;
16
16
  export interface AgentsPaginatedResponseDto {
@@ -58,67 +58,67 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
58
58
  rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
59
  }, "strict", z.ZodTypeAny, {
60
60
  name?: string | undefined;
61
- avatar?: string | undefined;
62
- appearance?: string | undefined;
63
61
  core?: {
64
62
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
65
63
  } | undefined;
64
+ rules?: string[] | undefined;
65
+ appearance?: string | undefined;
66
+ avatar?: string | undefined;
66
67
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
67
68
  languages?: string[] | undefined;
68
69
  timeZone?: string | undefined;
69
70
  greeting?: string | undefined;
70
71
  actions?: "todo"[] | undefined;
71
72
  character?: Record<string, Record<string, string>> | undefined;
72
- rules?: string[] | undefined;
73
73
  }, {
74
74
  name?: string | undefined;
75
- avatar?: string | undefined;
76
- appearance?: string | undefined;
77
75
  core?: {
78
76
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
79
77
  } | undefined;
78
+ rules?: string[] | undefined;
79
+ appearance?: string | undefined;
80
+ avatar?: string | undefined;
80
81
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
81
82
  languages?: string[] | undefined;
82
83
  timeZone?: string | undefined;
83
84
  greeting?: string | undefined;
84
85
  actions?: "todo"[] | undefined;
85
86
  character?: Record<string, Record<string, string>> | undefined;
86
- rules?: string[] | undefined;
87
87
  }>;
88
88
  }, "strip", z.ZodTypeAny, {
89
- agentId: bigint;
90
89
  config: {
91
90
  name?: string | undefined;
92
- avatar?: string | undefined;
93
- appearance?: string | undefined;
94
91
  core?: {
95
92
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
96
93
  } | undefined;
94
+ rules?: string[] | undefined;
95
+ appearance?: string | undefined;
96
+ avatar?: string | undefined;
97
97
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
98
98
  languages?: string[] | undefined;
99
99
  timeZone?: string | undefined;
100
100
  greeting?: string | undefined;
101
101
  actions?: "todo"[] | undefined;
102
102
  character?: Record<string, Record<string, string>> | undefined;
103
- rules?: string[] | undefined;
104
103
  };
105
- }, {
106
104
  agentId: bigint;
105
+ }, {
107
106
  config: {
108
107
  name?: string | undefined;
109
- avatar?: string | undefined;
110
- appearance?: string | undefined;
111
108
  core?: {
112
109
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
113
110
  } | undefined;
111
+ rules?: string[] | undefined;
112
+ appearance?: string | undefined;
113
+ avatar?: string | undefined;
114
114
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
115
115
  languages?: string[] | undefined;
116
116
  timeZone?: string | undefined;
117
117
  greeting?: string | undefined;
118
118
  actions?: "todo"[] | undefined;
119
119
  character?: Record<string, Record<string, string>> | undefined;
120
- rules?: string[] | undefined;
121
120
  };
121
+ agentId: bigint;
122
122
  }>;
123
123
  export type AgentUpdateConfigDto = z.infer<typeof AgentUpdateConfigSchema>;
124
124
  export type AgentUpdateConfigResponseDto = Partial<AgentConfig>;
@@ -150,7 +150,6 @@ export declare const AgentUpdateCredentialSchema: z.ZodObject<{
150
150
  token: string;
151
151
  }>]>;
152
152
  }, "strip", z.ZodTypeAny, {
153
- agentId: bigint;
154
153
  credential: {
155
154
  type: "x_twitter";
156
155
  email: string;
@@ -160,8 +159,8 @@ export declare const AgentUpdateCredentialSchema: z.ZodObject<{
160
159
  type: "notion";
161
160
  token: string;
162
161
  };
163
- }, {
164
162
  agentId: bigint;
163
+ }, {
165
164
  credential: {
166
165
  type: "x_twitter";
167
166
  email: string;
@@ -171,6 +170,7 @@ export declare const AgentUpdateCredentialSchema: z.ZodObject<{
171
170
  type: "notion";
172
171
  token: string;
173
172
  };
173
+ agentId: bigint;
174
174
  }>;
175
175
  export type AgentUpdateCredentialDto = z.infer<typeof AgentUpdateCredentialSchema>;
176
176
  export interface AgentUpdateCredentialResponseDto {
@@ -181,11 +181,11 @@ export declare const AgentDeleteCredentialSchema: z.ZodObject<{
181
181
  agentId: z.ZodBigInt;
182
182
  credentialType: z.ZodString;
183
183
  }, "strip", z.ZodTypeAny, {
184
- agentId: bigint;
185
184
  credentialType: string;
186
- }, {
187
185
  agentId: bigint;
186
+ }, {
188
187
  credentialType: string;
188
+ agentId: bigint;
189
189
  }>;
190
190
  export type AgentDeleteCredentialDto = z.infer<typeof AgentDeleteCredentialSchema>;
191
191
  export interface AgentDeleteCredentialResponseDto {
@@ -196,11 +196,11 @@ export declare const AgentPresetsPaginationQuerySchema: z.ZodObject<{
196
196
  page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
197
197
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
198
198
  }, "strip", z.ZodTypeAny, {
199
- page: number;
200
199
  limit: number;
200
+ page: number;
201
201
  }, {
202
- page?: number | undefined;
203
202
  limit?: number | undefined;
203
+ page?: number | undefined;
204
204
  }>;
205
205
  export type AgentPresetsPaginationQueryDto = z.infer<typeof AgentPresetsPaginationQuerySchema>;
206
206
  export interface AgentPresetsPaginatedResponseDto {
@@ -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,CAAC;iBAChC,MAAM,CAAC,CA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"}
@@ -1,4 +1,4 @@
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
3
  import { LocationMessageDto } from './location.message';
4
4
  export interface LocationPublicDto {
@@ -23,3 +23,14 @@ export interface LocationListItemDto extends LocationPublicDto {
23
23
  pauseUpdateUntil: Date | null;
24
24
  pauseUpdateReason: string | null;
25
25
  }
26
+ export interface LocationCanvasDto {
27
+ lastModifierEntityType: EntityType;
28
+ lastModifierEntityId: EntityId;
29
+ text: string;
30
+ updatedAt: Date;
31
+ }
32
+ export interface LocationContentDto {
33
+ id: LocationId;
34
+ canvases: Record<string, LocationCanvasDto>;
35
+ rendering: string | null;
36
+ }
@@ -1,5 +1,6 @@
1
1
  import { AgentId, GimmickId, LocationId, UserId } from '@little-samo/samo-ai';
2
2
  import { UserPublicDto } from '../entities';
3
+ import { LocationCanvasDto } from './location';
3
4
  import { LocationMessageDto } from './location.message';
4
5
  export declare const LocationEventType: {
5
6
  readonly AgentExecuting: "AgentExecuting";
@@ -11,6 +12,7 @@ export declare const LocationEventType: {
11
12
  readonly AddMessage: "AddMessage";
12
13
  readonly MessageProcessed: "MessageProcessed";
13
14
  readonly RenderingUpdated: "RenderingUpdated";
15
+ readonly CanvasUpdated: "CanvasUpdated";
14
16
  readonly PauseUpdateUntilUpdated: "PauseUpdateUntilUpdated";
15
17
  };
16
18
  export type LocationEventType = (typeof LocationEventType)[keyof typeof LocationEventType];
@@ -59,9 +61,14 @@ export interface LocationRenderingUpdatedEventDto extends LocationEventDtoBase {
59
61
  type: typeof LocationEventType.RenderingUpdated;
60
62
  rendering: string | null;
61
63
  }
64
+ export interface LocationCanvasUpdatedEventDto extends LocationEventDtoBase {
65
+ type: typeof LocationEventType.CanvasUpdated;
66
+ name: string;
67
+ canvas: LocationCanvasDto;
68
+ }
62
69
  export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDtoBase {
63
70
  type: typeof LocationEventType.PauseUpdateUntilUpdated;
64
71
  pauseUpdateUntil: Date | null;
65
72
  pauseUpdateReason: string | null;
66
73
  }
67
- export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationUserJoinEventDto | LocationUserLeaveEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto;
74
+ export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationUserJoinEventDto | LocationUserLeaveEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto;
@@ -11,6 +11,7 @@ exports.LocationEventType = {
11
11
  AddMessage: 'AddMessage',
12
12
  MessageProcessed: 'MessageProcessed',
13
13
  RenderingUpdated: 'RenderingUpdated',
14
+ CanvasUpdated: 'CanvasUpdated',
14
15
  PauseUpdateUntilUpdated: 'PauseUpdateUntilUpdated',
15
16
  };
16
17
  //# 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":";;;AAOa,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,aAAa,EAAE,eAAe;IAC9B,uBAAuB,EAAE,yBAAyB;CAC1C,CAAC"}