@carlonicora/nestjs-neo4jsonapi 2.7.2 → 2.8.0

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 (96) hide show
  1. package/dist/config/base.config.d.ts.map +1 -1
  2. package/dist/config/base.config.js +4 -0
  3. package/dist/config/base.config.js.map +1 -1
  4. package/dist/config/interfaces/config.ai.interface.d.ts +5 -0
  5. package/dist/config/interfaces/config.ai.interface.d.ts.map +1 -1
  6. package/dist/core/llm/index.d.ts +2 -0
  7. package/dist/core/llm/index.d.ts.map +1 -1
  8. package/dist/core/llm/index.js +2 -0
  9. package/dist/core/llm/index.js.map +1 -1
  10. package/dist/core/llm/interfaces/ai-candidate.interface.d.ts +32 -0
  11. package/dist/core/llm/interfaces/ai-candidate.interface.d.ts.map +1 -0
  12. package/dist/core/llm/interfaces/ai-candidate.interface.js +15 -0
  13. package/dist/core/llm/interfaces/ai-candidate.interface.js.map +1 -0
  14. package/dist/core/llm/llm.module.d.ts.map +1 -1
  15. package/dist/core/llm/llm.module.js +6 -1
  16. package/dist/core/llm/llm.module.js.map +1 -1
  17. package/dist/core/llm/services/ai-connection-resolver.service.d.ts +107 -0
  18. package/dist/core/llm/services/ai-connection-resolver.service.d.ts.map +1 -0
  19. package/dist/core/llm/services/ai-connection-resolver.service.js +329 -0
  20. package/dist/core/llm/services/ai-connection-resolver.service.js.map +1 -0
  21. package/dist/core/llm/services/embedder.service.d.ts +21 -0
  22. package/dist/core/llm/services/embedder.service.d.ts.map +1 -1
  23. package/dist/core/llm/services/embedder.service.js +52 -3
  24. package/dist/core/llm/services/embedder.service.js.map +1 -1
  25. package/dist/core/llm/services/llm.service.d.ts +65 -18
  26. package/dist/core/llm/services/llm.service.d.ts.map +1 -1
  27. package/dist/core/llm/services/llm.service.js +214 -70
  28. package/dist/core/llm/services/llm.service.js.map +1 -1
  29. package/dist/core/llm/services/model.service.d.ts +79 -2
  30. package/dist/core/llm/services/model.service.d.ts.map +1 -1
  31. package/dist/core/llm/services/model.service.js +289 -31
  32. package/dist/core/llm/services/model.service.js.map +1 -1
  33. package/dist/core/llm/services/vision.llm.service.d.ts +25 -1
  34. package/dist/core/llm/services/vision.llm.service.d.ts.map +1 -1
  35. package/dist/core/llm/services/vision.llm.service.js +74 -33
  36. package/dist/core/llm/services/vision.llm.service.js.map +1 -1
  37. package/dist/foundations/ai-connection/ai-connection.module.d.ts +5 -0
  38. package/dist/foundations/ai-connection/ai-connection.module.d.ts.map +1 -0
  39. package/dist/foundations/ai-connection/ai-connection.module.js +37 -0
  40. package/dist/foundations/ai-connection/ai-connection.module.js.map +1 -0
  41. package/dist/foundations/ai-connection/controllers/ai-connection.controller.d.ts +32 -0
  42. package/dist/foundations/ai-connection/controllers/ai-connection.controller.d.ts.map +1 -0
  43. package/dist/foundations/ai-connection/controllers/ai-connection.controller.js +162 -0
  44. package/dist/foundations/ai-connection/controllers/ai-connection.controller.js.map +1 -0
  45. package/dist/foundations/ai-connection/dtos/ai-connection.post.dto.d.ts +41 -0
  46. package/dist/foundations/ai-connection/dtos/ai-connection.post.dto.d.ts.map +1 -0
  47. package/dist/foundations/ai-connection/dtos/ai-connection.post.dto.js +189 -0
  48. package/dist/foundations/ai-connection/dtos/ai-connection.post.dto.js.map +1 -0
  49. package/dist/foundations/ai-connection/dtos/ai-connection.put.dto.d.ts +42 -0
  50. package/dist/foundations/ai-connection/dtos/ai-connection.put.dto.d.ts.map +1 -0
  51. package/dist/foundations/ai-connection/dtos/ai-connection.put.dto.js +179 -0
  52. package/dist/foundations/ai-connection/dtos/ai-connection.put.dto.js.map +1 -0
  53. package/dist/foundations/ai-connection/dtos/ai-connection.reorder.dto.d.ts +8 -0
  54. package/dist/foundations/ai-connection/dtos/ai-connection.reorder.dto.d.ts.map +1 -0
  55. package/dist/foundations/ai-connection/dtos/ai-connection.reorder.dto.js +38 -0
  56. package/dist/foundations/ai-connection/dtos/ai-connection.reorder.dto.js.map +1 -0
  57. package/dist/foundations/ai-connection/entities/ai-connection.d.ts +57 -0
  58. package/dist/foundations/ai-connection/entities/ai-connection.d.ts.map +1 -0
  59. package/dist/foundations/ai-connection/entities/ai-connection.js +73 -0
  60. package/dist/foundations/ai-connection/entities/ai-connection.js.map +1 -0
  61. package/dist/foundations/ai-connection/entities/ai-connection.meta.d.ts +3 -0
  62. package/dist/foundations/ai-connection/entities/ai-connection.meta.d.ts.map +1 -0
  63. package/dist/foundations/ai-connection/entities/ai-connection.meta.js +10 -0
  64. package/dist/foundations/ai-connection/entities/ai-connection.meta.js.map +1 -0
  65. package/dist/foundations/ai-connection/index.d.ts +12 -0
  66. package/dist/foundations/ai-connection/index.d.ts.map +1 -0
  67. package/dist/foundations/ai-connection/index.js +35 -0
  68. package/dist/foundations/ai-connection/index.js.map +1 -0
  69. package/dist/foundations/ai-connection/registry/ai-provider.registry.d.ts +54 -0
  70. package/dist/foundations/ai-connection/registry/ai-provider.registry.d.ts.map +1 -0
  71. package/dist/foundations/ai-connection/registry/ai-provider.registry.js +255 -0
  72. package/dist/foundations/ai-connection/registry/ai-provider.registry.js.map +1 -0
  73. package/dist/foundations/ai-connection/repositories/ai-connection.repository.d.ts +52 -0
  74. package/dist/foundations/ai-connection/repositories/ai-connection.repository.d.ts.map +1 -0
  75. package/dist/foundations/ai-connection/repositories/ai-connection.repository.js +85 -0
  76. package/dist/foundations/ai-connection/repositories/ai-connection.repository.js.map +1 -0
  77. package/dist/foundations/ai-connection/services/ai-connection-encryption.service.d.ts +52 -0
  78. package/dist/foundations/ai-connection/services/ai-connection-encryption.service.d.ts.map +1 -0
  79. package/dist/foundations/ai-connection/services/ai-connection-encryption.service.js +148 -0
  80. package/dist/foundations/ai-connection/services/ai-connection-encryption.service.js.map +1 -0
  81. package/dist/foundations/ai-connection/services/ai-connection.service.d.ts +79 -0
  82. package/dist/foundations/ai-connection/services/ai-connection.service.d.ts.map +1 -0
  83. package/dist/foundations/ai-connection/services/ai-connection.service.js +184 -0
  84. package/dist/foundations/ai-connection/services/ai-connection.service.js.map +1 -0
  85. package/dist/foundations/foundations.modules.d.ts.map +1 -1
  86. package/dist/foundations/foundations.modules.js +2 -0
  87. package/dist/foundations/foundations.modules.js.map +1 -1
  88. package/dist/foundations/index.d.ts +1 -0
  89. package/dist/foundations/index.d.ts.map +1 -1
  90. package/dist/foundations/index.js +1 -0
  91. package/dist/foundations/index.js.map +1 -1
  92. package/dist/foundations/tokenusage/services/tokenusage.service.d.ts +29 -0
  93. package/dist/foundations/tokenusage/services/tokenusage.service.d.ts.map +1 -1
  94. package/dist/foundations/tokenusage/services/tokenusage.service.js +15 -3
  95. package/dist/foundations/tokenusage/services/tokenusage.service.js.map +1 -1
  96. package/package.json +1 -1
@@ -0,0 +1,189 @@
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.AiConnectionPostDTO = exports.AiConnectionPostDataDTO = exports.AiConnectionPostRelationshipsDTO = exports.AiConnectionPostAttributesDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const ai_candidate_interface_1 = require("../../../core/llm/interfaces/ai-candidate.interface");
16
+ const company_dto_1 = require("../../company/dtos/company.dto");
17
+ const ai_connection_meta_1 = require("../entities/ai-connection.meta");
18
+ class AiConnectionPostAttributesDTO {
19
+ }
20
+ exports.AiConnectionPostAttributesDTO = AiConnectionPostAttributesDTO;
21
+ __decorate([
22
+ (0, class_validator_1.IsDefined)(),
23
+ (0, class_validator_1.IsNotEmpty)(),
24
+ (0, class_validator_1.IsString)(),
25
+ __metadata("design:type", String)
26
+ ], AiConnectionPostAttributesDTO.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsDefined)(),
29
+ (0, class_validator_1.IsIn)([...ai_candidate_interface_1.AI_CONNECTION_TYPES]),
30
+ __metadata("design:type", String)
31
+ ], AiConnectionPostAttributesDTO.prototype, "connectionType", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsDefined)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], AiConnectionPostAttributesDTO.prototype, "provider", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsDefined)(),
40
+ (0, class_validator_1.IsNumber)(),
41
+ __metadata("design:type", Number)
42
+ ], AiConnectionPostAttributesDTO.prototype, "position", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsDefined)(),
45
+ (0, class_validator_1.IsBoolean)(),
46
+ __metadata("design:type", Boolean)
47
+ ], AiConnectionPostAttributesDTO.prototype, "enabled", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsString)(),
51
+ __metadata("design:type", String)
52
+ ], AiConnectionPostAttributesDTO.prototype, "model", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_validator_1.IsString)(),
56
+ __metadata("design:type", String)
57
+ ], AiConnectionPostAttributesDTO.prototype, "url", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsOptional)(),
60
+ (0, class_validator_1.IsString)(),
61
+ __metadata("design:type", String)
62
+ ], AiConnectionPostAttributesDTO.prototype, "apiKey", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsString)(),
66
+ __metadata("design:type", String)
67
+ ], AiConnectionPostAttributesDTO.prototype, "region", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.IsString)(),
71
+ __metadata("design:type", String)
72
+ ], AiConnectionPostAttributesDTO.prototype, "instance", void 0);
73
+ __decorate([
74
+ (0, class_validator_1.IsOptional)(),
75
+ (0, class_validator_1.IsString)(),
76
+ __metadata("design:type", String)
77
+ ], AiConnectionPostAttributesDTO.prototype, "apiVersion", void 0);
78
+ __decorate([
79
+ (0, class_validator_1.IsOptional)(),
80
+ (0, class_validator_1.IsString)(),
81
+ __metadata("design:type", String)
82
+ ], AiConnectionPostAttributesDTO.prototype, "googleCredentialsBase64", void 0);
83
+ __decorate([
84
+ (0, class_validator_1.IsOptional)(),
85
+ (0, class_validator_1.IsBoolean)(),
86
+ __metadata("design:type", Boolean)
87
+ ], AiConnectionPostAttributesDTO.prototype, "allowFallbacks", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.IsOptional)(),
90
+ (0, class_validator_1.IsString)(),
91
+ __metadata("design:type", String)
92
+ ], AiConnectionPostAttributesDTO.prototype, "reasoningEffort", void 0);
93
+ __decorate([
94
+ (0, class_validator_1.IsOptional)(),
95
+ (0, class_validator_1.IsNumber)(),
96
+ __metadata("design:type", Number)
97
+ ], AiConnectionPostAttributesDTO.prototype, "maxOutputTokens", void 0);
98
+ __decorate([
99
+ (0, class_validator_1.IsOptional)(),
100
+ (0, class_validator_1.IsNumber)(),
101
+ __metadata("design:type", Number)
102
+ ], AiConnectionPostAttributesDTO.prototype, "dimensions", void 0);
103
+ __decorate([
104
+ (0, class_validator_1.IsOptional)(),
105
+ (0, class_validator_1.IsNumber)(),
106
+ __metadata("design:type", Number)
107
+ ], AiConnectionPostAttributesDTO.prototype, "inputCostPer1MTokens", void 0);
108
+ __decorate([
109
+ (0, class_validator_1.IsOptional)(),
110
+ (0, class_validator_1.IsNumber)(),
111
+ __metadata("design:type", Number)
112
+ ], AiConnectionPostAttributesDTO.prototype, "outputCostPer1MTokens", void 0);
113
+ __decorate([
114
+ (0, class_validator_1.IsOptional)(),
115
+ (0, class_validator_1.IsNumber)(),
116
+ __metadata("design:type", Number)
117
+ ], AiConnectionPostAttributesDTO.prototype, "cachedInputCostPer1MTokens", void 0);
118
+ __decorate([
119
+ (0, class_validator_1.IsOptional)(),
120
+ (0, class_validator_1.IsNumber)(),
121
+ __metadata("design:type", Number)
122
+ ], AiConnectionPostAttributesDTO.prototype, "costPerMinute", void 0);
123
+ __decorate([
124
+ (0, class_validator_1.IsOptional)(),
125
+ (0, class_validator_1.IsNumber)(),
126
+ __metadata("design:type", Number)
127
+ ], AiConnectionPostAttributesDTO.prototype, "costPerPage", void 0);
128
+ __decorate([
129
+ (0, class_validator_1.IsOptional)(),
130
+ (0, class_validator_1.IsString)(),
131
+ __metadata("design:type", String)
132
+ ], AiConnectionPostAttributesDTO.prototype, "directUrl", void 0);
133
+ __decorate([
134
+ (0, class_validator_1.IsOptional)(),
135
+ (0, class_validator_1.IsString)(),
136
+ __metadata("design:type", String)
137
+ ], AiConnectionPostAttributesDTO.prototype, "language", void 0);
138
+ __decorate([
139
+ (0, class_validator_1.IsOptional)(),
140
+ (0, class_validator_1.IsString)(),
141
+ __metadata("design:type", String)
142
+ ], AiConnectionPostAttributesDTO.prototype, "directFormat", void 0);
143
+ __decorate([
144
+ (0, class_validator_1.IsOptional)(),
145
+ (0, class_validator_1.IsString)(),
146
+ __metadata("design:type", String)
147
+ ], AiConnectionPostAttributesDTO.prototype, "directProvider", void 0);
148
+ class AiConnectionPostRelationshipsDTO {
149
+ }
150
+ exports.AiConnectionPostRelationshipsDTO = AiConnectionPostRelationshipsDTO;
151
+ __decorate([
152
+ (0, class_validator_1.ValidateNested)(),
153
+ (0, class_validator_1.IsOptional)(),
154
+ (0, class_transformer_1.Type)(() => company_dto_1.CompanyDataDTO),
155
+ __metadata("design:type", company_dto_1.CompanyDataDTO)
156
+ ], AiConnectionPostRelationshipsDTO.prototype, "company", void 0);
157
+ class AiConnectionPostDataDTO {
158
+ }
159
+ exports.AiConnectionPostDataDTO = AiConnectionPostDataDTO;
160
+ __decorate([
161
+ (0, class_validator_1.Equals)(ai_connection_meta_1.aiConnectionMeta.endpoint),
162
+ __metadata("design:type", String)
163
+ ], AiConnectionPostDataDTO.prototype, "type", void 0);
164
+ __decorate([
165
+ (0, class_validator_1.IsUUID)(),
166
+ __metadata("design:type", String)
167
+ ], AiConnectionPostDataDTO.prototype, "id", void 0);
168
+ __decorate([
169
+ (0, class_validator_1.ValidateNested)(),
170
+ (0, class_validator_1.IsNotEmpty)(),
171
+ (0, class_transformer_1.Type)(() => AiConnectionPostAttributesDTO),
172
+ __metadata("design:type", AiConnectionPostAttributesDTO)
173
+ ], AiConnectionPostDataDTO.prototype, "attributes", void 0);
174
+ __decorate([
175
+ (0, class_validator_1.ValidateNested)(),
176
+ (0, class_validator_1.IsOptional)(),
177
+ (0, class_transformer_1.Type)(() => AiConnectionPostRelationshipsDTO),
178
+ __metadata("design:type", AiConnectionPostRelationshipsDTO)
179
+ ], AiConnectionPostDataDTO.prototype, "relationships", void 0);
180
+ class AiConnectionPostDTO {
181
+ }
182
+ exports.AiConnectionPostDTO = AiConnectionPostDTO;
183
+ __decorate([
184
+ (0, class_validator_1.ValidateNested)(),
185
+ (0, class_validator_1.IsNotEmpty)(),
186
+ (0, class_transformer_1.Type)(() => AiConnectionPostDataDTO),
187
+ __metadata("design:type", AiConnectionPostDataDTO)
188
+ ], AiConnectionPostDTO.prototype, "data", void 0);
189
+ //# sourceMappingURL=ai-connection.post.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.post.dto.js","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/dtos/ai-connection.post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAWyB;AACzB,gGAA0F;AAC1F,gEAAgE;AAChE,uEAAkE;AAElE,MAAa,6BAA6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c,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;8BAC9B,uBAAuB;iDAAC"}
@@ -0,0 +1,42 @@
1
+ export declare class AiConnectionPutAttributesDTO {
2
+ name: string;
3
+ connectionType: string;
4
+ provider: string;
5
+ position: number;
6
+ enabled: boolean;
7
+ model?: string;
8
+ url?: string;
9
+ apiKey?: string;
10
+ region?: string;
11
+ instance?: string;
12
+ apiVersion?: string;
13
+ googleCredentialsBase64?: string;
14
+ allowFallbacks?: boolean;
15
+ reasoningEffort?: string;
16
+ maxOutputTokens?: number;
17
+ dimensions?: number;
18
+ inputCostPer1MTokens?: number;
19
+ outputCostPer1MTokens?: number;
20
+ cachedInputCostPer1MTokens?: number;
21
+ costPerMinute?: number;
22
+ costPerPage?: number;
23
+ directUrl?: string;
24
+ language?: string;
25
+ directFormat?: string;
26
+ directProvider?: string;
27
+ }
28
+ /**
29
+ * No relationships block on PUT: a connection's scope (global vs. one company)
30
+ * is chosen at creation and is immutable (spec § Decisions "Scope mutability").
31
+ * The descriptor marks the `company` relationship `immutable: true`, so the
32
+ * generic PUT path skips it entirely.
33
+ */
34
+ export declare class AiConnectionPutDataDTO {
35
+ type: string;
36
+ id: string;
37
+ attributes: AiConnectionPutAttributesDTO;
38
+ }
39
+ export declare class AiConnectionPutDTO {
40
+ data: AiConnectionPutDataDTO;
41
+ }
42
+ //# sourceMappingURL=ai-connection.put.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.put.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/dtos/ai-connection.put.dto.ts"],"names":[],"mappings":"AAgBA,qBAAa,4BAA4B;IAIvC,IAAI,EAAE,MAAM,CAAC;IAIb,cAAc,EAAE,MAAM,CAAC;IAKvB,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,EAAE,MAAM,CAAC;IAIjB,OAAO,EAAE,OAAO,CAAC;IAES,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACnD;AAED;;;;;GAKG;AACH,qBAAa,sBAAsB;IAEjC,IAAI,EAAE,MAAM,CAAC;IAGb,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,4BAA4B,CAAC;CAC1C;AAED,qBAAa,kBAAkB;IAI7B,IAAI,EAAE,sBAAsB,CAAC;CAC9B"}
@@ -0,0 +1,179 @@
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.AiConnectionPutDTO = exports.AiConnectionPutDataDTO = exports.AiConnectionPutAttributesDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const ai_candidate_interface_1 = require("../../../core/llm/interfaces/ai-candidate.interface");
16
+ const ai_connection_meta_1 = require("../entities/ai-connection.meta");
17
+ class AiConnectionPutAttributesDTO {
18
+ }
19
+ exports.AiConnectionPutAttributesDTO = AiConnectionPutAttributesDTO;
20
+ __decorate([
21
+ (0, class_validator_1.IsDefined)(),
22
+ (0, class_validator_1.IsNotEmpty)(),
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], AiConnectionPutAttributesDTO.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsDefined)(),
28
+ (0, class_validator_1.IsIn)([...ai_candidate_interface_1.AI_CONNECTION_TYPES]),
29
+ __metadata("design:type", String)
30
+ ], AiConnectionPutAttributesDTO.prototype, "connectionType", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsDefined)(),
33
+ (0, class_validator_1.IsNotEmpty)(),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], AiConnectionPutAttributesDTO.prototype, "provider", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsDefined)(),
39
+ (0, class_validator_1.IsNumber)(),
40
+ __metadata("design:type", Number)
41
+ ], AiConnectionPutAttributesDTO.prototype, "position", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsDefined)(),
44
+ (0, class_validator_1.IsBoolean)(),
45
+ __metadata("design:type", Boolean)
46
+ ], AiConnectionPutAttributesDTO.prototype, "enabled", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsOptional)(),
49
+ (0, class_validator_1.IsString)(),
50
+ __metadata("design:type", String)
51
+ ], AiConnectionPutAttributesDTO.prototype, "model", void 0);
52
+ __decorate([
53
+ (0, class_validator_1.IsOptional)(),
54
+ (0, class_validator_1.IsString)(),
55
+ __metadata("design:type", String)
56
+ ], AiConnectionPutAttributesDTO.prototype, "url", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsOptional)(),
59
+ (0, class_validator_1.IsString)(),
60
+ __metadata("design:type", String)
61
+ ], AiConnectionPutAttributesDTO.prototype, "apiKey", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.IsString)(),
65
+ __metadata("design:type", String)
66
+ ], AiConnectionPutAttributesDTO.prototype, "region", void 0);
67
+ __decorate([
68
+ (0, class_validator_1.IsOptional)(),
69
+ (0, class_validator_1.IsString)(),
70
+ __metadata("design:type", String)
71
+ ], AiConnectionPutAttributesDTO.prototype, "instance", void 0);
72
+ __decorate([
73
+ (0, class_validator_1.IsOptional)(),
74
+ (0, class_validator_1.IsString)(),
75
+ __metadata("design:type", String)
76
+ ], AiConnectionPutAttributesDTO.prototype, "apiVersion", void 0);
77
+ __decorate([
78
+ (0, class_validator_1.IsOptional)(),
79
+ (0, class_validator_1.IsString)(),
80
+ __metadata("design:type", String)
81
+ ], AiConnectionPutAttributesDTO.prototype, "googleCredentialsBase64", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.IsOptional)(),
84
+ (0, class_validator_1.IsBoolean)(),
85
+ __metadata("design:type", Boolean)
86
+ ], AiConnectionPutAttributesDTO.prototype, "allowFallbacks", void 0);
87
+ __decorate([
88
+ (0, class_validator_1.IsOptional)(),
89
+ (0, class_validator_1.IsString)(),
90
+ __metadata("design:type", String)
91
+ ], AiConnectionPutAttributesDTO.prototype, "reasoningEffort", void 0);
92
+ __decorate([
93
+ (0, class_validator_1.IsOptional)(),
94
+ (0, class_validator_1.IsNumber)(),
95
+ __metadata("design:type", Number)
96
+ ], AiConnectionPutAttributesDTO.prototype, "maxOutputTokens", void 0);
97
+ __decorate([
98
+ (0, class_validator_1.IsOptional)(),
99
+ (0, class_validator_1.IsNumber)(),
100
+ __metadata("design:type", Number)
101
+ ], AiConnectionPutAttributesDTO.prototype, "dimensions", void 0);
102
+ __decorate([
103
+ (0, class_validator_1.IsOptional)(),
104
+ (0, class_validator_1.IsNumber)(),
105
+ __metadata("design:type", Number)
106
+ ], AiConnectionPutAttributesDTO.prototype, "inputCostPer1MTokens", void 0);
107
+ __decorate([
108
+ (0, class_validator_1.IsOptional)(),
109
+ (0, class_validator_1.IsNumber)(),
110
+ __metadata("design:type", Number)
111
+ ], AiConnectionPutAttributesDTO.prototype, "outputCostPer1MTokens", void 0);
112
+ __decorate([
113
+ (0, class_validator_1.IsOptional)(),
114
+ (0, class_validator_1.IsNumber)(),
115
+ __metadata("design:type", Number)
116
+ ], AiConnectionPutAttributesDTO.prototype, "cachedInputCostPer1MTokens", void 0);
117
+ __decorate([
118
+ (0, class_validator_1.IsOptional)(),
119
+ (0, class_validator_1.IsNumber)(),
120
+ __metadata("design:type", Number)
121
+ ], AiConnectionPutAttributesDTO.prototype, "costPerMinute", void 0);
122
+ __decorate([
123
+ (0, class_validator_1.IsOptional)(),
124
+ (0, class_validator_1.IsNumber)(),
125
+ __metadata("design:type", Number)
126
+ ], AiConnectionPutAttributesDTO.prototype, "costPerPage", void 0);
127
+ __decorate([
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_validator_1.IsString)(),
130
+ __metadata("design:type", String)
131
+ ], AiConnectionPutAttributesDTO.prototype, "directUrl", void 0);
132
+ __decorate([
133
+ (0, class_validator_1.IsOptional)(),
134
+ (0, class_validator_1.IsString)(),
135
+ __metadata("design:type", String)
136
+ ], AiConnectionPutAttributesDTO.prototype, "language", void 0);
137
+ __decorate([
138
+ (0, class_validator_1.IsOptional)(),
139
+ (0, class_validator_1.IsString)(),
140
+ __metadata("design:type", String)
141
+ ], AiConnectionPutAttributesDTO.prototype, "directFormat", void 0);
142
+ __decorate([
143
+ (0, class_validator_1.IsOptional)(),
144
+ (0, class_validator_1.IsString)(),
145
+ __metadata("design:type", String)
146
+ ], AiConnectionPutAttributesDTO.prototype, "directProvider", void 0);
147
+ /**
148
+ * No relationships block on PUT: a connection's scope (global vs. one company)
149
+ * is chosen at creation and is immutable (spec § Decisions "Scope mutability").
150
+ * The descriptor marks the `company` relationship `immutable: true`, so the
151
+ * generic PUT path skips it entirely.
152
+ */
153
+ class AiConnectionPutDataDTO {
154
+ }
155
+ exports.AiConnectionPutDataDTO = AiConnectionPutDataDTO;
156
+ __decorate([
157
+ (0, class_validator_1.Equals)(ai_connection_meta_1.aiConnectionMeta.endpoint),
158
+ __metadata("design:type", String)
159
+ ], AiConnectionPutDataDTO.prototype, "type", void 0);
160
+ __decorate([
161
+ (0, class_validator_1.IsUUID)(),
162
+ __metadata("design:type", String)
163
+ ], AiConnectionPutDataDTO.prototype, "id", void 0);
164
+ __decorate([
165
+ (0, class_validator_1.ValidateNested)(),
166
+ (0, class_validator_1.IsNotEmpty)(),
167
+ (0, class_transformer_1.Type)(() => AiConnectionPutAttributesDTO),
168
+ __metadata("design:type", AiConnectionPutAttributesDTO)
169
+ ], AiConnectionPutDataDTO.prototype, "attributes", void 0);
170
+ class AiConnectionPutDTO {
171
+ }
172
+ exports.AiConnectionPutDTO = AiConnectionPutDTO;
173
+ __decorate([
174
+ (0, class_validator_1.ValidateNested)(),
175
+ (0, class_validator_1.IsNotEmpty)(),
176
+ (0, class_transformer_1.Type)(() => AiConnectionPutDataDTO),
177
+ __metadata("design:type", AiConnectionPutDataDTO)
178
+ ], AiConnectionPutDTO.prototype, "data", void 0);
179
+ //# sourceMappingURL=ai-connection.put.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.put.dto.js","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/dtos/ai-connection.put.dto.ts"],"names":[],"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AiConnectionReorderDTO {
6
+ data: AiConnectionReorderDataDTO;
7
+ }
8
+ //# sourceMappingURL=ai-connection.reorder.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.reorder.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/dtos/ai-connection.reorder.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,0BAA0B;IAErC,IAAI,EAAE,MAAM,CAAC;IAKb,GAAG,EAAE,MAAM,EAAE,CAAC;CACf;AAED,qBAAa,sBAAsB;IAIjC,IAAI,EAAE,0BAA0B,CAAC;CAClC"}
@@ -0,0 +1,38 @@
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.AiConnectionReorderDTO = exports.AiConnectionReorderDataDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const ai_connection_meta_1 = require("../entities/ai-connection.meta");
16
+ class AiConnectionReorderDataDTO {
17
+ }
18
+ exports.AiConnectionReorderDataDTO = AiConnectionReorderDataDTO;
19
+ __decorate([
20
+ (0, class_validator_1.Equals)(ai_connection_meta_1.aiConnectionMeta.endpoint),
21
+ __metadata("design:type", String)
22
+ ], AiConnectionReorderDataDTO.prototype, "type", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsDefined)(),
25
+ (0, class_validator_1.ArrayNotEmpty)(),
26
+ (0, class_validator_1.IsUUID)(undefined, { each: true }),
27
+ __metadata("design:type", Array)
28
+ ], AiConnectionReorderDataDTO.prototype, "ids", void 0);
29
+ class AiConnectionReorderDTO {
30
+ }
31
+ exports.AiConnectionReorderDTO = AiConnectionReorderDTO;
32
+ __decorate([
33
+ (0, class_validator_1.ValidateNested)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ (0, class_transformer_1.Type)(() => AiConnectionReorderDataDTO),
36
+ __metadata("design:type", AiConnectionReorderDataDTO)
37
+ ], AiConnectionReorderDTO.prototype, "data", void 0);
38
+ //# sourceMappingURL=ai-connection.reorder.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.reorder.dto.js","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/dtos/ai-connection.reorder.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAAuG;AACvG,uEAAkE;AAElE,MAAa,0BAA0B;CAQtC;AARD,gEAQC;AANC;IADC,IAAA,wBAAM,EAAC,qCAAgB,CAAC,QAAQ,CAAC;;wDACrB;AAKb;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,+BAAa,GAAE;IACf,IAAA,wBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uDACpB;AAGhB,MAAa,sBAAsB;CAKlC;AALD,wDAKC;AADC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BACjC,0BAA0B;oDAAC"}
@@ -0,0 +1,57 @@
1
+ import { Entity } from "../../../common";
2
+ import { Company } from "../../company/entities/company";
3
+ /**
4
+ * AiConnection Entity Type
5
+ *
6
+ * One node = one link in a fallback chain. A chain is identified by
7
+ * `(connectionType, companyId | null)` and ordered by `position`.
8
+ */
9
+ export type AiConnection = Entity & {
10
+ name: string;
11
+ connectionType: string;
12
+ provider: string;
13
+ position: number;
14
+ enabled: boolean;
15
+ model?: string;
16
+ url?: string;
17
+ apiKey?: string;
18
+ region?: string;
19
+ instance?: string;
20
+ apiVersion?: string;
21
+ googleCredentialsBase64?: string;
22
+ allowFallbacks?: boolean;
23
+ reasoningEffort?: string;
24
+ maxOutputTokens?: number;
25
+ dimensions?: number;
26
+ inputCostPer1MTokens?: number;
27
+ outputCostPer1MTokens?: number;
28
+ cachedInputCostPer1MTokens?: number;
29
+ costPerMinute?: number;
30
+ costPerPage?: number;
31
+ directUrl?: string;
32
+ language?: string;
33
+ directFormat?: string;
34
+ directProvider?: string;
35
+ /** Computed — id of the CONFIGURES target; absent = global chain. */
36
+ companyId?: string;
37
+ company?: Company;
38
+ };
39
+ /**
40
+ * AiConnection Entity Descriptor
41
+ *
42
+ * Single source of truth for the AiConnection entity configuration.
43
+ * Auto-generates mapper, serialiser, constraints, and indexes.
44
+ */
45
+ export declare const AiConnectionDescriptor: import("../../../common").EntityDescriptor<AiConnection, {
46
+ company: {
47
+ model: import("../../../common").DataMeta;
48
+ direction: "out";
49
+ relationship: string;
50
+ cardinality: "one";
51
+ required: false;
52
+ dtoKey: string;
53
+ immutable: true;
54
+ };
55
+ }>;
56
+ export type AiConnectionDescriptorType = typeof AiConnectionDescriptor;
57
+ //# sourceMappingURL=ai-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.d.ts","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/entities/ai-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAIzD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;EA+DjC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AiConnectionDescriptor = void 0;
4
+ const common_1 = require("../../../common");
5
+ const company_meta_1 = require("../../company/entities/company.meta");
6
+ const ai_connection_meta_1 = require("./ai-connection.meta");
7
+ /**
8
+ * AiConnection Entity Descriptor
9
+ *
10
+ * Single source of truth for the AiConnection entity configuration.
11
+ * Auto-generates mapper, serialiser, constraints, and indexes.
12
+ */
13
+ exports.AiConnectionDescriptor = (0, common_1.defineEntity)()({
14
+ ...ai_connection_meta_1.aiConnectionMeta,
15
+ // Deliberately NOT company-scoped: platform admins manage ALL chains, and the
16
+ // resolver queries by company explicitly (spec § 1 "Company scoping").
17
+ isCompanyScoped: false,
18
+ fields: {
19
+ name: { type: "string", required: true },
20
+ connectionType: { type: "string", required: true, excludeFromSearch: true },
21
+ provider: { type: "string", required: true, excludeFromSearch: true },
22
+ position: { type: "number", required: true },
23
+ enabled: { type: "boolean", required: true, default: true },
24
+ model: { type: "string", excludeFromSearch: true },
25
+ url: { type: "string", excludeFromSearch: true },
26
+ // serialise: false — encrypted at rest AND never on the wire (spec § Decisions "Secrets")
27
+ apiKey: { type: "string", excludeFromSearch: true, serialise: false },
28
+ region: { type: "string", excludeFromSearch: true },
29
+ instance: { type: "string", excludeFromSearch: true },
30
+ apiVersion: { type: "string", excludeFromSearch: true },
31
+ googleCredentialsBase64: { type: "string", excludeFromSearch: true, serialise: false },
32
+ allowFallbacks: { type: "boolean" },
33
+ reasoningEffort: { type: "string", excludeFromSearch: true },
34
+ maxOutputTokens: { type: "number" },
35
+ dimensions: { type: "number" },
36
+ inputCostPer1MTokens: { type: "number" },
37
+ outputCostPer1MTokens: { type: "number" },
38
+ cachedInputCostPer1MTokens: { type: "number" },
39
+ costPerMinute: { type: "number" },
40
+ costPerPage: { type: "number" },
41
+ directUrl: { type: "string", excludeFromSearch: true },
42
+ language: { type: "string", excludeFromSearch: true },
43
+ directFormat: { type: "string", excludeFromSearch: true },
44
+ directProvider: { type: "string", excludeFromSearch: true },
45
+ },
46
+ computed: {
47
+ companyId: {
48
+ compute: (params) => {
49
+ if (!params.record?.has?.("aiConnection_company"))
50
+ return undefined;
51
+ return params.record.get("aiConnection_company")?.properties?.id ?? undefined;
52
+ },
53
+ },
54
+ },
55
+ virtualFields: {
56
+ hasApiKey: { compute: ({ data }) => !!data?.apiKey },
57
+ hasGoogleCredentials: { compute: ({ data }) => !!data?.googleCredentialsBase64 },
58
+ },
59
+ relationships: {
60
+ company: {
61
+ model: company_meta_1.companyMeta,
62
+ direction: "out",
63
+ relationship: "CONFIGURES",
64
+ cardinality: "one",
65
+ required: false,
66
+ dtoKey: "company",
67
+ // Scope is chosen at creation and never moves (spec § Decisions "Scope
68
+ // mutability") — immutable relationships are skipped on PUT.
69
+ immutable: true,
70
+ },
71
+ },
72
+ });
73
+ //# sourceMappingURL=ai-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.js","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/entities/ai-connection.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AAEvD,sEAAkE;AAClE,6DAAwD;AAuCxD;;;;;GAKG;AACU,QAAA,sBAAsB,GAAG,IAAA,qBAAY,GAAgB,CAAC;IACjE,GAAG,qCAAgB;IAEnB,8EAA8E;IAC9E,uEAAuE;IACvE,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;QAC3E,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;QACrE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;QAC3D,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE;QAClD,GAAG,EA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AE,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE;KAC5D;IAED,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;gBAClB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC;oBAAE,OAAO,SAAS,CAAC;gBACpE,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAAE,UAAU,EAAE,EAAE,IAAI,SAAS,CAAC;YAChF,CAAC;SACF;KACF;IAED,aAAa,EAAE;QACb,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE;QACpD,oBAAoB,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,uBAAuB,EAAE;KACjF;IAED,aAAa,EAAE;QACb,OAAO,EAAE;YACP,KAAK,EAAE,0BAAW;YAClB,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,SAAS;YACjB,uEAAuE;YACvE,6DAA6D;YAC7D,SAAS,EAAE,IAAI;SAChB;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DataMeta } from "../../../common/interfaces/datamodel.interface";
2
+ export declare const aiConnectionMeta: DataMeta;
3
+ //# sourceMappingURL=ai-connection.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/entities/ai-connection.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,gBAAgB,EAAE,QAK9B,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aiConnectionMeta = void 0;
4
+ exports.aiConnectionMeta = {
5
+ type: "ai-connections",
6
+ endpoint: "ai-connections",
7
+ nodeName: "aiConnection",
8
+ labelName: "AiConnection",
9
+ };
10
+ //# sourceMappingURL=ai-connection.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-connection.meta.js","sourceRoot":"","sources":["../../../../src/foundations/ai-connection/entities/ai-connection.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAa;IACxC,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,gBAAgB;IAC1B,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,cAAc;CAC1B,CAAC"}