@solidxai/core 0.1.23-beta.0 → 0.1.23-beta.1

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 (63) hide show
  1. package/CHANGELOG.md +803 -0
  2. package/dist/controllers/agent-config-version.controller.d.ts +29 -0
  3. package/dist/controllers/agent-config-version.controller.d.ts.map +1 -1
  4. package/dist/controllers/agent-config-version.controller.js +1 -1
  5. package/dist/controllers/agent-config-version.controller.js.map +1 -1
  6. package/dist/dtos/create-sms-template.dto.d.ts +1 -0
  7. package/dist/dtos/create-sms-template.dto.d.ts.map +1 -1
  8. package/dist/dtos/create-sms-template.dto.js +8 -1
  9. package/dist/dtos/create-sms-template.dto.js.map +1 -1
  10. package/dist/dtos/update-sms-template.dto.d.ts +1 -0
  11. package/dist/dtos/update-sms-template.dto.d.ts.map +1 -1
  12. package/dist/dtos/update-sms-template.dto.js +7 -1
  13. package/dist/dtos/update-sms-template.dto.js.map +1 -1
  14. package/dist/entities/sms-template.entity.d.ts +1 -0
  15. package/dist/entities/sms-template.entity.d.ts.map +1 -1
  16. package/dist/entities/sms-template.entity.js +6 -1
  17. package/dist/entities/sms-template.entity.js.map +1 -1
  18. package/dist/helpers/agent-general-config-comparison.d.ts +35 -0
  19. package/dist/helpers/agent-general-config-comparison.d.ts.map +1 -0
  20. package/dist/helpers/agent-general-config-comparison.js +27 -0
  21. package/dist/helpers/agent-general-config-comparison.js.map +1 -0
  22. package/dist/helpers/agent-general-config-comparison.spec.d.ts +2 -0
  23. package/dist/helpers/agent-general-config-comparison.spec.d.ts.map +1 -0
  24. package/dist/helpers/agent-general-config-comparison.spec.js +42 -0
  25. package/dist/helpers/agent-general-config-comparison.spec.js.map +1 -0
  26. package/dist/helpers/agent-tool-comparison.d.ts +40 -0
  27. package/dist/helpers/agent-tool-comparison.d.ts.map +1 -0
  28. package/dist/helpers/agent-tool-comparison.js +78 -0
  29. package/dist/helpers/agent-tool-comparison.js.map +1 -0
  30. package/dist/helpers/agent-tool-comparison.spec.d.ts +2 -0
  31. package/dist/helpers/agent-tool-comparison.spec.d.ts.map +1 -0
  32. package/dist/helpers/agent-tool-comparison.spec.js +61 -0
  33. package/dist/helpers/agent-tool-comparison.spec.js.map +1 -0
  34. package/dist/seeders/seed-data/solid-core-metadata.json +30 -0
  35. package/dist/services/agent-config-version-record.service.d.ts +30 -0
  36. package/dist/services/agent-config-version-record.service.d.ts.map +1 -1
  37. package/dist/services/agent-config-version-record.service.js +112 -7
  38. package/dist/services/agent-config-version-record.service.js.map +1 -1
  39. package/dist/services/agent-config-version-record.service.spec.d.ts +2 -0
  40. package/dist/services/agent-config-version-record.service.spec.d.ts.map +1 -0
  41. package/dist/services/agent-config-version-record.service.spec.js +56 -0
  42. package/dist/services/agent-config-version-record.service.spec.js.map +1 -0
  43. package/dist/services/agent-registry-deployment.spec.d.ts +2 -0
  44. package/dist/services/agent-registry-deployment.spec.d.ts.map +1 -0
  45. package/dist/services/agent-registry-deployment.spec.js +41 -0
  46. package/dist/services/agent-registry-deployment.spec.js.map +1 -0
  47. package/dist/services/agent-registry.service.d.ts.map +1 -1
  48. package/dist/services/agent-registry.service.js +3 -2
  49. package/dist/services/agent-registry.service.js.map +1 -1
  50. package/package.json +1 -1
  51. package/src/controllers/agent-config-version.controller.ts +1 -1
  52. package/src/dtos/create-sms-template.dto.ts +5 -0
  53. package/src/dtos/update-sms-template.dto.ts +5 -0
  54. package/src/entities/sms-template.entity.ts +2 -0
  55. package/src/helpers/agent-general-config-comparison.spec.ts +42 -0
  56. package/src/helpers/agent-general-config-comparison.ts +27 -0
  57. package/src/helpers/agent-tool-comparison.spec.ts +61 -0
  58. package/src/helpers/agent-tool-comparison.ts +71 -0
  59. package/src/seeders/seed-data/solid-core-metadata.json +30 -0
  60. package/src/services/agent-config-version-record.service.spec.ts +54 -0
  61. package/src/services/agent-config-version-record.service.ts +114 -9
  62. package/src/services/agent-registry-deployment.spec.ts +37 -0
  63. package/src/services/agent-registry.service.ts +5 -2
@@ -46,6 +46,35 @@ export declare class AgentConfigVersionController {
46
46
  status: string;
47
47
  rows: any[];
48
48
  };
49
+ tools: {
50
+ title: string;
51
+ status: string;
52
+ rows: {
53
+ id: string;
54
+ status: string;
55
+ diffKey: string;
56
+ left: {
57
+ label: string;
58
+ summary: string;
59
+ };
60
+ right: {
61
+ label: string;
62
+ summary: string;
63
+ };
64
+ }[];
65
+ };
66
+ generalConfiguration: {
67
+ title: string;
68
+ status: string;
69
+ fields: {
70
+ key: string;
71
+ label: string;
72
+ status: string;
73
+ left: string;
74
+ right: string;
75
+ emptyLabel: string;
76
+ }[];
77
+ };
49
78
  modelConfiguration: {
50
79
  title: string;
51
80
  status: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-config-version.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/agent-config-version.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAElG,qBAEa,4BAA4B;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,+BAA+B;IAOrE,OAAO,CAC6B,OAAO,EAAE,MAAM,EACT,aAAa,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWjE,cAAc,CACsB,OAAO,EAAE,MAAM,EACT,aAAa,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EAC3C,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAQrC,MAAM,CAAS,GAAG,EAAE,2BAA2B,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAOnG,UAAU,CAAS,IAAI,EAAE,2BAA2B,EAAE,EAAmB,KAAK,GAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,EAAO;IAO5G,MAAM,CAAc,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,2BAA2B,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAO5H,aAAa,CAAc,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,2BAA2B,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAMnI,WAAW,CAAS,GAAG,EAAE,MAAM,EAAE;;;;IAMjC,OAAO,CAAc,EAAE,EAAE,MAAM;;;;IAe/B,QAAQ,CAAU,KAAK,EAAE,GAAG;IAM5B,OAAO,CAAc,EAAE,EAAE,MAAM,EAAW,KAAK,EAAE,GAAG;IAMpD,UAAU,CAAS,GAAG,EAAE,MAAM,EAAE;IAMhC,MAAM,CAAc,EAAE,EAAE,MAAM;CAGjC"}
1
+ {"version":3,"file":"agent-config-version.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/agent-config-version.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAElG,qBAEa,4BAA4B;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,+BAA+B;IAOrE,OAAO,CAC6B,OAAO,EAAE,MAAM,EACT,aAAa,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWjE,cAAc,CACsB,OAAO,EAAE,MAAM,EACT,aAAa,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EAC3C,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAQrC,MAAM,CAAS,GAAG,EAAE,2BAA2B,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAOnG,UAAU,CAAS,IAAI,EAAE,2BAA2B,EAAE,EAAmB,KAAK,GAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,EAAO;IAO5G,MAAM,CAAc,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,2BAA2B,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAO5H,aAAa,CAAc,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,2BAA2B,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAMnI,WAAW,CAAS,GAAG,EAAE,MAAM,EAAE;;;;IAMjC,OAAO,CAAc,EAAE,EAAE,MAAM;;;;IAe/B,QAAQ,CAAU,KAAK,EAAE,GAAG;IAM5B,OAAO,CAAc,EAAE,EAAE,MAAM,EAAW,KAAK,EAAE,GAAG;IAMpD,UAAU,CAAS,GAAG,EAAE,MAAM,EAAE;IAMhC,MAAM,CAAc,EAAE,EAAE,MAAM;CAGjC"}
@@ -82,7 +82,7 @@ __decorate([
82
82
  (0, swagger_1.ApiQuery)({ name: 'agentId', type: Number }),
83
83
  (0, swagger_1.ApiQuery)({ name: 'leftVersionId', type: Number }),
84
84
  (0, swagger_1.ApiQuery)({ name: 'rightVersionId', type: Number }),
85
- (0, swagger_1.ApiQuery)({ name: 'diffKey', type: String, description: 'systemPrompt or skill:<catalog skill ID>' }),
85
+ (0, swagger_1.ApiQuery)({ name: 'diffKey', type: String, description: 'systemPrompt, skill:<catalog skill ID>, or tool:<catalog tool ID>' }),
86
86
  (0, common_1.Get)('compare/diff'),
87
87
  openapi.ApiResponse({ status: 200, type: Object }),
88
88
  __param(0, (0, common_1.Query)('agentId', common_1.ParseIntPipe)),
@@ -1 +1 @@
1
- {"version":3,"file":"agent-config-version.controller.js","sourceRoot":"","sources":["../../src/controllers/agent-config-version.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA6I;AAC7I,+DAA+D;AAC/D,6CAAmE;AACnE,6FAAsF;AACtF,6FAAsF;AACtF,4EAAkE;AAClE,yGAAkG;AAI3F,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC,YAA6B,OAAwC;QAAxC,YAAO,GAAP,OAAO,CAAiC;IAAG,CAAC;IAOzE,OAAO,CAC6B,OAAe,EACT,aAAqB,EACpB,cAAsB;QAE7D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;IAC9E,CAAC;IAQD,cAAc,CACsB,OAAe,EACT,aAAqB,EACpB,cAAsB,EAC3C,OAAe;QAEjC,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAKD,MAAM,CAAS,GAAgC,EAAmB,KAAiC;QAC/F,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAKD,UAAU,CAAS,IAAmC,EAAmB,QAAiC,EAAE;QACxG,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChD,CAAC;IAKD,MAAM,CAAc,EAAU,EAAU,GAAgC,EAAmB,KAAiC;QACxH,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAKD,aAAa,CAAc,EAAU,EAAU,GAAgC,EAAmB,KAAiC;QAC/H,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;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A4B,CAuGxC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch, ParseIntPipe } from '@nestjs/common';\nimport { AnyFilesInterceptor } from '@nestjs/platform-express';\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { CreateAgentConfigVersionDto } from '../dtos/create-agent-config-version.dto';\nimport { UpdateAgentConfigVersionDto } from '../dtos/update-agent-config-version.dto';\nimport { ShowSoftDeleted } from '../enums/show-soft-deleted.enum';\nimport { AgentConfigVersionRecordService } from '../services/agent-config-version-record.service';\n\n@ApiTags('Agent Hub')\n@Controller('agent-config-version')\nexport class AgentConfigVersionController {\n constructor(private readonly service: AgentConfigVersionRecordService) {}\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'agentId', type: Number })\n @ApiQuery({ name: 'leftVersionId', type: Number })\n @ApiQuery({ name: 'rightVersionId', type: Number })\n @Get('compare')\n compare(\n @Query('agentId', ParseIntPipe) agentId: number,\n @Query('leftVersionId', ParseIntPipe) leftVersionId: number,\n @Query('rightVersionId', ParseIntPipe) rightVersionId: number,\n ) {\n return this.service.getComparison(agentId, leftVersionId, rightVersionId);\n }\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'agentId', type: Number })\n @ApiQuery({ name: 'leftVersionId', type: Number })\n @ApiQuery({ name: 'rightVersionId', type: Number })\n @ApiQuery({ name: 'diffKey', type: String, description: 'systemPrompt or skill:<catalog skill ID>' })\n @Get('compare/diff')\n comparisonDiff(\n @Query('agentId', ParseIntPipe) agentId: number,\n @Query('leftVersionId', ParseIntPipe) leftVersionId: number,\n @Query('rightVersionId', ParseIntPipe) rightVersionId: number,\n @Query('diffKey') diffKey: string,\n ) {\n return this.service.getComparisonDiff(agentId, leftVersionId, rightVersionId, diffKey);\n }\n\n @ApiBearerAuth('jwt')\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() dto: CreateAgentConfigVersionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.create(dto, files);\n }\n\n @ApiBearerAuth('jwt')\n @Post('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n insertMany(@Body() dtos: CreateAgentConfigVersionDto[], @UploadedFiles() files: Express.Multer.File[][] = []) {\n return this.service.insertMany(dtos, files);\n }\n\n @ApiBearerAuth('jwt')\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() dto: UpdateAgentConfigVersionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, dto, files);\n }\n\n @ApiBearerAuth('jwt')\n @Patch(':id')\n @UseInterceptors(AnyFilesInterceptor())\n partialUpdate(@Param('id') id: number, @Body() dto: UpdateAgentConfigVersionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, dto, files, true);\n }\n\n @ApiBearerAuth('jwt')\n @Post('/bulk-recover')\n recoverMany(@Body() ids: number[]) {\n return this.service.recoverMany(ids);\n }\n\n @ApiBearerAuth('jwt')\n @Get('/recover/:id')\n recover(@Param('id') id: number) {\n return this.service.recover(id);\n }\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n findMany(@Query() query: any) {\n return this.service.find(query);\n }\n\n @ApiBearerAuth('jwt')\n @Get(':id')\n findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n @ApiBearerAuth('jwt')\n @Delete('/bulk')\n deleteMany(@Body() ids: number[]) {\n return this.service.deleteMany(ids);\n }\n\n @ApiBearerAuth('jwt')\n @Delete(':id')\n delete(@Param('id') id: number) {\n return this.service.delete(id);\n }\n}\n"]}
1
+ {"version":3,"file":"agent-config-version.controller.js","sourceRoot":"","sources":["../../src/controllers/agent-config-version.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA6I;AAC7I,+DAA+D;AAC/D,6CAAmE;AACnE,6FAAsF;AACtF,6FAAsF;AACtF,4EAAkE;AAClE,yGAAkG;AAI3F,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC,YAA6B,OAAwC;QAAxC,YAAO,GAAP,OAAO,CAAiC;IAAG,CAAC;IAOzE,OAAO,CAC6B,OAAe,EACT,aAAqB,EACpB,cAAsB;QAE7D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;IAC9E,CAAC;IAQD,cAAc,CACsB,OAAe,EACT,aAAqB,EACpB,cAAsB,EAC3C,OAAe;QAEjC,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAKD,MAAM,CAAS,GAAgC,EAAmB,KAAiC;QAC/F,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAKD,UAAU,CAAS,IAAmC,EAAmB,QAAiC,EAAE;QACxG,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChD,CAAC;IAKD,MAAM,CAAc,EAAU,EAAU,GAAgC,EAAmB,KAAiC;QACxH,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAKD,aAAa,CAAc,EAAU,EAAU,GAAgC,EAAmB,KAAiC;QAC/H,OAAO,IAAI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,IAAA,iBAAO,EAAC,WAAW,CAAC;IACpB,IAAA,mBAAU,EAAC,sBAAsB,CAAC;qCAEO,qEAA+B;GAD5D,4BAA4B,CAuGxC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch, ParseIntPipe } from '@nestjs/common';\nimport { AnyFilesInterceptor } from '@nestjs/platform-express';\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { CreateAgentConfigVersionDto } from '../dtos/create-agent-config-version.dto';\nimport { UpdateAgentConfigVersionDto } from '../dtos/update-agent-config-version.dto';\nimport { ShowSoftDeleted } from '../enums/show-soft-deleted.enum';\nimport { AgentConfigVersionRecordService } from '../services/agent-config-version-record.service';\n\n@ApiTags('Agent Hub')\n@Controller('agent-config-version')\nexport class AgentConfigVersionController {\n constructor(private readonly service: AgentConfigVersionRecordService) {}\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'agentId', type: Number })\n @ApiQuery({ name: 'leftVersionId', type: Number })\n @ApiQuery({ name: 'rightVersionId', type: Number })\n @Get('compare')\n compare(\n @Query('agentId', ParseIntPipe) agentId: number,\n @Query('leftVersionId', ParseIntPipe) leftVersionId: number,\n @Query('rightVersionId', ParseIntPipe) rightVersionId: number,\n ) {\n return this.service.getComparison(agentId, leftVersionId, rightVersionId);\n }\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'agentId', type: Number })\n @ApiQuery({ name: 'leftVersionId', type: Number })\n @ApiQuery({ name: 'rightVersionId', type: Number })\n @ApiQuery({ name: 'diffKey', type: String, description: 'systemPrompt, skill:<catalog skill ID>, or tool:<catalog tool ID>' })\n @Get('compare/diff')\n comparisonDiff(\n @Query('agentId', ParseIntPipe) agentId: number,\n @Query('leftVersionId', ParseIntPipe) leftVersionId: number,\n @Query('rightVersionId', ParseIntPipe) rightVersionId: number,\n @Query('diffKey') diffKey: string,\n ) {\n return this.service.getComparisonDiff(agentId, leftVersionId, rightVersionId, diffKey);\n }\n\n @ApiBearerAuth('jwt')\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() dto: CreateAgentConfigVersionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.create(dto, files);\n }\n\n @ApiBearerAuth('jwt')\n @Post('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n insertMany(@Body() dtos: CreateAgentConfigVersionDto[], @UploadedFiles() files: Express.Multer.File[][] = []) {\n return this.service.insertMany(dtos, files);\n }\n\n @ApiBearerAuth('jwt')\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() dto: UpdateAgentConfigVersionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, dto, files);\n }\n\n @ApiBearerAuth('jwt')\n @Patch(':id')\n @UseInterceptors(AnyFilesInterceptor())\n partialUpdate(@Param('id') id: number, @Body() dto: UpdateAgentConfigVersionDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, dto, files, true);\n }\n\n @ApiBearerAuth('jwt')\n @Post('/bulk-recover')\n recoverMany(@Body() ids: number[]) {\n return this.service.recoverMany(ids);\n }\n\n @ApiBearerAuth('jwt')\n @Get('/recover/:id')\n recover(@Param('id') id: number) {\n return this.service.recover(id);\n }\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n findMany(@Query() query: any) {\n return this.service.find(query);\n }\n\n @ApiBearerAuth('jwt')\n @Get(':id')\n findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n @ApiBearerAuth('jwt')\n @Delete('/bulk')\n deleteMany(@Body() ids: number[]) {\n return this.service.deleteMany(ids);\n }\n\n @ApiBearerAuth('jwt')\n @Delete(':id')\n delete(@Param('id') id: number) {\n return this.service.delete(id);\n }\n}\n"]}
@@ -6,6 +6,7 @@ export declare class CreateSmsTemplateDto {
6
6
  description: string;
7
7
  active: boolean;
8
8
  type: string;
9
+ isTransactional: boolean;
9
10
  moduleId?: number;
10
11
  moduleUserKey?: string;
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-sms-template.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-sms-template.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAK7B,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAKpB,IAAI,EAAE,MAAM,CAAC;IAKb,qBAAqB,EAAE,MAAM,CAAC;IAK9B,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,OAAO,CAAQ;IAKvB,IAAI,EAAE,MAAM,CAAC;IAKb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
1
+ {"version":3,"file":"create-sms-template.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-sms-template.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAK7B,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAKpB,IAAI,EAAE,MAAM,CAAC;IAKb,qBAAqB,EAAE,MAAM,CAAC;IAK9B,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,OAAO,CAAQ;IAKvB,IAAI,EAAE,MAAM,CAAC;IAKb,eAAe,EAAE,OAAO,CAAS;IAKjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -16,9 +16,10 @@ const swagger_1 = require("@nestjs/swagger");
16
16
  class CreateSmsTemplateDto {
17
17
  constructor() {
18
18
  this.active = true;
19
+ this.isTransactional = false;
19
20
  }
20
21
  static _OPENAPI_METADATA_FACTORY() {
21
- return { name: { required: true, type: () => String, pattern: "/[a-z]+(-[a-z]+)*/" }, displayName: { required: true, type: () => String }, body: { required: true, type: () => String }, smsProviderTemplateId: { required: true, type: () => String }, description: { required: true, type: () => String }, active: { required: true, type: () => Boolean, default: true }, type: { required: true, type: () => String }, moduleId: { required: false, type: () => Number }, moduleUserKey: { required: false, type: () => String } };
22
+ return { name: { required: true, type: () => String, pattern: "/[a-z]+(-[a-z]+)*/" }, displayName: { required: true, type: () => String }, body: { required: true, type: () => String }, smsProviderTemplateId: { required: true, type: () => String }, description: { required: true, type: () => String }, active: { required: true, type: () => Boolean, default: true }, type: { required: true, type: () => String }, isTransactional: { required: true, type: () => Boolean, default: false }, moduleId: { required: false, type: () => Number }, moduleUserKey: { required: false, type: () => String } };
22
23
  }
23
24
  }
24
25
  exports.CreateSmsTemplateDto = CreateSmsTemplateDto;
@@ -65,6 +66,12 @@ __decorate([
65
66
  (0, swagger_1.ApiProperty)(),
66
67
  __metadata("design:type", String)
67
68
  ], CreateSmsTemplateDto.prototype, "type", void 0);
69
+ __decorate([
70
+ (0, class_validator_1.IsOptional)(),
71
+ (0, class_validator_1.IsBoolean)(),
72
+ (0, swagger_1.ApiProperty)({ required: false }),
73
+ __metadata("design:type", Boolean)
74
+ ], CreateSmsTemplateDto.prototype, "isTransactional", void 0);
68
75
  __decorate([
69
76
  (0, class_validator_1.IsOptional)(),
70
77
  (0, class_validator_1.IsInt)(),
@@ -1 +1 @@
1
- {"version":3,"file":"create-sms-template.dto.js","sourceRoot":"","sources":["../../src/dtos/create-sms-template.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA6H;AAC7H,6CAA8C;AAE9C,MAAa,oBAAoB;IAAjC;QA8BI,WAAM,GAAY,IAAI,CAAC;KAgB1B;;6WAhBqB,IAAI;;CAgBzB;AA9CD,oDA8CC;AAzCG;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,kBAAkB,CAAC;IAC3B,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;mEACgB;AAK9B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,qBAAW,GAAE;;oDACS;AAKvB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;;sDACjD;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;2DAClD","sourcesContent":["import { IsEmail, IsNotEmpty, IsOptional, MaxLength, MinLength, IsString, Matches, IsBoolean, IsInt } from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\n\nexport class CreateSmsTemplateDto {\n @IsNotEmpty()\n @Matches(/[a-z]+(-[a-z]+)*/)\n @IsString()\n @ApiProperty()\n name: string;\n\n @IsNotEmpty()\n @IsString()\n @ApiProperty()\n displayName: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n body: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n smsProviderTemplateId: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n description: string;\n\n @IsOptional()\n @IsBoolean()\n @ApiProperty()\n active: boolean = true;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n type: string;\n\n @IsOptional()\n @IsInt()\n @ApiProperty({ required: false, description: 'Related module id' })\n moduleId?: number;\n\n @IsOptional()\n @IsString()\n @ApiProperty({ required: false, description: 'Related module user key' })\n moduleUserKey?: string;\n}\n"]}
1
+ {"version":3,"file":"create-sms-template.dto.js","sourceRoot":"","sources":["../../src/dtos/create-sms-template.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA6H;AAC7H,6CAA8C;AAE9C,MAAa,oBAAoB;IAAjC;QA8BI,WAAM,GAAY,IAAI,CAAC;QAUvB,oBAAe,GAAY,KAAK,CAAC;KAWpC;;6WArBqB,IAAI,mHAUK,KAAK;;CAWnC;AAnDD,oDAmDC;AA9CG;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,kBAAkB,CAAC;IAC3B,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;mEACgB;AAK9B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,qBAAW,GAAE;;oDACS;AAKvB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6DACA;AAKjC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;;sDACjD;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;2DAClD","sourcesContent":["import { IsEmail, IsNotEmpty, IsOptional, MaxLength, MinLength, IsString, Matches, IsBoolean, IsInt } from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\n\nexport class CreateSmsTemplateDto {\n @IsNotEmpty()\n @Matches(/[a-z]+(-[a-z]+)*/)\n @IsString()\n @ApiProperty()\n name: string;\n\n @IsNotEmpty()\n @IsString()\n @ApiProperty()\n displayName: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n body: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n smsProviderTemplateId: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n description: string;\n\n @IsOptional()\n @IsBoolean()\n @ApiProperty()\n active: boolean = true;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n type: string;\n\n @IsOptional()\n @IsBoolean()\n @ApiProperty({ required: false })\n isTransactional: boolean = false;\n\n @IsOptional()\n @IsInt()\n @ApiProperty({ required: false, description: 'Related module id' })\n moduleId?: number;\n\n @IsOptional()\n @IsString()\n @ApiProperty({ required: false, description: 'Related module user key' })\n moduleUserKey?: string;\n}\n"]}
@@ -8,6 +8,7 @@ export declare class UpdateSmsTemplateDto extends UpdateSmsTemplateDto_base {
8
8
  body: string;
9
9
  description: string;
10
10
  active: boolean;
11
+ isTransactional: boolean;
11
12
  }
12
13
  export {};
13
14
  //# sourceMappingURL=update-sms-template.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-sms-template.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-sms-template.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;;AAIjE,qBAAa,oBAAqB,SAAQ,yBAAiC;IAIvE,IAAI,EAAE,MAAM,CAAC;IAOb,IAAI,EAAE,MAAM,CAAC;IAKb,qBAAqB,EAAE,MAAM,CAAC;IAM9B,WAAW,EAAE,MAAM,CAAC;IAKpB,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,OAAO,CAAC;CACnB"}
1
+ {"version":3,"file":"update-sms-template.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-sms-template.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;;AAIjE,qBAAa,oBAAqB,SAAQ,yBAAiC;IAIvE,IAAI,EAAE,MAAM,CAAC;IAOb,IAAI,EAAE,MAAM,CAAC;IAKb,qBAAqB,EAAE,MAAM,CAAC;IAM9B,WAAW,EAAE,MAAM,CAAC;IAKpB,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,OAAO,CAAC;IAKhB,eAAe,EAAE,OAAO,CAAC;CAC5B"}
@@ -17,7 +17,7 @@ const class_validator_1 = require("class-validator");
17
17
  const class_validator_2 = require("class-validator");
18
18
  class UpdateSmsTemplateDto extends (0, swagger_1.PartialType)(create_sms_template_dto_1.CreateSmsTemplateDto) {
19
19
  static _OPENAPI_METADATA_FACTORY() {
20
- return { type: { required: true, type: () => String }, name: { required: true, type: () => String, pattern: "/[a-z]+(-[a-z]+)*/" }, smsProviderTemplateId: { required: true, type: () => String }, displayName: { required: true, type: () => String }, body: { required: true, type: () => String }, description: { required: true, type: () => String }, active: { required: true, type: () => Boolean } };
20
+ return { type: { required: true, type: () => String }, name: { required: true, type: () => String, pattern: "/[a-z]+(-[a-z]+)*/" }, smsProviderTemplateId: { required: true, type: () => String }, displayName: { required: true, type: () => String }, body: { required: true, type: () => String }, description: { required: true, type: () => String }, active: { required: true, type: () => Boolean }, isTransactional: { required: true, type: () => Boolean } };
21
21
  }
22
22
  }
23
23
  exports.UpdateSmsTemplateDto = UpdateSmsTemplateDto;
@@ -66,5 +66,11 @@ __decorate([
66
66
  (0, swagger_1.ApiProperty)(),
67
67
  __metadata("design:type", Boolean)
68
68
  ], UpdateSmsTemplateDto.prototype, "active", void 0);
69
+ __decorate([
70
+ (0, class_validator_2.IsOptional)(),
71
+ (0, class_validator_2.IsBoolean)(),
72
+ (0, swagger_1.ApiProperty)({ required: false }),
73
+ __metadata("design:type", Boolean)
74
+ ], UpdateSmsTemplateDto.prototype, "isTransactional", void 0);
69
75
  { }
70
76
  //# sourceMappingURL=update-sms-template.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-sms-template.dto.js","sourceRoot":"","sources":["../../src/dtos/update-sms-template.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA2D;AAC3D,uEAAiE;AACjE,qDAA2C;AAC3C,qDAA6E;AAE7E,MAAa,oBAAqB,SAAQ,IAAA,qBAAW,EAAC,8CAAoB,CAAC;;;;CAsC1E;AAtCD,oDAsCC;AAlCG;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAOb;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,kBAAkB,CAAC;IAC3B,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;mEACgB;AAM9B;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,qBAAW,GAAE;;oDACE;AAClB,CAAC,CAAC,CAAC","sourcesContent":["import { PartialType, ApiProperty } from '@nestjs/swagger';\nimport { CreateSmsTemplateDto } from './create-sms-template.dto';\nimport { IsString } from 'class-validator';\nimport { IsOptional, Matches, IsNotEmpty, IsBoolean } from 'class-validator';\n\nexport class UpdateSmsTemplateDto extends PartialType(CreateSmsTemplateDto) {\n @IsOptional()\n @IsString()\n @ApiProperty()\n type: string;\n\n @IsNotEmpty()\n @IsOptional()\n @Matches(/[a-z]+(-[a-z]+)*/)\n @IsString()\n @ApiProperty()\n name: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n smsProviderTemplateId: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n displayName: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n body: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n description: string;\n\n @IsOptional()\n @IsBoolean()\n @ApiProperty()\n active: boolean;\n} { }\n"]}
1
+ {"version":3,"file":"update-sms-template.dto.js","sourceRoot":"","sources":["../../src/dtos/update-sms-template.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA2D;AAC3D,uEAAiE;AACjE,qDAA2C;AAC3C,qDAA6E;AAE7E,MAAa,oBAAqB,SAAQ,IAAA,qBAAW,EAAC,8CAAoB,CAAC;;;;CA2C1E;AA3CD,oDA2CC;AAvCG;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAOb;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,kBAAkB,CAAC;IAC3B,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;mEACgB;AAM9B;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;kDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,qBAAW,GAAE;;oDACE;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6DACR;AAC3B,CAAC,CAAC,CAAC","sourcesContent":["import { PartialType, ApiProperty } from '@nestjs/swagger';\nimport { CreateSmsTemplateDto } from './create-sms-template.dto';\nimport { IsString } from 'class-validator';\nimport { IsOptional, Matches, IsNotEmpty, IsBoolean } from 'class-validator';\n\nexport class UpdateSmsTemplateDto extends PartialType(CreateSmsTemplateDto) {\n @IsOptional()\n @IsString()\n @ApiProperty()\n type: string;\n\n @IsNotEmpty()\n @IsOptional()\n @Matches(/[a-z]+(-[a-z]+)*/)\n @IsString()\n @ApiProperty()\n name: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n smsProviderTemplateId: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n displayName: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n body: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n description: string;\n\n @IsOptional()\n @IsBoolean()\n @ApiProperty()\n active: boolean;\n\n @IsOptional()\n @IsBoolean()\n @ApiProperty({ required: false })\n isTransactional: boolean;\n} { }\n"]}
@@ -8,6 +8,7 @@ export declare class SmsTemplate extends CommonEntity {
8
8
  description: string;
9
9
  active: boolean;
10
10
  type: string;
11
+ isTransactional: boolean;
11
12
  module: ModuleMetadata;
12
13
  }
13
14
  //# sourceMappingURL=sms-template.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sms-template.entity.d.ts","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBACa,WAAY,SAAQ,YAAY;IAGzC,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,qBAAqB,EAAE,MAAM,CAAC;IAE9B,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,OAAO,CAAQ;IAEvB,IAAI,EAAE,MAAM,CAAC;IAKb,MAAM,EAAE,cAAc,CAAC;CAC1B"}
1
+ {"version":3,"file":"sms-template.entity.d.ts","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBACa,WAAY,SAAQ,YAAY;IAGzC,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,qBAAqB,EAAE,MAAM,CAAC;IAE9B,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,OAAO,CAAQ;IAEvB,IAAI,EAAE,MAAM,CAAC;IAEb,eAAe,EAAE,OAAO,CAAS;IAKjC,MAAM,EAAE,cAAc,CAAC;CAC1B"}
@@ -19,9 +19,10 @@ let SmsTemplate = class SmsTemplate extends common_entity_1.CommonEntity {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.active = true;
22
+ this.isTransactional = false;
22
23
  }
23
24
  static _OPENAPI_METADATA_FACTORY() {
24
- return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, body: { required: true, type: () => String }, smsProviderTemplateId: { required: true, type: () => String }, description: { required: true, type: () => String }, active: { required: true, type: () => Boolean, default: true }, type: { required: true, type: () => String }, module: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata } };
25
+ return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, body: { required: true, type: () => String }, smsProviderTemplateId: { required: true, type: () => String }, description: { required: true, type: () => String }, active: { required: true, type: () => Boolean, default: true }, type: { required: true, type: () => String }, isTransactional: { required: true, type: () => Boolean, default: false }, module: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata } };
25
26
  }
26
27
  };
27
28
  exports.SmsTemplate = SmsTemplate;
@@ -56,6 +57,10 @@ __decorate([
56
57
  (0, typeorm_1.Column)({ name: "type", type: "varchar", nullable: true }),
57
58
  __metadata("design:type", String)
58
59
  ], SmsTemplate.prototype, "type", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ name: "is_transactional", type: "boolean", nullable: true, default: false }),
62
+ __metadata("design:type", Boolean)
63
+ ], SmsTemplate.prototype, "isTransactional", void 0);
59
64
  __decorate([
60
65
  (0, typeorm_1.Index)(),
61
66
  (0, typeorm_1.ManyToOne)(() => module_metadata_entity_1.ModuleMetadata, { nullable: true, onDelete: 'SET NULL' }),
@@ -1 +1 @@
1
- {"version":3,"file":"sms-template.entity.js","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,oEAA8D;AAC9D,qEAA0D;AAGnD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4BAAY;IAAtC;;QAeH,WAAM,GAAY,IAAI,CAAC;KAQ1B;;8UARqB,IAAI;;CAQzB,CAAA;AAvBY,kCAAW;AAGpB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yCAC7B;AAGb;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gDAC9B;AAEpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1D;AAGb;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACd;AAE9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC5B;AAEpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACnC;AAEvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC7C;AAKb;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACzE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,uCAAc;2CAAC;sBAtBd,WAAW;IADvB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,WAAW,CAuBvB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Column, Entity, Index, ManyToOne, JoinColumn } from 'typeorm';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\nimport { ModuleMetadata } from './module-metadata.entity';\n\n@Entity(\"ss_sms_template\")\nexport class SmsTemplate extends CommonEntity {\n @Index({ unique: true })\n @Column({ name: \"name\", type: \"varchar\" })\n name: string;\n @Index()\n @Column({ name: \"display_name\", type: \"varchar\" })\n displayName: string;\n @Column({ name: \"body\", ...getColumnType('longText'), nullable: true })\n body: string;\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n smsProviderTemplateId: string;\n @Column({ name: \"description\", nullable: true })\n description: string;\n @Column({ name: \"active\", nullable: true, default: true })\n active: boolean = true;\n @Column({ name: \"type\", type: \"varchar\", nullable: true })\n type: string;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { nullable: true, onDelete: 'SET NULL' })\n @JoinColumn({ name: 'module_id', referencedColumnName: 'id' })\n module: ModuleMetadata;\n}\n"]}
1
+ {"version":3,"file":"sms-template.entity.js","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,oEAA8D;AAC9D,qEAA0D;AAGnD,IAAM,WAAW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AKjC;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACzE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,uCAAc;2CAAC;sBAxBd,WAAW;IADvB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,WAAW,CAyBvB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Column, Entity, Index, ManyToOne, JoinColumn } from 'typeorm';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\nimport { ModuleMetadata } from './module-metadata.entity';\n\n@Entity(\"ss_sms_template\")\nexport class SmsTemplate extends CommonEntity {\n @Index({ unique: true })\n @Column({ name: \"name\", type: \"varchar\" })\n name: string;\n @Index()\n @Column({ name: \"display_name\", type: \"varchar\" })\n displayName: string;\n @Column({ name: \"body\", ...getColumnType('longText'), nullable: true })\n body: string;\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n smsProviderTemplateId: string;\n @Column({ name: \"description\", nullable: true })\n description: string;\n @Column({ name: \"active\", nullable: true, default: true })\n active: boolean = true;\n @Column({ name: \"type\", type: \"varchar\", nullable: true })\n type: string;\n @Column({ name: \"is_transactional\", type: \"boolean\", nullable: true, default: false })\n isTransactional: boolean = false;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { nullable: true, onDelete: 'SET NULL' })\n @JoinColumn({ name: 'module_id', referencedColumnName: 'id' })\n module: ModuleMetadata;\n}\n"]}
@@ -0,0 +1,35 @@
1
+ export declare const AGENT_GENERAL_CONFIG_FIELDS: {
2
+ runner: string;
3
+ minProcesses: string;
4
+ maxProcesses: string;
5
+ processCpu: string;
6
+ processMemory: string;
7
+ stepLimit: string;
8
+ turnStepLimit: string;
9
+ costLimit: string;
10
+ name: string;
11
+ title: string;
12
+ description: string;
13
+ iconName: string;
14
+ requiredInputs: string;
15
+ };
16
+ type ConfigAudit = {
17
+ fieldName: string;
18
+ createdAt: Date;
19
+ oldValue: unknown;
20
+ newValue: unknown;
21
+ };
22
+ export declare function compareAgentGeneralConfig(current: Record<string, unknown>, entries: ConfigAudit[], older: Date, newer: Date): {
23
+ title: string;
24
+ status: string;
25
+ fields: {
26
+ key: string;
27
+ label: string;
28
+ status: string;
29
+ left: string;
30
+ right: string;
31
+ emptyLabel: string;
32
+ }[];
33
+ };
34
+ export {};
35
+ //# sourceMappingURL=agent-general-config-comparison.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-general-config-comparison.d.ts","sourceRoot":"","sources":["../../src/helpers/agent-general-config-comparison.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;CAKvC,CAAC;AAEF,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAGhG,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;;;;;;;;;;;EAc3H"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENT_GENERAL_CONFIG_FIELDS = void 0;
4
+ exports.compareAgentGeneralConfig = compareAgentGeneralConfig;
5
+ exports.AGENT_GENERAL_CONFIG_FIELDS = {
6
+ runner: 'Runner', minProcesses: 'Minimum processes', maxProcesses: 'Maximum processes',
7
+ processCpu: 'Process CPU (units)', processMemory: 'Process memory (MiB)',
8
+ stepLimit: 'Step limit', turnStepLimit: 'Turn step limit', costLimit: 'Cost limit',
9
+ name: 'Name', title: 'Title', description: 'Description', iconName: 'Icon', requiredInputs: 'Required inputs',
10
+ };
11
+ const scalar = (value) => value === null || value === undefined || value === '' ? null : String(value);
12
+ function compareAgentGeneralConfig(current, entries, older, newer) {
13
+ const fields = Object.entries(exports.AGENT_GENERAL_CONFIG_FIELDS).map(([key, label]) => {
14
+ const history = entries.filter((entry) => entry.fieldName === key);
15
+ const values = [older, newer].map((at) => {
16
+ const before = history.filter((entry) => entry.createdAt <= at);
17
+ return scalar(before.length ? before[before.length - 1].newValue : history.length ? history[0].oldValue : current[key]);
18
+ });
19
+ const changed = values[0] !== values[1] || history.some((entry) => entry.createdAt > older && entry.createdAt <= newer);
20
+ const emptyLabel = key === 'runner' ? 'Installation default'
21
+ : key === 'maxProcesses' ? 'Installation limit'
22
+ : ['processCpu', 'processMemory'].includes(key) ? 'Task definition default' : 'Not set';
23
+ return { key, label, status: changed ? 'changed' : 'matched', left: values[0], right: values[1], emptyLabel };
24
+ });
25
+ return { title: 'General configuration', status: fields.some((field) => field.status === 'changed') ? 'changed' : 'matched', fields };
26
+ }
27
+ //# sourceMappingURL=agent-general-config-comparison.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-general-config-comparison.js","sourceRoot":"","sources":["../../src/helpers/agent-general-config-comparison.ts"],"names":[],"mappings":";;;AAYA,8DAcC;AAxBY,QAAA,2BAA2B,GAAG;IACvC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB;IACtF,UAAU,EAAE,qBAAqB,EAAE,aAAa,EAAE,sBAAsB;IACxE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY;IAClF,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB;CAChH,CAAC;AAGF,MAAM,MAAM,GAAG,CAAC,KAAc,EAAiB,EA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QAAQ,CAAC,CAAC,CAAC,sBAAsB;YACxD,CAAC,CAAC,GAAG,KAAK,cAAc,CAAC,CAAC,CAAC,oBAAoB;gBAC/C,CAAC,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5F,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;IAClH,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;AAC1I,CAAC","sourcesContent":["// Lifecycle status and configVersion are deliberately excluded: activation changes\n// them automatically, rather than changing the agent's configuration.\nexport const AGENT_GENERAL_CONFIG_FIELDS = {\n runner: 'Runner', minProcesses: 'Minimum processes', maxProcesses: 'Maximum processes',\n processCpu: 'Process CPU (units)', processMemory: 'Process memory (MiB)',\n stepLimit: 'Step limit', turnStepLimit: 'Turn step limit', costLimit: 'Cost limit',\n name: 'Name', title: 'Title', description: 'Description', iconName: 'Icon', requiredInputs: 'Required inputs',\n};\n\ntype ConfigAudit = { fieldName: string; createdAt: Date; oldValue: unknown; newValue: unknown };\nconst scalar = (value: unknown): string | null => value === null || value === undefined || value === '' ? null : String(value);\n\nexport function compareAgentGeneralConfig(current: Record<string, unknown>, entries: ConfigAudit[], older: Date, newer: Date) {\n const fields = Object.entries(AGENT_GENERAL_CONFIG_FIELDS).map(([key, label]) => {\n const history = entries.filter((entry) => entry.fieldName === key);\n const values = [older, newer].map((at) => {\n const before = history.filter((entry) => entry.createdAt <= at);\n return scalar(before.length ? before[before.length - 1].newValue : history.length ? history[0].oldValue : current[key]);\n });\n const changed = values[0] !== values[1] || history.some((entry) => entry.createdAt > older && entry.createdAt <= newer);\n const emptyLabel = key === 'runner' ? 'Installation default'\n : key === 'maxProcesses' ? 'Installation limit'\n : ['processCpu', 'processMemory'].includes(key) ? 'Task definition default' : 'Not set';\n return { key, label, status: changed ? 'changed' : 'matched', left: values[0], right: values[1], emptyLabel };\n });\n return { title: 'General configuration', status: fields.some((field) => field.status === 'changed') ? 'changed' : 'matched', fields };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-general-config-comparison.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-general-config-comparison.spec.d.ts","sourceRoot":"","sources":["../../src/helpers/agent-general-config-comparison.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const agent_general_config_comparison_1 = require("./agent-general-config-comparison");
4
+ const date = (day) => new Date(`2026-11-${day}T12:00:00Z`);
5
+ const older = date(12), newer = date(16);
6
+ const entry = (fieldName, day, oldValue, newValue) => ({ fieldName, createdAt: date(day), oldValue, newValue });
7
+ const field = (key, current, entries = []) => (0, agent_general_config_comparison_1.compareAgentGeneralConfig)(current, entries, older, newer).fields.find((item) => item.key === key);
8
+ describe('general configuration comparison', () => {
9
+ it('resolves runner at version dates, ignoring subsequent runner changes', () => {
10
+ expect(field('runner', { runner: 'ecs' }, [entry('runner', 14, 'local', 'docker'), entry('runner', 19, 'docker', 'ecs')]))
11
+ .toMatchObject({ label: 'Runner', status: 'changed', left: 'local', right: 'docker' });
12
+ });
13
+ it('includes the newer boundary and excludes the older boundary from change detection', () => {
14
+ expect(field('stepLimit', {}, [entry('stepLimit', 12, '10', '20')])).toMatchObject({ status: 'matched', left: '20', right: '20' });
15
+ expect(field('stepLimit', {}, [entry('stepLimit', 16, '10', '20')])).toMatchObject({ status: 'changed', left: '10', right: '20' });
16
+ });
17
+ it.each(['minProcesses', 'maxProcesses', 'processCpu', 'processMemory', 'stepLimit', 'turnStepLimit', 'costLimit'])('includes changes to %s and preserves zero', (key) => {
18
+ expect(field(key, {}, [entry(key, 14, 0, 100)])).toMatchObject({ status: 'changed', left: '0', right: '100' });
19
+ });
20
+ it('provides explicit descriptions for inherited values', () => {
21
+ expect(field('runner', {}, [entry('runner', 14, 'local', '')])).toMatchObject({ right: null, emptyLabel: 'Installation default' });
22
+ expect(field('processCpu', {})).toMatchObject({ left: null, right: null, emptyLabel: 'Task definition default' });
23
+ expect(field('maxProcesses', {})).toMatchObject({ emptyLabel: 'Installation limit' });
24
+ });
25
+ it('does not mistake current values or future edits for historical differences', () => {
26
+ expect(field('runner', { runner: 'ecs' }, [entry('runner', 19, 'local', 'ecs')])).toMatchObject({ status: 'matched', left: 'local', right: 'local' });
27
+ expect((0, agent_general_config_comparison_1.compareAgentGeneralConfig)({ stepLimit: 100 }, [], older, newer).status).toBe('matched');
28
+ });
29
+ it('includes agent metadata and required input changes inline', () => {
30
+ for (const key of ['name', 'title', 'description', 'iconName', 'requiredInputs']) {
31
+ expect(field(key, {}, [entry(key, 14, 'old', 'new')])).toMatchObject({ status: 'changed', left: 'old', right: 'new' });
32
+ }
33
+ });
34
+ it('excludes activation metadata and fields already compared in dedicated sections', () => {
35
+ const result = (0, agent_general_config_comparison_1.compareAgentGeneralConfig)({}, [entry('configVersion', 14, 1, 2), entry('status', 14, 'draft', 'active')], older, newer);
36
+ expect(result.status).toBe('matched');
37
+ for (const key of ['systemPrompt', 'reasoningModelKey', 'fastModelKey', 'status', 'configVersion']) {
38
+ expect(result.fields.map((item) => item.key)).not.toContain(key);
39
+ }
40
+ });
41
+ });
42
+ //# sourceMappingURL=agent-general-config-comparison.spec.js.map
@@ -0,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AAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC3H,CAAC;IACL,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,gFAAgF,EAAE,GAAG,EAAE;QACtF,MAAM,MAAM,GAAG,IAAA,2DAAyB,EAAC,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACvI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,KAAK,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,CAAC,EAAE,CAAC;YACjG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACrE,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { compareAgentGeneralConfig } from './agent-general-config-comparison';\n\nconst date = (day: number) => new Date(`2026-11-${day}T12:00:00Z`);\nconst older = date(12), newer = date(16);\nconst entry = (fieldName: string, day: number, oldValue: unknown, newValue: unknown) => ({ fieldName, createdAt: date(day), oldValue, newValue });\nconst field = (key: string, current: Record<string, unknown>, entries = []) =>\n compareAgentGeneralConfig(current, entries, older, newer).fields.find((item) => item.key === key);\n\ndescribe('general configuration comparison', () => {\n it('resolves runner at version dates, ignoring subsequent runner changes', () => {\n expect(field('runner', { runner: 'ecs' }, [entry('runner', 14, 'local', 'docker'), entry('runner', 19, 'docker', 'ecs')]))\n .toMatchObject({ label: 'Runner', status: 'changed', left: 'local', right: 'docker' });\n });\n it('includes the newer boundary and excludes the older boundary from change detection', () => {\n expect(field('stepLimit', {}, [entry('stepLimit', 12, '10', '20')])).toMatchObject({ status: 'matched', left: '20', right: '20' });\n expect(field('stepLimit', {}, [entry('stepLimit', 16, '10', '20')])).toMatchObject({ status: 'changed', left: '10', right: '20' });\n });\n it.each(['minProcesses', 'maxProcesses', 'processCpu', 'processMemory', 'stepLimit', 'turnStepLimit', 'costLimit'])('includes changes to %s and preserves zero', (key) => {\n expect(field(key, {}, [entry(key, 14, 0, 100)])).toMatchObject({ status: 'changed', left: '0', right: '100' });\n });\n it('provides explicit descriptions for inherited values', () => {\n expect(field('runner', {}, [entry('runner', 14, 'local', '')])).toMatchObject({ right: null, emptyLabel: 'Installation default' });\n expect(field('processCpu', {})).toMatchObject({ left: null, right: null, emptyLabel: 'Task definition default' });\n expect(field('maxProcesses', {})).toMatchObject({ emptyLabel: 'Installation limit' });\n });\n it('does not mistake current values or future edits for historical differences', () => {\n expect(field('runner', { runner: 'ecs' }, [entry('runner', 19, 'local', 'ecs')])).toMatchObject({ status: 'matched', left: 'local', right: 'local' });\n expect(compareAgentGeneralConfig({ stepLimit: 100 }, [], older, newer).status).toBe('matched');\n });\n it('includes agent metadata and required input changes inline', () => {\n for (const key of ['name', 'title', 'description', 'iconName', 'requiredInputs']) {\n expect(field(key, {}, [entry(key, 14, 'old', 'new')])).toMatchObject({ status: 'changed', left: 'old', right: 'new' });\n }\n });\n it('excludes activation metadata and fields already compared in dedicated sections', () => {\n const result = compareAgentGeneralConfig({}, [entry('configVersion', 14, 1, 2), entry('status', 14, 'draft', 'active')], older, newer);\n expect(result.status).toBe('matched');\n for (const key of ['systemPrompt', 'reasoningModelKey', 'fastModelKey', 'status', 'configVersion']) {\n expect(result.fields.map((item) => item.key)).not.toContain(key);\n }\n });\n});\n"]}
@@ -0,0 +1,40 @@
1
+ export type ToolLinkAudit = {
2
+ messageId: number;
3
+ linkId: number;
4
+ eventType: string;
5
+ key?: string;
6
+ createdAt: Date;
7
+ fieldName: string;
8
+ oldValue: any;
9
+ newValue: any;
10
+ };
11
+ export type ToolLinkState = {
12
+ id: number;
13
+ agentId: number;
14
+ toolId: number;
15
+ requiresApproval: boolean;
16
+ createdAt: Date;
17
+ deletedAt?: Date | null;
18
+ };
19
+ export declare function toolLinksAt(agentId: number, at: Date, current: ToolLinkState[], entries: ToolLinkAudit[]): Map<number, {
20
+ requiresApproval: boolean;
21
+ }>;
22
+ export declare function toolFieldAt(entries: {
23
+ createdAt: Date;
24
+ fieldName: string;
25
+ oldValue: any;
26
+ newValue: any;
27
+ }[], field: string, at: Date, fallback: unknown): string;
28
+ export declare const TOOL_COMPARISON_FIELDS: {
29
+ name: string;
30
+ description: string;
31
+ type: string;
32
+ sourceCode: string;
33
+ status: string;
34
+ module: string;
35
+ tags: string;
36
+ iconName: string;
37
+ checksum: string;
38
+ lastLoadError: string;
39
+ };
40
+ //# sourceMappingURL=agent-tool-comparison.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-comparison.d.ts","sourceRoot":"","sources":["../../src/helpers/agent-tool-comparison.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACnE,SAAS,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAC;CACpE,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAC;IACvE,SAAS,EAAE,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC5C,CAAC;AAOF,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;sBAClD,OAAO;GA2C7D;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAI/J;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAIlC,CAAC"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_COMPARISON_FIELDS = void 0;
4
+ exports.toolLinksAt = toolLinksAt;
5
+ exports.toolFieldAt = toolFieldAt;
6
+ const positiveId = (value) => Number.isSafeInteger(Number(value)) && Number(value) > 0 ? Number(value) : undefined;
7
+ const flag = (value) => [true, 'true', 1, '1'].includes(value);
8
+ function toolLinksAt(agentId, at, current, entries) {
9
+ const result = new Map();
10
+ const ids = new Set([...current.map((link) => link.id), ...entries.map((entry) => entry.linkId)]);
11
+ for (const id of ids) {
12
+ const link = current.find((item) => item.id === id);
13
+ const history = entries.filter((entry) => entry.linkId === id);
14
+ let owner = link?.agentId;
15
+ let tool = link?.toolId;
16
+ let approval = link?.requiresApproval ?? false;
17
+ let present = Boolean(link && (!link.deletedAt || link.deletedAt > at));
18
+ const latest = history[history.length - 1];
19
+ if (!link && latest) {
20
+ const key = latest.key?.split(':');
21
+ owner = positiveId(key?.[0]);
22
+ tool = positiveId(key?.[1]);
23
+ present = latest.eventType !== 'audit_delete';
24
+ for (const entry of history) {
25
+ const value = entry.eventType === 'audit_delete' ? entry.oldValue : entry.newValue;
26
+ if (entry.fieldName === 'agentRegistry')
27
+ owner = positiveId(value);
28
+ if (entry.fieldName === 'agentToolRegistry')
29
+ tool = positiveId(value);
30
+ if (entry.fieldName === 'requiresApproval')
31
+ approval = flag(value);
32
+ }
33
+ }
34
+ const messages = new Map();
35
+ for (const entry of history)
36
+ messages.set(entry.messageId, [...(messages.get(entry.messageId) ?? []), entry]);
37
+ for (const message of [...messages.values()].reverse()) {
38
+ if (message[0].createdAt <= at)
39
+ continue;
40
+ const event = message[0].eventType;
41
+ if (event === 'audit_insert') {
42
+ present = false;
43
+ continue;
44
+ }
45
+ if (event === 'audit_delete')
46
+ present = true;
47
+ for (const entry of message) {
48
+ if (entry.fieldName === 'agentRegistry')
49
+ owner = positiveId(entry.oldValue);
50
+ if (entry.fieldName === 'agentToolRegistry')
51
+ tool = positiveId(entry.oldValue);
52
+ if (entry.fieldName === 'agentToolKey' && typeof entry.oldValue === 'string') {
53
+ const key = entry.oldValue.split(':');
54
+ owner = positiveId(key[0]);
55
+ tool = positiveId(key[1]);
56
+ }
57
+ if (entry.fieldName === 'requiresApproval')
58
+ approval = flag(entry.oldValue);
59
+ }
60
+ }
61
+ if (link && link.createdAt > at)
62
+ present = false;
63
+ if (present && owner === agentId && tool)
64
+ result.set(tool, { requiresApproval: approval });
65
+ }
66
+ return result;
67
+ }
68
+ function toolFieldAt(entries, field, at, fallback) {
69
+ const history = entries.filter((entry) => entry.fieldName === field);
70
+ const before = history.filter((entry) => entry.createdAt <= at);
71
+ return String((before.length ? before[before.length - 1].newValue : history.length ? history[0].oldValue : fallback) ?? '');
72
+ }
73
+ exports.TOOL_COMPARISON_FIELDS = {
74
+ name: 'Name', description: 'Description', type: 'Type', sourceCode: 'Source code',
75
+ status: 'Status', module: 'Module ID', tags: 'Tag IDs', iconName: 'Icon',
76
+ checksum: 'Checksum', lastLoadError: 'Last load error',
77
+ };
78
+ //# sourceMappingURL=agent-tool-comparison.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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Date; fieldName: string; oldValue: any; newValue: any;\n};\nexport type ToolLinkState = {\n id: number; agentId: number; toolId: number; requiresApproval: boolean;\n createdAt: Date; deletedAt?: Date | null;\n};\n\nconst positiveId = (value: unknown) => Number.isSafeInteger(Number(value)) && Number(value) > 0 ? Number(value) : undefined;\nconst flag = (value: unknown) => [true, 'true', 1, '1'].includes(value as any);\n\n// Reverse complete messages rather than individual fields: delete/insert details\n// describe one lifecycle event, and links can be reassigned to another tool/agent.\nexport function toolLinksAt(agentId: number, at: Date, current: ToolLinkState[], entries: ToolLinkAudit[]) {\n const result = new Map<number, { requiresApproval: boolean }>();\n const ids = new Set([...current.map((link) => link.id), ...entries.map((entry) => entry.linkId)]);\n for (const id of ids) {\n const link = current.find((item) => item.id === id);\n const history = entries.filter((entry) => entry.linkId === id);\n let owner = link?.agentId;\n let tool = link?.toolId;\n let approval = link?.requiresApproval ?? false;\n let present = Boolean(link && (!link.deletedAt || link.deletedAt > at));\n // Audits also retain hard-deleted links. Seed their last known identity.\n const latest = history[history.length - 1];\n if (!link && latest) {\n const key = latest.key?.split(':');\n owner = positiveId(key?.[0]); tool = positiveId(key?.[1]);\n present = latest.eventType !== 'audit_delete';\n for (const entry of history) {\n const value = entry.eventType === 'audit_delete' ? entry.oldValue : entry.newValue;\n if (entry.fieldName === 'agentRegistry') owner = positiveId(value);\n if (entry.fieldName === 'agentToolRegistry') tool = positiveId(value);\n if (entry.fieldName === 'requiresApproval') approval = flag(value);\n }\n }\n const messages = new Map<number, ToolLinkAudit[]>();\n for (const entry of history) messages.set(entry.messageId, [...(messages.get(entry.messageId) ?? []), entry]);\n for (const message of [...messages.values()].reverse()) {\n if (message[0].createdAt <= at) continue;\n const event = message[0].eventType;\n if (event === 'audit_insert') { present = false; continue; }\n if (event === 'audit_delete') present = true;\n for (const entry of message) {\n if (entry.fieldName === 'agentRegistry') owner = positiveId(entry.oldValue);\n if (entry.fieldName === 'agentToolRegistry') tool = positiveId(entry.oldValue);\n if (entry.fieldName === 'agentToolKey' && typeof entry.oldValue === 'string') {\n const key = entry.oldValue.split(':');\n owner = positiveId(key[0]); tool = positiveId(key[1]);\n }\n if (entry.fieldName === 'requiresApproval') approval = flag(entry.oldValue);\n }\n }\n if (link && link.createdAt > at) present = false;\n if (present && owner === agentId && tool) result.set(tool, { requiresApproval: approval });\n }\n return result;\n}\n\nexport function toolFieldAt(entries: { createdAt: Date; fieldName: string; oldValue: any; newValue: any }[], field: string, at: Date, fallback: unknown): string {\n const history = entries.filter((entry) => entry.fieldName === field);\n const before = history.filter((entry) => entry.createdAt <= at);\n return String((before.length ? before[before.length - 1].newValue : history.length ? history[0].oldValue : fallback) ?? '');\n}\n\nexport const TOOL_COMPARISON_FIELDS = {\n name: 'Name', description: 'Description', type: 'Type', sourceCode: 'Source code',\n status: 'Status', module: 'Module ID', tags: 'Tag IDs', iconName: 'Icon',\n checksum: 'Checksum', lastLoadError: 'Last load error',\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-tool-comparison.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-comparison.spec.d.ts","sourceRoot":"","sources":["../../src/helpers/agent-tool-comparison.spec.ts"],"names":[],"mappings":""}