@memberjunction/server 2.99.0 → 2.100.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.
@@ -0,0 +1,448 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { Arg, Ctx, Field, InputType, ObjectType, Query, Resolver } from 'type-graphql';
14
+ import { Metadata, LogError, LogStatus } from '@memberjunction/core';
15
+ import { UserCache } from '@memberjunction/sqlserver-dataprovider';
16
+ import { ComponentMetadataEngine } from '@memberjunction/core-entities';
17
+ import { ComponentRegistryClient, RegistryError, RegistryErrorCode } from '@memberjunction/component-registry-client-sdk';
18
+ import { configInfo } from '../config';
19
+ let ComponentSpecWithHashType = class ComponentSpecWithHashType {
20
+ specification;
21
+ hash;
22
+ notModified;
23
+ message;
24
+ };
25
+ __decorate([
26
+ Field(() => String, { nullable: true }),
27
+ __metadata("design:type", String)
28
+ ], ComponentSpecWithHashType.prototype, "specification", void 0);
29
+ __decorate([
30
+ Field(() => String),
31
+ __metadata("design:type", String)
32
+ ], ComponentSpecWithHashType.prototype, "hash", void 0);
33
+ __decorate([
34
+ Field(() => Boolean),
35
+ __metadata("design:type", Boolean)
36
+ ], ComponentSpecWithHashType.prototype, "notModified", void 0);
37
+ __decorate([
38
+ Field(() => String, { nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], ComponentSpecWithHashType.prototype, "message", void 0);
41
+ ComponentSpecWithHashType = __decorate([
42
+ ObjectType()
43
+ ], ComponentSpecWithHashType);
44
+ let SearchRegistryComponentsInput = class SearchRegistryComponentsInput {
45
+ registryId;
46
+ namespace;
47
+ query;
48
+ type;
49
+ tags;
50
+ limit;
51
+ offset;
52
+ };
53
+ __decorate([
54
+ Field({ nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], SearchRegistryComponentsInput.prototype, "registryId", void 0);
57
+ __decorate([
58
+ Field({ nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], SearchRegistryComponentsInput.prototype, "namespace", void 0);
61
+ __decorate([
62
+ Field({ nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], SearchRegistryComponentsInput.prototype, "query", void 0);
65
+ __decorate([
66
+ Field({ nullable: true }),
67
+ __metadata("design:type", String)
68
+ ], SearchRegistryComponentsInput.prototype, "type", void 0);
69
+ __decorate([
70
+ Field(() => [String], { nullable: true }),
71
+ __metadata("design:type", Array)
72
+ ], SearchRegistryComponentsInput.prototype, "tags", void 0);
73
+ __decorate([
74
+ Field({ nullable: true }),
75
+ __metadata("design:type", Number)
76
+ ], SearchRegistryComponentsInput.prototype, "limit", void 0);
77
+ __decorate([
78
+ Field({ nullable: true }),
79
+ __metadata("design:type", Number)
80
+ ], SearchRegistryComponentsInput.prototype, "offset", void 0);
81
+ SearchRegistryComponentsInput = __decorate([
82
+ InputType()
83
+ ], SearchRegistryComponentsInput);
84
+ let RegistryComponentSearchResultType = class RegistryComponentSearchResultType {
85
+ components;
86
+ total;
87
+ offset;
88
+ limit;
89
+ };
90
+ __decorate([
91
+ Field(() => [String]),
92
+ __metadata("design:type", Array)
93
+ ], RegistryComponentSearchResultType.prototype, "components", void 0);
94
+ __decorate([
95
+ Field(),
96
+ __metadata("design:type", Number)
97
+ ], RegistryComponentSearchResultType.prototype, "total", void 0);
98
+ __decorate([
99
+ Field(),
100
+ __metadata("design:type", Number)
101
+ ], RegistryComponentSearchResultType.prototype, "offset", void 0);
102
+ __decorate([
103
+ Field(),
104
+ __metadata("design:type", Number)
105
+ ], RegistryComponentSearchResultType.prototype, "limit", void 0);
106
+ RegistryComponentSearchResultType = __decorate([
107
+ ObjectType()
108
+ ], RegistryComponentSearchResultType);
109
+ let ComponentDependencyTreeType = class ComponentDependencyTreeType {
110
+ componentId;
111
+ name;
112
+ namespace;
113
+ version;
114
+ circular;
115
+ totalCount;
116
+ dependencies;
117
+ };
118
+ __decorate([
119
+ Field(),
120
+ __metadata("design:type", String)
121
+ ], ComponentDependencyTreeType.prototype, "componentId", void 0);
122
+ __decorate([
123
+ Field({ nullable: true }),
124
+ __metadata("design:type", String)
125
+ ], ComponentDependencyTreeType.prototype, "name", void 0);
126
+ __decorate([
127
+ Field({ nullable: true }),
128
+ __metadata("design:type", String)
129
+ ], ComponentDependencyTreeType.prototype, "namespace", void 0);
130
+ __decorate([
131
+ Field({ nullable: true }),
132
+ __metadata("design:type", String)
133
+ ], ComponentDependencyTreeType.prototype, "version", void 0);
134
+ __decorate([
135
+ Field({ nullable: true }),
136
+ __metadata("design:type", Boolean)
137
+ ], ComponentDependencyTreeType.prototype, "circular", void 0);
138
+ __decorate([
139
+ Field({ nullable: true }),
140
+ __metadata("design:type", Number)
141
+ ], ComponentDependencyTreeType.prototype, "totalCount", void 0);
142
+ __decorate([
143
+ Field(() => [ComponentDependencyTreeType], { nullable: true }),
144
+ __metadata("design:type", Array)
145
+ ], ComponentDependencyTreeType.prototype, "dependencies", void 0);
146
+ ComponentDependencyTreeType = __decorate([
147
+ ObjectType()
148
+ ], ComponentDependencyTreeType);
149
+ let ComponentRegistryExtendedResolver = class ComponentRegistryExtendedResolver {
150
+ componentEngine = ComponentMetadataEngine.Instance;
151
+ constructor() {
152
+ }
153
+ async GetRegistryComponent(registryName, namespace, name, { userPayload }, version, hash) {
154
+ try {
155
+ const user = UserCache.Instance.Users.find((u) => u.Email.trim().toLowerCase() === userPayload.email?.trim().toLowerCase());
156
+ if (!user)
157
+ throw new Error(`User ${userPayload.email} not found in UserCache`);
158
+ const registry = await this.getRegistryByName(registryName, user);
159
+ if (!registry) {
160
+ throw new Error(`Registry not found: ${registryName}`);
161
+ }
162
+ await this.checkUserAccess(user, registry.ID);
163
+ await this.componentEngine.Config(false, user);
164
+ const registryClient = this.createClientForRegistry(registry);
165
+ const response = await registryClient.getComponentWithHash({
166
+ registry: registry.Name,
167
+ namespace,
168
+ name,
169
+ version: version || 'latest',
170
+ hash: hash
171
+ });
172
+ if (response.notModified) {
173
+ LogStatus(`Component ${namespace}/${name} not modified (hash: ${response.hash})`);
174
+ return {
175
+ specification: undefined,
176
+ hash: response.hash,
177
+ notModified: true,
178
+ message: response.message || 'Not modified'
179
+ };
180
+ }
181
+ const component = response.specification;
182
+ if (!component) {
183
+ throw new Error(`Component ${namespace}/${name} returned without specification`);
184
+ }
185
+ if (this.shouldCache(registry)) {
186
+ await this.cacheComponent(component, registryName, user);
187
+ }
188
+ return {
189
+ specification: JSON.stringify(component),
190
+ hash: response.hash,
191
+ notModified: false,
192
+ message: undefined
193
+ };
194
+ }
195
+ catch (error) {
196
+ if (error instanceof RegistryError) {
197
+ LogError(`Registry error [${error.code}]: ${error.message}`);
198
+ if (error.code === RegistryErrorCode.COMPONENT_NOT_FOUND) {
199
+ return {
200
+ specification: undefined,
201
+ hash: '',
202
+ notModified: false,
203
+ message: 'Component not found'
204
+ };
205
+ }
206
+ }
207
+ LogError(error);
208
+ throw error;
209
+ }
210
+ }
211
+ async SearchRegistryComponents(params, { userPayload }) {
212
+ try {
213
+ const user = UserCache.Instance.Users.find((u) => u.Email.trim().toLowerCase() === userPayload.email?.trim().toLowerCase());
214
+ if (!user)
215
+ throw new Error(`User ${userPayload.email} not found in UserCache`);
216
+ if (params.registryId) {
217
+ await this.checkUserAccess(user, params.registryId);
218
+ const registry = await this.getRegistry(params.registryId, user);
219
+ if (!registry) {
220
+ throw new Error(`Registry not found: ${params.registryId}`);
221
+ }
222
+ const client = this.createClientForRegistry(registry);
223
+ const result = await client.searchComponents({
224
+ namespace: params.namespace,
225
+ query: params.query,
226
+ type: params.type,
227
+ tags: params.tags,
228
+ limit: params.limit || 10,
229
+ offset: params.offset || 0
230
+ });
231
+ return this.mapSearchResult(result);
232
+ }
233
+ const allResults = [];
234
+ await this.componentEngine.Config(false, user);
235
+ const activeRegistries = this.componentEngine.ComponentRegistries?.filter(r => r.Status === 'Active') || [];
236
+ for (const registry of activeRegistries) {
237
+ try {
238
+ await this.checkUserAccess(user, registry.ID);
239
+ const client = this.createClientForRegistry(registry);
240
+ const result = await client.searchComponents({
241
+ namespace: params.namespace,
242
+ query: params.query,
243
+ type: params.type,
244
+ tags: params.tags,
245
+ limit: params.limit || 10,
246
+ offset: 0
247
+ });
248
+ allResults.push(...result.components);
249
+ }
250
+ catch (error) {
251
+ LogError(`Failed to search registry ${registry.Name}: ${error}`);
252
+ }
253
+ }
254
+ const offset = params.offset || 0;
255
+ const limit = params.limit || 10;
256
+ const paginatedResults = allResults.slice(offset, offset + limit);
257
+ return {
258
+ components: paginatedResults.map(spec => JSON.stringify(spec)),
259
+ total: allResults.length,
260
+ offset,
261
+ limit
262
+ };
263
+ }
264
+ catch (error) {
265
+ LogError(error);
266
+ throw error;
267
+ }
268
+ }
269
+ async ResolveComponentDependencies(registryName, componentId, { userPayload }) {
270
+ try {
271
+ const user = UserCache.Instance.Users.find((u) => u.Email.trim().toLowerCase() === userPayload.email?.trim().toLowerCase());
272
+ if (!user)
273
+ throw new Error(`User ${userPayload.email} not found in UserCache`);
274
+ const registry = await this.getRegistryByName(registryName, user);
275
+ if (!registry) {
276
+ throw new Error(`Registry not found: ${registryName}`);
277
+ }
278
+ await this.checkUserAccess(user, registry.ID);
279
+ const client = this.createClientForRegistry(registry);
280
+ const tree = await client.resolveDependencies(componentId);
281
+ return tree;
282
+ }
283
+ catch (error) {
284
+ LogError(error);
285
+ throw error;
286
+ }
287
+ }
288
+ async checkUserAccess(userInfo, registryId) {
289
+ if (!userInfo) {
290
+ throw new Error('User must be authenticated to access component registries');
291
+ }
292
+ }
293
+ async getRegistry(registryId, userInfo) {
294
+ try {
295
+ await this.componentEngine.Config(false, userInfo);
296
+ const registry = this.componentEngine.ComponentRegistries?.find(r => r.ID === registryId);
297
+ return registry || null;
298
+ }
299
+ catch (error) {
300
+ LogError(error);
301
+ return null;
302
+ }
303
+ }
304
+ async getRegistryByName(registryName, userInfo) {
305
+ try {
306
+ await this.componentEngine.Config(false, userInfo);
307
+ const registry = this.componentEngine.ComponentRegistries?.find(r => r.Name === registryName && r.Status === 'Active');
308
+ return registry || null;
309
+ }
310
+ catch (error) {
311
+ LogError(error);
312
+ return null;
313
+ }
314
+ }
315
+ getRegistryUri(registry) {
316
+ if (!registry.Name) {
317
+ return registry.URI || '';
318
+ }
319
+ const envVarName = `REGISTRY_URI_OVERRIDE_${registry.Name.replace(/[^A-Za-z0-9]/g, '_').toUpperCase()}`;
320
+ const override = process.env[envVarName];
321
+ if (override) {
322
+ LogStatus(`Using URI override for registry ${registry.Name}: ${override}`);
323
+ return override;
324
+ }
325
+ return registry.URI || '';
326
+ }
327
+ createClientForRegistry(registry) {
328
+ const config = configInfo.componentRegistries?.find(r => r.id === registry.ID || r.name === registry.Name);
329
+ const apiKey = process.env[`REGISTRY_API_KEY_${registry.ID.replace(/-/g, '_').toUpperCase()}`] ||
330
+ process.env[`REGISTRY_API_KEY_${registry.Name?.replace(/-/g, '_').toUpperCase()}`] ||
331
+ config?.apiKey;
332
+ const baseUrl = this.getRegistryUri(registry);
333
+ const retryPolicy = {
334
+ maxRetries: config?.retryPolicy?.maxRetries ?? 3,
335
+ initialDelay: config?.retryPolicy?.initialDelay ?? 1000,
336
+ maxDelay: config?.retryPolicy?.maxDelay ?? 10000,
337
+ backoffMultiplier: config?.retryPolicy?.backoffMultiplier ?? 2
338
+ };
339
+ return new ComponentRegistryClient({
340
+ baseUrl: baseUrl,
341
+ apiKey: apiKey,
342
+ timeout: config?.timeout || 30000,
343
+ retryPolicy: retryPolicy,
344
+ headers: config?.headers
345
+ });
346
+ }
347
+ shouldCache(registry) {
348
+ const config = configInfo.componentRegistries?.find(r => r.id === registry.ID || r.name === registry.Name);
349
+ return config?.cache !== false;
350
+ }
351
+ async cacheComponent(component, registryId, userInfo) {
352
+ try {
353
+ const md = new Metadata();
354
+ const componentEntity = await md.GetEntityObject('MJ: Components', userInfo);
355
+ const existingComponent = this.componentEngine.Components?.find(c => c.Name === component.name &&
356
+ c.Namespace === component.namespace &&
357
+ c.SourceRegistryID === registryId);
358
+ if (existingComponent) {
359
+ if (!await componentEntity.Load(existingComponent.ID)) {
360
+ throw new Error(`Failed to load component: ${existingComponent.ID}`);
361
+ }
362
+ }
363
+ else {
364
+ componentEntity.NewRecord();
365
+ componentEntity.SourceRegistryID = registryId;
366
+ }
367
+ componentEntity.Name = component.name;
368
+ componentEntity.Namespace = component.namespace || '';
369
+ componentEntity.Version = component.version || '1.0.0';
370
+ componentEntity.Title = component.title;
371
+ componentEntity.Description = component.description;
372
+ componentEntity.Type = this.mapComponentType(component.type);
373
+ componentEntity.FunctionalRequirements = component.functionalRequirements;
374
+ componentEntity.TechnicalDesign = component.technicalDesign;
375
+ componentEntity.Specification = JSON.stringify(component);
376
+ componentEntity.LastSyncedAt = new Date();
377
+ if (!existingComponent) {
378
+ componentEntity.ReplicatedAt = new Date();
379
+ }
380
+ const result = await componentEntity.Save();
381
+ if (!result) {
382
+ throw new Error(`Failed to cache component: ${component.name}`);
383
+ }
384
+ await this.componentEngine.Config(true, userInfo);
385
+ }
386
+ catch (error) {
387
+ LogError('Failed to cache component:');
388
+ }
389
+ }
390
+ mapComponentType(type) {
391
+ const typeMap = {
392
+ 'report': 'Report',
393
+ 'dashboard': 'Dashboard',
394
+ 'form': 'Form',
395
+ 'table': 'Table',
396
+ 'chart': 'Chart',
397
+ 'navigation': 'Navigation',
398
+ 'search': 'Search',
399
+ 'widget': 'Widget',
400
+ 'utility': 'Utility',
401
+ 'other': 'Other'
402
+ };
403
+ return typeMap[type.toLowerCase()] || 'Other';
404
+ }
405
+ mapSearchResult(result) {
406
+ return {
407
+ components: result.components.map(spec => JSON.stringify(spec)),
408
+ total: result.total,
409
+ offset: result.offset,
410
+ limit: result.limit
411
+ };
412
+ }
413
+ };
414
+ __decorate([
415
+ Query(() => ComponentSpecWithHashType),
416
+ __param(0, Arg('registryName')),
417
+ __param(1, Arg('namespace')),
418
+ __param(2, Arg('name')),
419
+ __param(3, Ctx()),
420
+ __param(4, Arg('version', { nullable: true })),
421
+ __param(5, Arg('hash', { nullable: true })),
422
+ __metadata("design:type", Function),
423
+ __metadata("design:paramtypes", [String, String, String, Object, String, String]),
424
+ __metadata("design:returntype", Promise)
425
+ ], ComponentRegistryExtendedResolver.prototype, "GetRegistryComponent", null);
426
+ __decorate([
427
+ Query(() => RegistryComponentSearchResultType),
428
+ __param(0, Arg('params')),
429
+ __param(1, Ctx()),
430
+ __metadata("design:type", Function),
431
+ __metadata("design:paramtypes", [SearchRegistryComponentsInput, Object]),
432
+ __metadata("design:returntype", Promise)
433
+ ], ComponentRegistryExtendedResolver.prototype, "SearchRegistryComponents", null);
434
+ __decorate([
435
+ Query(() => ComponentDependencyTreeType, { nullable: true }),
436
+ __param(0, Arg('registryName')),
437
+ __param(1, Arg('componentId')),
438
+ __param(2, Ctx()),
439
+ __metadata("design:type", Function),
440
+ __metadata("design:paramtypes", [String, String, Object]),
441
+ __metadata("design:returntype", Promise)
442
+ ], ComponentRegistryExtendedResolver.prototype, "ResolveComponentDependencies", null);
443
+ ComponentRegistryExtendedResolver = __decorate([
444
+ Resolver(),
445
+ __metadata("design:paramtypes", [])
446
+ ], ComponentRegistryExtendedResolver);
447
+ export { ComponentRegistryExtendedResolver };
448
+ //# sourceMappingURL=ComponentRegistryResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentRegistry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S;IADL,KAAK,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;IAElC,WAAA,GAAG,CAAC,cAAc,CAAC,CAAA;IACnB,WAAA,GAAG,CAAC,WAAW,CAAC,CAAA;IAChB,WAAA,GAAG,CAAC,MAAM,CAAC,CAAA;IACX,WAAA,GAAG,EAAE,CAAA;IACL,WAAA,GAAG,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAClC,WAAA,GAAG,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;;6EA6EnC;AAMK;IADL,KAAK,CAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;IAE1C,WAAA,GAAG,CAAC,QAAQ,CAAC,CAAA;IACb,WAAA,GAAG,EAAE,CAAA;;qCADiB,6BAA6B;;iFA6EvD;AAMK;IADL,KAAK,CAAC,GAAG,EAAE,CAAC,2BAA2B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAExD,WAAA,GAAG,CAAC,cAAc,CAAC,CAAA;IACnB,WAAA,GAAG,CAAC,aAAa,CAAC,CAAA;IAClB,WAAA,GAAG,EAAE,CAAA;;;;qFAwBT;AAnNQ,iCAAiC;IAD7C,QAAQ,EAAE;;GACE,iCAAiC,CAwa7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/server",
3
- "version": "2.99.0",
3
+ "version": "2.100.1",
4
4
  "description": "MemberJunction: This project provides API access via GraphQL to the common data store.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./src/index.ts",
@@ -22,44 +22,45 @@
22
22
  "dependencies": {
23
23
  "@apollo/server": "^4.9.1",
24
24
  "@graphql-tools/utils": "^10.0.1",
25
- "@memberjunction/actions": "2.99.0",
26
- "@memberjunction/ai": "2.99.0",
27
- "@memberjunction/ai-core-plus": "2.99.0",
28
- "@memberjunction/ai-agents": "2.99.0",
29
- "@memberjunction/aiengine": "2.99.0",
30
- "@memberjunction/ai-prompts": "2.99.0",
31
- "@memberjunction/ai-agent-manager-actions": "2.99.0",
32
- "@memberjunction/ai-mistral": "2.99.0",
33
- "@memberjunction/ai-openai": "2.99.0",
34
- "@memberjunction/ai-anthropic": "2.99.0",
35
- "@memberjunction/ai-groq": "2.99.0",
36
- "@memberjunction/ai-cerebras": "2.99.0",
37
- "@memberjunction/ai-lmstudio": "2.99.0",
38
- "@memberjunction/ai-openrouter": "2.99.0",
39
- "@memberjunction/ai-ollama": "2.99.0",
40
- "@memberjunction/ai-vectors-pinecone": "2.99.0",
41
- "@memberjunction/ai-local-embeddings": "2.99.0",
42
- "@memberjunction/core": "2.99.0",
43
- "@memberjunction/core-actions": "2.99.0",
44
- "@memberjunction/actions-apollo": "2.99.0",
45
- "@memberjunction/actions-bizapps-accounting": "2.99.0",
46
- "@memberjunction/actions-bizapps-crm": "2.99.0",
47
- "@memberjunction/actions-bizapps-lms": "2.99.0",
48
- "@memberjunction/actions-bizapps-social": "2.99.0",
49
- "@memberjunction/core-entities": "2.99.0",
50
- "@memberjunction/core-entities-server": "2.99.0",
51
- "@memberjunction/data-context": "2.99.0",
52
- "@memberjunction/data-context-server": "2.99.0",
53
- "@memberjunction/doc-utils": "2.99.0",
54
- "@memberjunction/entity-communications-server": "2.99.0",
55
- "@memberjunction/external-change-detection": "2.99.0",
56
- "@memberjunction/global": "2.99.0",
57
- "@memberjunction/graphql-dataprovider": "2.99.0",
58
- "@memberjunction/queue": "2.99.0",
59
- "@memberjunction/skip-types": "2.99.0",
60
- "@memberjunction/sqlserver-dataprovider": "2.99.0",
61
- "@memberjunction/storage": "2.99.0",
62
- "@memberjunction/templates": "2.99.0",
25
+ "@memberjunction/actions": "2.100.1",
26
+ "@memberjunction/ai": "2.100.1",
27
+ "@memberjunction/ai-core-plus": "2.100.1",
28
+ "@memberjunction/ai-agents": "2.100.1",
29
+ "@memberjunction/aiengine": "2.100.1",
30
+ "@memberjunction/ai-prompts": "2.100.1",
31
+ "@memberjunction/ai-agent-manager-actions": "2.100.1",
32
+ "@memberjunction/ai-mistral": "2.100.1",
33
+ "@memberjunction/ai-openai": "2.100.1",
34
+ "@memberjunction/ai-anthropic": "2.100.1",
35
+ "@memberjunction/ai-groq": "2.100.1",
36
+ "@memberjunction/ai-cerebras": "2.100.1",
37
+ "@memberjunction/ai-lmstudio": "2.100.1",
38
+ "@memberjunction/ai-openrouter": "2.100.1",
39
+ "@memberjunction/ai-ollama": "2.100.1",
40
+ "@memberjunction/ai-vectors-pinecone": "2.100.1",
41
+ "@memberjunction/ai-local-embeddings": "2.100.1",
42
+ "@memberjunction/core": "2.100.1",
43
+ "@memberjunction/core-actions": "2.100.1",
44
+ "@memberjunction/actions-apollo": "2.100.1",
45
+ "@memberjunction/actions-bizapps-accounting": "2.100.1",
46
+ "@memberjunction/actions-bizapps-crm": "2.100.1",
47
+ "@memberjunction/actions-bizapps-lms": "2.100.1",
48
+ "@memberjunction/actions-bizapps-social": "2.100.1",
49
+ "@memberjunction/component-registry-client-sdk": "2.100.1",
50
+ "@memberjunction/core-entities": "2.100.1",
51
+ "@memberjunction/core-entities-server": "2.100.1",
52
+ "@memberjunction/data-context": "2.100.1",
53
+ "@memberjunction/data-context-server": "2.100.1",
54
+ "@memberjunction/doc-utils": "2.100.1",
55
+ "@memberjunction/entity-communications-server": "2.100.1",
56
+ "@memberjunction/external-change-detection": "2.100.1",
57
+ "@memberjunction/global": "2.100.1",
58
+ "@memberjunction/graphql-dataprovider": "2.100.1",
59
+ "@memberjunction/queue": "2.100.1",
60
+ "@memberjunction/skip-types": "2.100.1",
61
+ "@memberjunction/sqlserver-dataprovider": "2.100.1",
62
+ "@memberjunction/storage": "2.100.1",
63
+ "@memberjunction/templates": "2.100.1",
63
64
  "@types/compression": "^1.7.5",
64
65
  "@types/cors": "^2.8.13",
65
66
  "@types/jsonwebtoken": "9.0.6",
@@ -73,7 +74,7 @@
73
74
  "cors": "^2.8.5",
74
75
  "cosmiconfig": "9.0.0",
75
76
  "dotenv": "^16.4.1",
76
- "express": "^4.18.2",
77
+ "express": "^5.1.0",
77
78
  "fast-glob": "^3.3.1",
78
79
  "graphql": "^16.8.0",
79
80
  "graphql-scalars": "^1.23.0",
package/src/config.ts CHANGED
@@ -114,6 +114,21 @@ const authProviderSchema = z.object({
114
114
  domain: z.string().optional(),
115
115
  }).passthrough(); // Allow additional provider-specific fields
116
116
 
117
+ const componentRegistrySchema = z.object({
118
+ id: z.string().optional(),
119
+ name: z.string().optional(),
120
+ apiKey: z.string().optional(),
121
+ cache: z.boolean().optional().default(true),
122
+ timeout: z.number().optional(),
123
+ retryPolicy: z.object({
124
+ maxRetries: z.number().optional(),
125
+ initialDelay: z.number().optional(),
126
+ maxDelay: z.number().optional(),
127
+ backoffMultiplier: z.number().optional(),
128
+ }).optional(),
129
+ headers: z.record(z.string()).optional(),
130
+ }).passthrough(); // Allow additional fields
131
+
117
132
  const configInfoSchema = z.object({
118
133
  userHandling: userHandlingInfoSchema,
119
134
  databaseSettings: databaseSettingsInfoSchema,
@@ -122,6 +137,7 @@ const configInfoSchema = z.object({
122
137
  askSkip: askSkipInfoSchema.optional(),
123
138
  sqlLogging: sqlLoggingSchema.optional(),
124
139
  authProviders: z.array(authProviderSchema).optional(),
140
+ componentRegistries: z.array(componentRegistrySchema).optional(),
125
141
 
126
142
  apiKey: z.string().optional(),
127
143
  baseUrl: z.string().default('http://localhost'),
@@ -162,6 +178,7 @@ export type AskSkipInfo = z.infer<typeof askSkipInfoSchema>;
162
178
  export type SqlLoggingOptions = z.infer<typeof sqlLoggingOptionsSchema>;
163
179
  export type SqlLoggingInfo = z.infer<typeof sqlLoggingSchema>;
164
180
  export type AuthProviderConfig = z.infer<typeof authProviderSchema>;
181
+ export type ComponentRegistryConfig = z.infer<typeof componentRegistrySchema>;
165
182
  export type ConfigInfo = z.infer<typeof configInfoSchema>;
166
183
 
167
184
  export const configInfo: ConfigInfo = loadConfig();
package/src/index.ts CHANGED
@@ -92,6 +92,7 @@ export * from './generic/DeleteOptionsInput.js';
92
92
 
93
93
  export * from './resolvers/AskSkipResolver.js';
94
94
  export * from './resolvers/ColorResolver.js';
95
+ export * from './resolvers/ComponentRegistryResolver.js';
95
96
  export * from './resolvers/DatasetResolver.js';
96
97
  export * from './resolvers/EntityRecordNameResolver.js';
97
98
  export * from './resolvers/MergeRecordsResolver.js';