snss-types 1.0.5 → 1.0.7
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/README.md +227 -227
- package/dist-types/index.d.ts +1003 -202
- package/dist-types/index.js +10 -10
- package/dist-types/index.js.map +1 -1
- package/package.json +5 -3
package/dist-types/index.js
CHANGED
|
@@ -86,24 +86,24 @@ __decorateClass([
|
|
|
86
86
|
var import_swagger3 = require("@nestjs/swagger");
|
|
87
87
|
var ModelDto = class {
|
|
88
88
|
name;
|
|
89
|
-
type;
|
|
90
89
|
url;
|
|
90
|
+
imageUrl;
|
|
91
91
|
};
|
|
92
92
|
__decorateClass([
|
|
93
|
-
(0, import_swagger3.ApiProperty)({ description: "\u540D\u79F0", default: "" })
|
|
93
|
+
(0, import_swagger3.ApiProperty)({ description: "\u6A21\u578B\u540D\u79F0", default: "" })
|
|
94
94
|
], ModelDto.prototype, "name", 2);
|
|
95
95
|
__decorateClass([
|
|
96
96
|
(0, import_swagger3.ApiProperty)({
|
|
97
|
-
description: "\
|
|
98
|
-
default: "
|
|
97
|
+
description: "\u6A21\u578B\u6587\u4EF6 URL\uFF08\u76F8\u5BF9\u8DEF\u5F84\u6216\u5B8C\u6574 URL\uFF09",
|
|
98
|
+
default: ""
|
|
99
99
|
})
|
|
100
|
-
], ModelDto.prototype, "
|
|
100
|
+
], ModelDto.prototype, "url", 2);
|
|
101
101
|
__decorateClass([
|
|
102
102
|
(0, import_swagger3.ApiProperty)({
|
|
103
|
-
description: "\
|
|
103
|
+
description: "\u793A\u610F\u56FE\u7247 URL\uFF08\u76F8\u5BF9\u8DEF\u5F84\u6216\u5B8C\u6574 URL\uFF09",
|
|
104
104
|
default: ""
|
|
105
105
|
})
|
|
106
|
-
], ModelDto.prototype, "
|
|
106
|
+
], ModelDto.prototype, "imageUrl", 2);
|
|
107
107
|
|
|
108
108
|
// src/dto/SendMessageDto.ts
|
|
109
109
|
var import_swagger4 = require("@nestjs/swagger");
|
|
@@ -124,8 +124,8 @@ var ModelEntity = class {
|
|
|
124
124
|
// 自动生成主键值(不用你手动赋值)
|
|
125
125
|
id;
|
|
126
126
|
name;
|
|
127
|
-
type;
|
|
128
127
|
url;
|
|
128
|
+
imageUrl;
|
|
129
129
|
updateTime;
|
|
130
130
|
};
|
|
131
131
|
__decorateClass([
|
|
@@ -136,10 +136,10 @@ __decorateClass([
|
|
|
136
136
|
], ModelEntity.prototype, "name", 2);
|
|
137
137
|
__decorateClass([
|
|
138
138
|
(0, import_typeorm.Column)()
|
|
139
|
-
], ModelEntity.prototype, "
|
|
139
|
+
], ModelEntity.prototype, "url", 2);
|
|
140
140
|
__decorateClass([
|
|
141
141
|
(0, import_typeorm.Column)()
|
|
142
|
-
], ModelEntity.prototype, "
|
|
142
|
+
], ModelEntity.prototype, "imageUrl", 2);
|
|
143
143
|
__decorateClass([
|
|
144
144
|
(0, import_typeorm.UpdateDateColumn)()
|
|
145
145
|
], ModelEntity.prototype, "updateTime", 2);
|
package/dist-types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/index.ts","../src/dto/DirPathDto.ts","../src/dto/InitCaseCacheDto.ts","../src/dto/ModelDto.ts","../src/dto/SendMessageDto.ts","../src/entity/ModelEntity.ts"],"sourcesContent":["import { ModelEntity } from '@/entity/ModelEntity'\r\nimport { CaseItem } from './case'\r\nimport { SceneItemMeta } from './scene'\r\n\r\nexport * from '@/dto/DirPathDto'\r\nexport * from '@/dto/InitCaseCacheDto'\r\nexport * from '@/dto/ModelDto'\r\nexport * from '@/dto/SendMessageDto'\r\nexport * from '@/entity/ModelEntity'\r\nexport * from './case'\r\nexport * from './scene'\r\n\r\n/**\r\n * 基础响应结构\r\n * 所有 API 响应的通用格式\r\n */\r\nexport interface BaseResponse {\r\n /** 状态码,通常 200 表示成功,其他表示错误 */\r\n code: number\r\n /** 响应数据,可选 */\r\n data?:
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts","../src/dto/DirPathDto.ts","../src/dto/InitCaseCacheDto.ts","../src/dto/ModelDto.ts","../src/dto/SendMessageDto.ts","../src/entity/ModelEntity.ts"],"sourcesContent":["import { ModelEntity } from '@/entity/ModelEntity'\r\nimport { CaseItem } from './case'\r\nimport { SceneItemMeta } from './scene'\r\n\r\nexport * from '@/dto/DirPathDto'\r\nexport * from '@/dto/InitCaseCacheDto'\r\nexport * from '@/dto/ModelDto'\r\nexport * from '@/dto/SendMessageDto'\r\nexport * from '@/entity/ModelEntity'\r\nexport * from './case'\r\nexport * from './scene'\r\n\r\n/**\r\n * 基础响应结构\r\n * 所有 API 响应的通用格式\r\n */\r\nexport interface BaseResponse<T = any> {\r\n /** 状态码,通常 200 表示成功,其他表示错误 */\r\n code: number\r\n /** 响应数据,可选 */\r\n data?: T\r\n /** 响应消息或错误描述 */\r\n message: string\r\n}\r\n\r\n/**\r\n * 库树结构响应\r\n * 用于返回层级化的树形结构数据(如目录树、模型库树等)\r\n */\r\nexport interface CaseTreeResponse extends BaseResponse {\r\n /** 树形节点数组 */\r\n data?: CaseItem[]\r\n}\r\n\r\n/**\r\n * 场景详细信息响应\r\n * 通过场景文件夹路径查询并返回场景详细信息\r\n */\r\nexport interface SceneItemMetaResponse extends BaseResponse {\r\n /** 树形节点数组 */\r\n data?: SceneItemMeta\r\n}\r\n\r\n/**\r\n * JSON 文件上传响应\r\n * 用于返回上传后的文件详细信息\r\n */\r\nexport interface UploadFileResponse extends BaseResponse {\r\n /** 上传文件的具体信息 */\r\n data?: UploadFileResponseData\r\n}\r\nexport interface UploadFileResponseData {\r\n /** 原始文件名 */\r\n originalName: string\r\n /** 文件大小(字节) */\r\n size: number\r\n uploadPath: string\r\n unzipPath?: string\r\n}\r\n\r\n/**\r\n * 模型响应\r\n * 用于返回单个模型、模型列表或空值\r\n */\r\nexport interface ModelResponse extends BaseResponse {\r\n /** 模型实体数据,可能是单个对象、数组或 null */\r\n data?: ModelEntity | ModelEntity[] | null\r\n}\r\n\r\n/**\r\n * 模型图片响应\r\n * 用于返回模型图片的 base64 数据\r\n */\r\nexport interface FigureAssetsImageResponse extends BaseResponse {\r\n /** base64格式的图片数据 */\r\n data?: FigureAssetsImageResponseData\r\n}\r\nexport interface FigureAssetsImageResponseData {\r\n base64: string\r\n mimeType: string\r\n fileSize: number\r\n fileName: string\r\n}\r\n","import { ApiProperty } from '@nestjs/swagger'\r\nexport class DirPathDto {\r\n @ApiProperty({ description: '相对路径或绝对路径', default: '/dataset/cases' })\r\n dir!: string\r\n\r\n @ApiProperty({\r\n description: '是否为绝对路径,可选参数',\r\n default: false,\r\n })\r\n isAbsolutePath?: boolean\r\n}\r\n","import { ApiProperty } from '@nestjs/swagger'\r\nimport { DirPathDto } from './DirPathDto'\r\nexport class InitCaseCacheDto {\r\n @ApiProperty({\r\n description:\r\n '目标目录路径(isAbsolutePath 为 false 是相对于后端部署包的根目录\"/dataset/cases\",isAbsolutePath为 true 是绝对路径\"D:\\\\XXX\")',\r\n type: [DirPathDto], // 这里必须指定类型\r\n example: [\r\n {\r\n dir: '/dataset/cases',\r\n isAbsolutePath: false,\r\n },\r\n // ,\r\n // {\r\n // dir: 'D:\\\\test',\r\n // isAbsolutePath: true,\r\n // },\r\n ],\r\n })\r\n dirPaths?: Array<DirPathDto>\r\n\r\n @ApiProperty({\r\n description: '文件名模糊匹配关键词,可选参数',\r\n default: '',\r\n })\r\n fileName?: string\r\n}\r\n","import { ApiProperty } from '@nestjs/swagger'\n\nexport class ModelDto {\n @ApiProperty({ description: '模型名称', default: '' })\n name!: string\n\n @ApiProperty({\n description: '模型文件 URL(相对路径或完整 URL)',\n default: '',\n })\n url!: string\n\n @ApiProperty({\n description: '示意图片 URL(相对路径或完整 URL)',\n default: '',\n })\n imageUrl!: string\n}\n","import { ApiProperty } from '@nestjs/swagger'\r\nimport { IsNotEmpty, IsString } from 'class-validator'\r\nexport class SendMessageDto {\r\n @ApiProperty({ description: '要发送的消息内容' })\r\n @IsString() // 限制必须是字符串\r\n @IsNotEmpty() // 限制不能为空\r\n msg!: string\r\n}\r\n","import {\r\n Entity,\r\n PrimaryGeneratedColumn,\r\n Column,\r\n UpdateDateColumn,\r\n} from 'typeorm'\r\n\r\n@Entity() // 默认映射的数据库表名为 model-entity\r\nexport class ModelEntity {\r\n @PrimaryGeneratedColumn() // 自动生成主键值(不用你手动赋值)\r\n id!: number\r\n\r\n @Column()\r\n name!: string // 模型名称\r\n\r\n @Column()\r\n url!: string // 模型url\r\n\r\n @Column()\r\n imageUrl!: string // 示意图片url\r\n\r\n // 每次执行 save 操作更新该实体时,该字段会自动更新为当前时间戳\r\n @UpdateDateColumn()\r\n updateTime!: Date\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAA4B;AACrB,IAAM,aAAN,MAAiB;AAAA,EAEtB;AAAA,EAMA;AACF;AAPE;AAAA,MADC,4BAAY,EAAE,aAAa,0DAAa,SAAS,iBAAiB,CAAC;AAAA,GADzD,WAEX;AAMA;AAAA,MAJC,4BAAY;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AAAA,GAPU,WAQX;;;ACTF,IAAAA,kBAA4B;AAErB,IAAM,mBAAN,MAAuB;AAAA,EAiB5B;AAAA,EAMA;AACF;AAPE;AAAA,MAhBC,6BAAY;AAAA,IACX,aACE;AAAA,IACF,MAAM,CAAC,UAAU;AAAA;AAAA,IACjB,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,gBAAgB;AAAA,MAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMF;AAAA,EACF,CAAC;AAAA,GAhBU,iBAiBX;AAMA;AAAA,MAJC,6BAAY;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AAAA,GAtBU,iBAuBX;;;ACzBF,IAAAC,kBAA4B;AAErB,IAAM,WAAN,MAAe;AAAA,EAEpB;AAAA,EAMA;AAAA,EAMA;AACF;AAbE;AAAA,MADC,6BAAY,EAAE,aAAa,4BAAQ,SAAS,GAAG,CAAC;AAAA,GADtC,SAEX;AAMA;AAAA,MAJC,6BAAY;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AAAA,GAPU,SAQX;AAMA;AAAA,MAJC,6BAAY;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AAAA,GAbU,SAcX;;;AChBF,IAAAC,kBAA4B;AAC5B,6BAAqC;AAC9B,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAI1B;AACF;AADE;AAAA,MAHC,6BAAY,EAAE,aAAa,mDAAW,CAAC;AAAA,MACvC,iCAAS;AAAA,MACT,mCAAW;AAAA,GAHD,eAIX;;;ACNF,qBAKO;AAGA,IAAM,cAAN,MAAkB;AAAA;AAAA,EAEvB;AAAA,EAGA;AAAA,EAGA;AAAA,EAGA;AAAA,EAIA;AACF;AAdE;AAAA,MADC,uCAAuB;AAAA,GADb,YAEX;AAGA;AAAA,MADC,uBAAO;AAAA,GAJG,YAKX;AAGA;AAAA,MADC,uBAAO;AAAA,GAPG,YAQX;AAGA;AAAA,MADC,uBAAO;AAAA,GAVG,YAWX;AAIA;AAAA,MADC,iCAAiB;AAAA,GAdP,YAeX;AAfW,cAAN;AAAA,MADN,uBAAO;AAAA,GACK;","names":["import_swagger","import_swagger","import_swagger"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snss-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"label": "卫星网络仿真文件解析数据传输服务",
|
|
5
5
|
"description": "基于 Nestjs 的 服务端接口,提供文件数据处理解析传输等服务接口",
|
|
6
6
|
"private": false,
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"dev": "nest start --watch",
|
|
16
16
|
"build:server": "nest build",
|
|
17
|
+
"start": "node dist/src/main.js",
|
|
17
18
|
"build:types": "tsup --config tsup.config.ts",
|
|
18
19
|
"publish:types": "npm publish",
|
|
19
|
-
"start": "node dist/src/main.js",
|
|
20
20
|
"pm2:start": "npx pm2 start ecosystem.config.js --name nest-app",
|
|
21
21
|
"pm2:save": "npx pm2 save",
|
|
22
22
|
"pm2:list": "npx pm2 list",
|
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
"@nestjs/common": "^11.0.17",
|
|
34
34
|
"@nestjs/config": "^4.0.4",
|
|
35
35
|
"@nestjs/core": "^11.1.21",
|
|
36
|
+
"@nestjs/event-emitter": "^3.1.0",
|
|
36
37
|
"@nestjs/platform-express": "^11.1.11",
|
|
37
38
|
"@nestjs/platform-socket.io": "^11.1.19",
|
|
38
39
|
"@nestjs/platform-ws": "^11.1.19",
|
|
39
40
|
"@nestjs/swagger": "^11.4.2",
|
|
40
41
|
"@nestjs/typeorm": "^11.0.1",
|
|
41
42
|
"@nestjs/websockets": "^11.1.19",
|
|
43
|
+
"class-transformer": "^0.5.1",
|
|
42
44
|
"class-validator": "^0.15.1",
|
|
43
45
|
"cross-zip": "^4.0.1",
|
|
44
46
|
"dotenv": "^17.4.2",
|
|
@@ -85,4 +87,4 @@
|
|
|
85
87
|
"@swc/core"
|
|
86
88
|
]
|
|
87
89
|
}
|
|
88
|
-
}
|
|
90
|
+
}
|