@little-samo/samo-ai-sdk 0.1.0-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/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/dto/entities/agents/agent.d.ts +13 -0
- package/dist/dto/entities/agents/agent.js +3 -0
- package/dist/dto/entities/agents/agent.js.map +1 -0
- package/dist/dto/entities/agents/agent.preset.d.ts +10 -0
- package/dist/dto/entities/agents/agent.preset.js +3 -0
- package/dist/dto/entities/agents/agent.preset.js.map +1 -0
- package/dist/dto/entities/agents/agent.requests.d.ts +537 -0
- package/dist/dto/entities/agents/agent.requests.js +24 -0
- package/dist/dto/entities/agents/agent.requests.js.map +1 -0
- package/dist/dto/entities/agents/index.d.ts +3 -0
- package/dist/dto/entities/agents/index.js +20 -0
- package/dist/dto/entities/agents/index.js.map +1 -0
- package/dist/dto/entities/entity.d.ts +8 -0
- package/dist/dto/entities/entity.js +3 -0
- package/dist/dto/entities/entity.js.map +1 -0
- package/dist/dto/entities/index.d.ts +3 -0
- package/dist/dto/entities/index.js +20 -0
- package/dist/dto/entities/index.js.map +1 -0
- package/dist/dto/entities/users/index.d.ts +2 -0
- package/dist/dto/entities/users/index.js +19 -0
- package/dist/dto/entities/users/index.js.map +1 -0
- package/dist/dto/entities/users/user.d.ts +16 -0
- package/dist/dto/entities/users/user.events.d.ts +14 -0
- package/dist/dto/entities/users/user.events.js +7 -0
- package/dist/dto/entities/users/user.events.js.map +1 -0
- package/dist/dto/entities/users/user.js +3 -0
- package/dist/dto/entities/users/user.js.map +1 -0
- package/dist/dto/index.d.ts +3 -0
- package/dist/dto/index.js +20 -0
- package/dist/dto/index.js.map +1 -0
- package/dist/dto/items/index.d.ts +4 -0
- package/dist/dto/items/index.js +21 -0
- package/dist/dto/items/index.js.map +1 -0
- package/dist/dto/items/item.d.ts +12 -0
- package/dist/dto/items/item.events.d.ts +19 -0
- package/dist/dto/items/item.events.js +8 -0
- package/dist/dto/items/item.events.js.map +1 -0
- package/dist/dto/items/item.js +3 -0
- package/dist/dto/items/item.js.map +1 -0
- package/dist/dto/items/item.rankings.d.ts +7 -0
- package/dist/dto/items/item.rankings.js +3 -0
- package/dist/dto/items/item.rankings.js.map +1 -0
- package/dist/dto/items/item.requests.d.ts +3 -0
- package/dist/dto/items/item.requests.js +36 -0
- package/dist/dto/items/item.requests.js.map +1 -0
- package/dist/dto/locations/index.d.ts +6 -0
- package/dist/dto/locations/index.js +23 -0
- package/dist/dto/locations/index.js.map +1 -0
- package/dist/dto/locations/location.d.ts +21 -0
- package/dist/dto/locations/location.events.d.ts +36 -0
- package/dist/dto/locations/location.events.js +11 -0
- package/dist/dto/locations/location.events.js.map +1 -0
- package/dist/dto/locations/location.js +3 -0
- package/dist/dto/locations/location.js.map +1 -0
- package/dist/dto/locations/location.messages.d.ts +13 -0
- package/dist/dto/locations/location.messages.js +3 -0
- package/dist/dto/locations/location.messages.js.map +1 -0
- package/dist/dto/locations/location.preset.d.ts +12 -0
- package/dist/dto/locations/location.preset.js +3 -0
- package/dist/dto/locations/location.preset.js.map +1 -0
- package/dist/dto/locations/location.requests.d.ts +214 -0
- package/dist/dto/locations/location.requests.js +27 -0
- package/dist/dto/locations/location.requests.js.map +1 -0
- package/dist/dto/locations/location.states.d.ts +3 -0
- package/dist/dto/locations/location.states.js +3 -0
- package/dist/dto/locations/location.states.js.map +1 -0
- package/dist/models/entities/agents/agent.config.d.ts +336 -0
- package/dist/models/entities/agents/agent.config.js +124 -0
- package/dist/models/entities/agents/agent.config.js.map +1 -0
- package/dist/models/entities/agents/agent.constants.d.ts +4 -0
- package/dist/models/entities/agents/agent.constants.js +7 -0
- package/dist/models/entities/agents/agent.constants.js.map +1 -0
- package/dist/models/entities/agents/index.d.ts +2 -0
- package/dist/models/entities/agents/index.js +19 -0
- package/dist/models/entities/agents/index.js.map +1 -0
- package/dist/models/entities/index.d.ts +1 -0
- package/dist/models/entities/index.js +18 -0
- package/dist/models/entities/index.js.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +19 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/locations/index.d.ts +2 -0
- package/dist/models/locations/index.js +19 -0
- package/dist/models/locations/index.js.map +1 -0
- package/dist/models/locations/location.config.d.ts +111 -0
- package/dist/models/locations/location.config.js +75 -0
- package/dist/models/locations/location.config.js.map +1 -0
- package/dist/models/locations/location.constants.d.ts +8 -0
- package/dist/models/locations/location.constants.js +11 -0
- package/dist/models/locations/location.constants.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetHelperAgentSchema = exports.CreateAgentFromPresetSchema = exports.AgentPresetsPaginationQuerySchema = exports.AgentUpdateConfigSchema = exports.AgentsPaginationQuerySchema = void 0;
|
|
4
|
+
const models_1 = require("@little-samo/samo-ai-sdk/models");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.AgentsPaginationQuerySchema = zod_1.z.object({
|
|
7
|
+
page: zod_1.z.coerce.number().int().min(1).optional().default(1),
|
|
8
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(10),
|
|
9
|
+
});
|
|
10
|
+
exports.AgentUpdateConfigSchema = zod_1.z.object({
|
|
11
|
+
agentId: zod_1.z.bigint(),
|
|
12
|
+
config: models_1.AgentConfigSchema.partial(),
|
|
13
|
+
});
|
|
14
|
+
exports.AgentPresetsPaginationQuerySchema = zod_1.z.object({
|
|
15
|
+
page: zod_1.z.coerce.number().int().min(1).optional().default(1),
|
|
16
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(20),
|
|
17
|
+
});
|
|
18
|
+
exports.CreateAgentFromPresetSchema = zod_1.z.object({
|
|
19
|
+
presetId: zod_1.z.bigint(),
|
|
20
|
+
});
|
|
21
|
+
exports.GetHelperAgentSchema = zod_1.z.object({
|
|
22
|
+
helperType: zod_1.z.nativeEnum(models_1.AgentHelperType),
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=agent.requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/agents/agent.requests.ts"],"names":[],"mappings":";;;AAAA,4DAGyC;AACzC,6BAAwB;AAKX,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,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACtE,CAAC,CAAC;AAgBU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,0BAAiB,CAAC,OAAO,EAAE;CACpC,CAAC,CAAC;AAIU,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,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,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACtE,CAAC,CAAC;AAgBU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAUU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,wBAAe,CAAC;CAC1C,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./agent.preset"), exports);
|
|
18
|
+
__exportStar(require("./agent.requests"), exports);
|
|
19
|
+
__exportStar(require("./agent"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/agents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,mDAAiC;AACjC,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/dto/entities/entity.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./agents"), exports);
|
|
18
|
+
__exportStar(require("./users"), exports);
|
|
19
|
+
__exportStar(require("./entity"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./user.events"), exports);
|
|
18
|
+
__exportStar(require("./user"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,yCAAuB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UserId } from '@little-samo/samo-ai';
|
|
2
|
+
import { EntityDto } from '../entity';
|
|
3
|
+
export interface UserDto extends EntityDto {
|
|
4
|
+
id: UserId;
|
|
5
|
+
}
|
|
6
|
+
export interface UserPublicDto {
|
|
7
|
+
id: UserId;
|
|
8
|
+
username: string | null;
|
|
9
|
+
nickname: string;
|
|
10
|
+
firstName: string | null;
|
|
11
|
+
lastName: string | null;
|
|
12
|
+
profilePicture: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface UserPrivateDto extends UserPublicDto {
|
|
15
|
+
email: string | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ItemEventDto } from '../../items';
|
|
2
|
+
export declare const UserEventType: {
|
|
3
|
+
readonly ItemEvent: "ItemEvent";
|
|
4
|
+
};
|
|
5
|
+
export type UserEventType = (typeof UserEventType)[keyof typeof UserEventType];
|
|
6
|
+
export interface UserEventDtoBase {
|
|
7
|
+
userId: number;
|
|
8
|
+
type: UserEventType;
|
|
9
|
+
}
|
|
10
|
+
export interface UserItemEventDto extends UserEventDtoBase {
|
|
11
|
+
type: typeof UserEventType.ItemEvent;
|
|
12
|
+
itemEvent: ItemEventDto;
|
|
13
|
+
}
|
|
14
|
+
export type UserEventDto = UserItemEventDto;
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/user.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./entities"), exports);
|
|
18
|
+
__exportStar(require("./items"), exports);
|
|
19
|
+
__exportStar(require("./locations"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./item.events"), exports);
|
|
18
|
+
__exportStar(require("./item.rankings"), exports);
|
|
19
|
+
__exportStar(require("./item.requests"), exports);
|
|
20
|
+
__exportStar(require("./item"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/items/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,yCAAuB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ItemDto, ItemUpdateDto } from './item';
|
|
2
|
+
export declare const ItemEventType: {
|
|
3
|
+
readonly Created: "Created";
|
|
4
|
+
readonly Updated: "Updated";
|
|
5
|
+
};
|
|
6
|
+
export type ItemEventType = (typeof ItemEventType)[keyof typeof ItemEventType];
|
|
7
|
+
export interface ItemEventDtoBase {
|
|
8
|
+
itemId: number;
|
|
9
|
+
type: ItemEventType;
|
|
10
|
+
}
|
|
11
|
+
export interface ItemCreatedEventDto extends ItemEventDtoBase {
|
|
12
|
+
type: typeof ItemEventType.Created;
|
|
13
|
+
item: ItemDto;
|
|
14
|
+
}
|
|
15
|
+
export interface ItemUpdatedEventDto extends ItemEventDtoBase {
|
|
16
|
+
type: typeof ItemEventType.Updated;
|
|
17
|
+
item: ItemUpdateDto;
|
|
18
|
+
}
|
|
19
|
+
export type ItemEventDto = ItemCreatedEventDto | ItemUpdatedEventDto;
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../src/dto/items/item.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.rankings.js","sourceRoot":"","sources":["../../../src/dto/items/item.rankings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
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 [];
|
|
31
|
+
}),
|
|
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);
|
|
36
|
+
//# sourceMappingURL=item.requests.js.map
|
|
@@ -0,0 +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,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QAChC,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;iDACC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./location.events"), exports);
|
|
18
|
+
__exportStar(require("./location.messages"), exports);
|
|
19
|
+
__exportStar(require("./location.preset"), exports);
|
|
20
|
+
__exportStar(require("./location.requests"), exports);
|
|
21
|
+
__exportStar(require("./location.states"), exports);
|
|
22
|
+
__exportStar(require("./location"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,6CAA2B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LocationId } from '@little-samo/samo-ai';
|
|
2
|
+
import { LocationConfig } from '@little-samo/samo-ai-sdk/models';
|
|
3
|
+
import { AgentDto, UserDto } from '../entities';
|
|
4
|
+
import { LocationMessageDto } from './location.messages';
|
|
5
|
+
export interface LocationMessagesDto {
|
|
6
|
+
id: LocationId;
|
|
7
|
+
name: string;
|
|
8
|
+
users: UserDto[];
|
|
9
|
+
agents: AgentDto[];
|
|
10
|
+
messages: LocationMessageDto[];
|
|
11
|
+
messageCursor?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface LocationBasicDto {
|
|
14
|
+
id: LocationId;
|
|
15
|
+
name: string;
|
|
16
|
+
platform: string;
|
|
17
|
+
type: string;
|
|
18
|
+
config: LocationConfig;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { UserId } from '@little-samo/samo-ai';
|
|
2
|
+
import { UserDto } from '../entities';
|
|
3
|
+
import { LocationMessageDto } from './location.messages';
|
|
4
|
+
export declare const LocationEventType: {
|
|
5
|
+
readonly AgentExecution: "AgentExecution";
|
|
6
|
+
readonly UserJoin: "UserJoin";
|
|
7
|
+
readonly UserLeave: "UserLeave";
|
|
8
|
+
readonly AddMessage: "AddMessage";
|
|
9
|
+
readonly RenderingUpdated: "RenderingUpdated";
|
|
10
|
+
};
|
|
11
|
+
export type LocationEventType = (typeof LocationEventType)[keyof typeof LocationEventType];
|
|
12
|
+
export interface LocationEventDtoBase {
|
|
13
|
+
locationId: number;
|
|
14
|
+
type: LocationEventType;
|
|
15
|
+
}
|
|
16
|
+
export interface LocationRenderingUpdatedEventDto extends LocationEventDtoBase {
|
|
17
|
+
type: typeof LocationEventType.RenderingUpdated;
|
|
18
|
+
rendering: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface LocationAgentExecutionEventDto extends LocationEventDtoBase {
|
|
21
|
+
type: typeof LocationEventType.AgentExecution;
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LocationUserJoinEventDto extends LocationEventDtoBase {
|
|
25
|
+
type: typeof LocationEventType.UserJoin;
|
|
26
|
+
user: UserDto;
|
|
27
|
+
}
|
|
28
|
+
export interface LocationUserLeaveEventDto extends LocationEventDtoBase {
|
|
29
|
+
type: typeof LocationEventType.UserLeave;
|
|
30
|
+
userId: UserId;
|
|
31
|
+
}
|
|
32
|
+
export interface LocationAddMessageEventDto extends LocationEventDtoBase {
|
|
33
|
+
type: typeof LocationEventType.AddMessage;
|
|
34
|
+
message: LocationMessageDto;
|
|
35
|
+
}
|
|
36
|
+
export type LocationEventDto = LocationRenderingUpdatedEventDto | LocationAgentExecutionEventDto | LocationUserJoinEventDto | LocationUserLeaveEventDto | LocationAddMessageEventDto;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocationEventType = void 0;
|
|
4
|
+
exports.LocationEventType = {
|
|
5
|
+
AgentExecution: 'AgentExecution',
|
|
6
|
+
UserJoin: 'UserJoin',
|
|
7
|
+
UserLeave: 'UserLeave',
|
|
8
|
+
AddMessage: 'AddMessage',
|
|
9
|
+
RenderingUpdated: 'RenderingUpdated',
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=location.events.js.map
|
|
@@ -0,0 +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,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/dto/locations/location.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EntityId, EntityType } from '@little-samo/samo-ai';
|
|
2
|
+
export interface LocationMessageDto {
|
|
3
|
+
entityType: EntityType;
|
|
4
|
+
entityId: EntityId;
|
|
5
|
+
name: string;
|
|
6
|
+
expression?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
action?: string;
|
|
9
|
+
emotion?: string;
|
|
10
|
+
image?: string;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.messages.js","sourceRoot":"","sources":["../../../src/dto/locations/location.messages.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LocationConfig } from '@little-samo/samo-ai-sdk/models';
|
|
2
|
+
export interface LocationPresetDto {
|
|
3
|
+
id: bigint;
|
|
4
|
+
presetName: string;
|
|
5
|
+
presetShortDescription: string;
|
|
6
|
+
presetDescription: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
config: LocationConfig;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.preset.js","sourceRoot":"","sources":["../../../src/dto/locations/location.preset.ts"],"names":[],"mappings":""}
|