@memberjunction/graphql-dataprovider 2.98.0 → 2.100.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.
package/dist/index.d.cts CHANGED
@@ -1422,9 +1422,9 @@ interface RunViewSystemUserInput {
1422
1422
  */
1423
1423
  interface RunViewSystemUserResultRow {
1424
1424
  /**
1425
- * Unique identifier of the record
1425
+ * Primary key fields and values for the record
1426
1426
  */
1427
- ID: string;
1427
+ PrimaryKey: KeyValuePair[];
1428
1428
  /**
1429
1429
  * ID of the entity type this record belongs to
1430
1430
  */
@@ -2035,4 +2035,753 @@ declare class GraphQLActionClient {
2035
2035
  private handleEntityActionError;
2036
2036
  }
2037
2037
 
2038
- export { ActionItemInput, ActionItemOutput, type CreateQueryInput, type CreateQueryResult, type DeleteQueryOptionsInput, type DeleteQueryResult, type EmbedTextParams, type EmbedTextResult, type ExecuteSimplePromptParams, FieldMapper, GetDataOutput, type GetQueryDataByNameSystemUserInput, type GetQueryDataSystemUserInput, GraphQLAIClient, GraphQLActionClient, GraphQLDataProvider, GraphQLProviderConfigData, GraphQLSystemUserClient, GraphQLTransactionGroup, type QueryEntity, type QueryField, type QueryParameter, type QueryPermission, type QueryPermissionInput, RoleInput, RolesAndUsersInput, type RunAIAgentParams, type RunAIAgentResult, type RunAIPromptParams, type RunAIPromptResult, type RunDynamicViewSystemUserInput, type RunQuerySystemUserResult, type RunViewByIDSystemUserInput, type RunViewByNameSystemUserInput, type RunViewSystemUserInput, type RunViewSystemUserResult, type RunViewSystemUserResultRow, type SimplePromptResult, SimpleRemoteEntity, SimpleRemoteEntityField, SimpleRemoteEntityOutput, SyncDataAction, SyncDataResult, SyncRolesAndUsersResult, type UpdateQueryInput, type UpdateQueryResult, UserInput, setupGraphQLClient };
2038
+ interface ComponentDataRequirements {
2039
+ /**
2040
+ * How the component gets its data
2041
+ * - 'views': Fetches data at runtime using MJ RunView()
2042
+ * - 'queries': Fetches data at runtime using MJ RunQuery()
2043
+ * - 'hybrid': Uses both views and queries, depending on the context
2044
+ */
2045
+ mode: 'views' | 'queries' | 'hybrid';
2046
+ /**
2047
+ * Describes the entities and fields the component will access to fulfill user requirements.
2048
+ */
2049
+ entities: ComponentEntityDataRequirement[];
2050
+ /**
2051
+ * Stored Queries that the component will use to fetch data.
2052
+ */
2053
+ queries: ComponentQueryDataRequirement[];
2054
+ /**
2055
+ * Description of data access patterns
2056
+ */
2057
+ description?: string;
2058
+ }
2059
+ /**
2060
+ * Describes how a component will use a specific query in MemberJunction to fetch data
2061
+ */
2062
+ type ComponentQueryDataRequirement = {
2063
+ /**
2064
+ * Query name, used along with categoryPath to identify the query
2065
+ */
2066
+ name: string;
2067
+ /**
2068
+ * Full path of the category for the query. Categories can be hierarchical so a full path might be
2069
+ * 'Membership/Users/ActiveUsers'. This helps in organizing queries and avoiding name collisions.
2070
+ */
2071
+ categoryPath: string;
2072
+ /**
2073
+ * Description of the query and how/why the component will use it
2074
+ */
2075
+ description?: string;
2076
+ /**
2077
+ * A list of the fields that the component will use out of the possible fields returned by the query.
2078
+ * Uses the @see SimpleEntityFieldInfo type to describe each field. **NOTE** not all of the fields are actually
2079
+ * directly related to entity fields as some might be computed/etc, but SimpleEntityFieldInfo helps define some key aspects
2080
+ * like the data type of the column and a description of the field.
2081
+ */
2082
+ fields: SimpleEntityFieldInfo[];
2083
+ /**
2084
+ * A list of the entities that are part of this query. This is vital information for matching query requests
2085
+ * against existing queries
2086
+ */
2087
+ entityNames: string[];
2088
+ /**
2089
+ * Queries can have parameters (not all do). See @see ComponentQueryParameterValue for details.
2090
+ */
2091
+ parameters?: ComponentQueryParameterValue[];
2092
+ /**
2093
+ * This is only provided when requesting a NEW query be created. For existing queries, this will be undefined.
2094
+ * This SQL can use Nunjucks syntax/templating for parameters including the custom filters defined in
2095
+ */
2096
+ newQuerySQL?: string;
2097
+ };
2098
+ /**
2099
+ * Describes a single query parameter that a component will use when running a query.
2100
+ */
2101
+ type ComponentQueryParameterValue = {
2102
+ /**
2103
+ * Name of the parameter
2104
+ */
2105
+ name: string;
2106
+ /**
2107
+ * Value of the parameter. If the value is '@runtime', it indicates that the component will determine the value at runtime.
2108
+ * If anything other than '@runtime' is specified, it is a hardcoded value that the component will use.
2109
+ */
2110
+ value: string;
2111
+ /**
2112
+ * When specifying '@runtime' for the value, populate this field with a value that can be used to test the query to validate it runs. It doesn't need
2113
+ * to be a value that is valid in the sense of being in the database, but is of the right type. For example if the
2114
+ * parameter is a number, date or string, include a test value of that type. **Note** if the parameter is for a UNIQUEIDENTIFIER column
2115
+ * type make sure to use a valid UUID format otherwise the query will FAIL.
2116
+ */
2117
+ testValue: string;
2118
+ /**
2119
+ * Description of the parameter and how it is used in the query. This is particular important if
2120
+ * the value is '@runtime' as it helps the component developer understand what the parameter is for and how to determine its value.
2121
+ */
2122
+ description?: string;
2123
+ };
2124
+ /**
2125
+ * Describes use of a single entity
2126
+ */
2127
+ type ComponentEntityDataRequirement = {
2128
+ /**
2129
+ * Name of the entity (unique system-wide)
2130
+ */
2131
+ name: string;
2132
+ /**
2133
+ * Description of data in the entity
2134
+ */
2135
+ description?: string;
2136
+ /**
2137
+ * Fields to show the user
2138
+ */
2139
+ displayFields: string[];
2140
+ /**
2141
+ * Fields to filter on initially or via user interaction.
2142
+ */
2143
+ filterFields?: string[];
2144
+ /**
2145
+ * Fields to use when sorting
2146
+ */
2147
+ sortFields?: string[];
2148
+ /**
2149
+ * For the set of fields used in the combination of display, filter, and sort,
2150
+ * this array is populated with additional metadata about each field. This will
2151
+ * NOT include fields that are not used in the component.
2152
+ */
2153
+ fieldMetadata: SimpleEntityFieldInfo[];
2154
+ /**
2155
+ * When/Where/How components should use this data
2156
+ */
2157
+ usageContext?: string;
2158
+ /**
2159
+ * Array of permissions required by the component
2160
+ */
2161
+ permissionLevelNeeded: ComponentEntitySimplePermission[];
2162
+ };
2163
+ type ComponentEntitySimplePermission = 'read' | 'create' | 'update' | 'delete';
2164
+ /**
2165
+ * Simple type to share more information about the relevant fields
2166
+ * in an entity that are to be used in a component
2167
+ **/
2168
+ type SimpleEntityFieldInfo = {
2169
+ /**
2170
+ * Name of the field
2171
+ */
2172
+ name: string;
2173
+ /**
2174
+ * Display sequence usually used for this field
2175
+ */
2176
+ sequence: number;
2177
+ /**
2178
+ * Whether this field is usually displayed in a user-facing view
2179
+ */
2180
+ defaultInView: boolean;
2181
+ /**
2182
+ * SQL Server type of the field, e.g., 'varchar', 'int', etc.
2183
+ */
2184
+ type: string;
2185
+ /**
2186
+ * Whether the field allows null values
2187
+ */
2188
+ allowsNull: boolean;
2189
+ /**
2190
+ * Whether the field is part of the primary key
2191
+ */
2192
+ isPrimaryKey: boolean;
2193
+ /**
2194
+ * Possible values for the field, if applicable
2195
+ */
2196
+ possibleValues?: string[];
2197
+ /**
2198
+ * Description of the field
2199
+ */
2200
+ description?: string;
2201
+ };
2202
+
2203
+ /**
2204
+ * Definition of a single property of a component.
2205
+ */
2206
+ interface ComponentProperty {
2207
+ /**
2208
+ * The name of the property
2209
+ */
2210
+ name: string;
2211
+ /**
2212
+ * A description of what this property is used for
2213
+ */
2214
+ description: string;
2215
+ /**
2216
+ * The type of the property.
2217
+ * It can be one of 'string', 'number', 'boolean', 'object', 'array', 'function', or 'any'.
2218
+ * These types are for aligning users of the component. Components are in JavaScript and do not
2219
+ * actually enforce types at runtime, but this is used to provide guidance for users (AI and Human)
2220
+ */
2221
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'function' | 'any';
2222
+ /**
2223
+ * Indicates if this property is required for the component to function correctly.
2224
+ * If true, the component will not work without this property being set.
2225
+ */
2226
+ required: boolean;
2227
+ /**
2228
+ * The default value, if any, for this property if it is not provided.
2229
+ */
2230
+ defaultValue?: any;
2231
+ /**
2232
+ * Optional list of possible values for this property.
2233
+ */
2234
+ possibleValues?: string[];
2235
+ }
2236
+ /**
2237
+ * Definition of a single event of a component.
2238
+ */
2239
+ interface ComponentEvent {
2240
+ /**
2241
+ * The name of the event
2242
+ */
2243
+ name: string;
2244
+ /**
2245
+ * A description of what this event does
2246
+ */
2247
+ description: string;
2248
+ /**
2249
+ * An array of parameters that this event can emit.
2250
+ */
2251
+ parameters?: ComponentEventParameter[];
2252
+ }
2253
+ interface ComponentEventParameter {
2254
+ /**
2255
+ * The name of the parameter
2256
+ */
2257
+ name: string;
2258
+ /**
2259
+ * A description of what this parameter is used for
2260
+ */
2261
+ description: string;
2262
+ /**
2263
+ * The type of the parameter.
2264
+ * It can be one of 'string', 'number', 'boolean', 'object', 'array', 'function', or 'any'.
2265
+ */
2266
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'function' | 'any';
2267
+ }
2268
+
2269
+ /**
2270
+ * Library dependency information for a component
2271
+ */
2272
+ interface ComponentLibraryDependency {
2273
+ /**
2274
+ * Unique name of the library from our registry. Typically
2275
+ * reuses npm style package names such as
2276
+ * "recharts", "lodash", "dayjs", "antd" or "@memberjunction/lib-name"
2277
+ */
2278
+ name: string;
2279
+ /**
2280
+ * The global variable name used by the component to access the library in code.
2281
+ * When the component is bootstrapped, the library is loaded into a variable in a
2282
+ * Factory/wrapper function around it by the host.
2283
+ */
2284
+ globalVariable: string;
2285
+ /**
2286
+ * SemVer string describing minimum version requirement
2287
+ * Example: "2.5.0" for fixed version, "^1.0.0" for minimum version
2288
+ */
2289
+ version?: string;
2290
+ }
2291
+
2292
+ /**
2293
+ * Specification for an interactive component
2294
+ */
2295
+ declare class ComponentSpec {
2296
+ name: string;
2297
+ /**
2298
+ * Components can be embedded or registry. Registry means we don't have the
2299
+ * code directly here nor do we generate the code, we simply use the component from its registry
2300
+ */
2301
+ location: "embedded" | "registry";
2302
+ /**
2303
+ * Used when location === 'registry' - the unique name of a given registry without the @ sign
2304
+ * for example MJ or Skip would be valid globally unique registry names (as registered with MemberJunction.org)
2305
+ * You would not include @ here. Fully qualified component identifiers would be
2306
+ * @Registry/Namespace/Name/Version but in the context of this field it is just the registry name.
2307
+ */
2308
+ registry?: string;
2309
+ /**
2310
+ * Used when location === "registry", a hierarchical namespace such as "crm/analytics/accounts". The combination of the
2311
+ * namespace and name are how a registry component is loaded. Registry components might have
2312
+ * a root level segment that starts with @ such as "@memberjunction/examples/entities" or if the root
2313
+ * segment doesn't have @ that means the component is local to that registry
2314
+ */
2315
+ namespace?: string;
2316
+ /**
2317
+ * Used when location === "registry", a semantic versioning string such as
2318
+ * "1.0.0"
2319
+ * "^1.0.0"
2320
+ * "~1.0.0"
2321
+ * Follows conventions documented here: https://semver.org/ and https://docs.npmjs.com/about-semantic-versioning
2322
+ */
2323
+ version?: string;
2324
+ /**
2325
+ * Only used when location === 'registry', logic explaining why this component is being selected
2326
+ * to serve a specific use case or requirement
2327
+ */
2328
+ selectionReasoning?: string;
2329
+ /**
2330
+ * When an architect decides to use an existing component as a base for a new version,
2331
+ * they can set this flag to true. This indicates that the new version will be created
2332
+ * based on the existing component based on the namespace/name/version specified above
2333
+ */
2334
+ createNewVersion?: boolean;
2335
+ /**
2336
+ * End-user friendly description of what the component does
2337
+ */
2338
+ description: string;
2339
+ /**
2340
+ * User-friendly name
2341
+ */
2342
+ title: string;
2343
+ /**
2344
+ * Self-declared type - some common options below, can be any string if the standard ones aren't sufficient
2345
+ */
2346
+ type: "report" | "dashboard" | "form" | "table" | "chart" | "navigation" | "search" | string;
2347
+ /**
2348
+ * JavaScript code
2349
+ */
2350
+ code: string;
2351
+ /**
2352
+ * A functional description of what the component should do in markdown.
2353
+ *
2354
+ * Describes:
2355
+ * - Core functionality
2356
+ * - Any business rules
2357
+ * - Expected outcomes
2358
+ * - UX considerations
2359
+ */
2360
+ functionalRequirements: string;
2361
+ /**
2362
+ * Describes the entities and queries a component requires to function.
2363
+ */
2364
+ dataRequirements?: ComponentDataRequirements;
2365
+ /**
2366
+ * Technical explanation of the component in markdown.
2367
+ */
2368
+ technicalDesign: string;
2369
+ /**
2370
+ * Properties the component accepts, if any
2371
+ */
2372
+ properties?: ComponentProperty[];
2373
+ /**
2374
+ * Events that the component emits, if any
2375
+ */
2376
+ events?: ComponentEvent[];
2377
+ /**
2378
+ * Metadata about methods the component supports, if any
2379
+ */
2380
+ methods?: ComponentMethodInfo;
2381
+ /**
2382
+ * Example of the component being used in JSX format. This is used to provide a clear example on the properties and
2383
+ * event handling that the component supports.
2384
+ */
2385
+ exampleUsage: string;
2386
+ /**
2387
+ * Describes any other components this one depends on, if any
2388
+ */
2389
+ dependencies?: ComponentSpec[];
2390
+ /**
2391
+ * 3rd party lib dependencies, if any
2392
+ */
2393
+ libraries?: ComponentLibraryDependency[];
2394
+ /**
2395
+ * Relevant examples of components intended to inspire this component's creation
2396
+ */
2397
+ relevantExamples?: ComponentExample[];
2398
+ }
2399
+ /**
2400
+ * Defines standard and custom methods a component implements
2401
+ */
2402
+ interface ComponentMethodInfo {
2403
+ standardMethodsSupported: {
2404
+ print?: boolean;
2405
+ refresh?: boolean;
2406
+ getCurrentDataState?: boolean;
2407
+ getDataStateHistory?: boolean;
2408
+ validate?: boolean;
2409
+ isDirty?: boolean;
2410
+ reset?: boolean;
2411
+ scrollTo?: boolean;
2412
+ focus?: boolean;
2413
+ invokeMethod?: boolean;
2414
+ hasMethod?: boolean;
2415
+ };
2416
+ customMethods: CustomComponentMethod[];
2417
+ }
2418
+ /**
2419
+ * Defines a single custom component method
2420
+ */
2421
+ interface CustomComponentMethod {
2422
+ name: string;
2423
+ description: string;
2424
+ parameters: Array<{
2425
+ name: string;
2426
+ type: string;
2427
+ description?: string;
2428
+ }>;
2429
+ returnType: string;
2430
+ }
2431
+ /**
2432
+ * Type that defines an example component used to inspire the creation
2433
+ * of a new component. By definition these examples are located in a registry
2434
+ * and can be found via the combination of their name and namespace. The optional
2435
+ * properties can be used at runtime to store additional information as required
2436
+ * for generation/inference needs
2437
+ */
2438
+ type ComponentExample = {
2439
+ name: string;
2440
+ namespace: string;
2441
+ version?: string;
2442
+ registry?: string;
2443
+ description?: string;
2444
+ functionalRequirements?: string;
2445
+ technicalDesign?: string;
2446
+ /**
2447
+ * Tracks a 0-1 number that indicates the relevance of this example to the containing ComponentSpec, can be used
2448
+ * for ranking examples by importance/relevance
2449
+ */
2450
+ relevance?: number;
2451
+ code?: string;
2452
+ /**
2453
+ * Optional runtime embedding vector calculated for description
2454
+ */
2455
+ descriptionVector?: number[];
2456
+ /**
2457
+ * Optional runtime embedding vector calculated for functional requirements
2458
+ */
2459
+ functionalRequirementsVector?: number[];
2460
+ /**
2461
+ * Optional runtime embedding vector calculated for technical design
2462
+ */
2463
+ technicalDesignVector?: number[];
2464
+ /**
2465
+ * Bag to hold any number of other runtime attributes
2466
+ */
2467
+ other?: any;
2468
+ };
2469
+
2470
+ /**
2471
+ * Parameters for getting a component from registry
2472
+ */
2473
+ interface GetRegistryComponentParams {
2474
+ /**
2475
+ * Registry name (globally unique)
2476
+ */
2477
+ registryName: string;
2478
+ /**
2479
+ * Component namespace
2480
+ */
2481
+ namespace: string;
2482
+ /**
2483
+ * Component name
2484
+ */
2485
+ name: string;
2486
+ /**
2487
+ * Component version (optional, defaults to 'latest')
2488
+ */
2489
+ version?: string;
2490
+ /**
2491
+ * Optional hash for caching - if provided and matches, returns null
2492
+ */
2493
+ hash?: string;
2494
+ }
2495
+ /**
2496
+ * Response from GetRegistryComponent with hash and caching metadata
2497
+ */
2498
+ interface ComponentSpecWithHash {
2499
+ /**
2500
+ * The component specification (undefined if not modified)
2501
+ */
2502
+ specification?: ComponentSpec | string;
2503
+ /**
2504
+ * SHA-256 hash of the specification
2505
+ */
2506
+ hash: string;
2507
+ /**
2508
+ * Indicates if the component was not modified (304 response)
2509
+ */
2510
+ notModified: boolean;
2511
+ /**
2512
+ * Optional message from server
2513
+ */
2514
+ message?: string;
2515
+ }
2516
+ /**
2517
+ * Parameters for searching registry components
2518
+ */
2519
+ interface SearchRegistryComponentsParams {
2520
+ /**
2521
+ * Optional registry name filter
2522
+ */
2523
+ registryName?: string;
2524
+ /**
2525
+ * Optional namespace filter
2526
+ */
2527
+ namespace?: string;
2528
+ /**
2529
+ * Search query string
2530
+ */
2531
+ query?: string;
2532
+ /**
2533
+ * Component type filter
2534
+ */
2535
+ type?: string;
2536
+ /**
2537
+ * Tags to filter by
2538
+ */
2539
+ tags?: string[];
2540
+ /**
2541
+ * Maximum number of results
2542
+ */
2543
+ limit?: number;
2544
+ /**
2545
+ * Offset for pagination
2546
+ */
2547
+ offset?: number;
2548
+ }
2549
+ /**
2550
+ * Search result for registry components
2551
+ */
2552
+ interface RegistryComponentSearchResult {
2553
+ /**
2554
+ * Array of matching components
2555
+ */
2556
+ components: ComponentSpec[];
2557
+ /**
2558
+ * Total number of matches
2559
+ */
2560
+ total: number;
2561
+ /**
2562
+ * Current offset
2563
+ */
2564
+ offset: number;
2565
+ /**
2566
+ * Current limit
2567
+ */
2568
+ limit: number;
2569
+ }
2570
+ /**
2571
+ * Dependency tree for a component
2572
+ */
2573
+ interface ComponentDependencyTree {
2574
+ /**
2575
+ * Component ID
2576
+ */
2577
+ componentId: string;
2578
+ /**
2579
+ * Component name
2580
+ */
2581
+ name?: string;
2582
+ /**
2583
+ * Component namespace
2584
+ */
2585
+ namespace?: string;
2586
+ /**
2587
+ * Component version
2588
+ */
2589
+ version?: string;
2590
+ /**
2591
+ * Direct dependencies
2592
+ */
2593
+ dependencies?: ComponentDependencyTree[];
2594
+ /**
2595
+ * Whether this is a circular dependency
2596
+ */
2597
+ circular?: boolean;
2598
+ /**
2599
+ * Total count of all dependencies
2600
+ */
2601
+ totalCount?: number;
2602
+ }
2603
+ /**
2604
+ * Client for executing Component Registry operations through GraphQL.
2605
+ * This class provides an easy way to fetch components from external registries
2606
+ * through the MJ API server, which handles authentication and caching.
2607
+ *
2608
+ * The GraphQLComponentRegistryClient follows the same naming convention as other GraphQL clients
2609
+ * in the MemberJunction ecosystem, such as GraphQLAIClient and GraphQLActionClient.
2610
+ *
2611
+ * @example
2612
+ * ```typescript
2613
+ * // Create the client
2614
+ * const registryClient = new GraphQLComponentRegistryClient(graphQLProvider);
2615
+ *
2616
+ * // Get a component from a registry
2617
+ * const component = await registryClient.GetRegistryComponent({
2618
+ * registryName: "MJ",
2619
+ * namespace: "core/ui",
2620
+ * name: "DataGrid",
2621
+ * version: "1.0.0"
2622
+ * });
2623
+ *
2624
+ * // Search for components
2625
+ * const searchResult = await registryClient.SearchRegistryComponents({
2626
+ * query: "dashboard",
2627
+ * type: "dashboard",
2628
+ * limit: 10
2629
+ * });
2630
+ * ```
2631
+ */
2632
+ declare class GraphQLComponentRegistryClient {
2633
+ /**
2634
+ * The GraphQLDataProvider instance used to execute GraphQL requests
2635
+ * @private
2636
+ */
2637
+ private _dataProvider;
2638
+ /**
2639
+ * Creates a new GraphQLComponentRegistryClient instance.
2640
+ * @param dataProvider The GraphQL data provider to use for queries
2641
+ */
2642
+ constructor(dataProvider: GraphQLDataProvider);
2643
+ /**
2644
+ * Get a specific component from a registry.
2645
+ *
2646
+ * This method fetches a component specification from an external registry
2647
+ * through the MJ API server. The server handles authentication with the
2648
+ * registry and may cache the result for performance.
2649
+ *
2650
+ * @param params The parameters for getting the component
2651
+ * @returns A Promise that resolves to a ComponentSpec
2652
+ *
2653
+ * @example
2654
+ * ```typescript
2655
+ * const component = await registryClient.GetRegistryComponent({
2656
+ * registryName: "MJ",
2657
+ * namespace: "core/ui",
2658
+ * name: "DataGrid",
2659
+ * version: "2.0.0"
2660
+ * });
2661
+ *
2662
+ * console.log('Component:', component.name);
2663
+ * console.log('Description:', component.description);
2664
+ * console.log('Code:', component.code);
2665
+ * ```
2666
+ */
2667
+ GetRegistryComponent(params: GetRegistryComponentParams): Promise<ComponentSpec | null>;
2668
+ /**
2669
+ * Get a component from registry with hash and caching metadata.
2670
+ * Returns the full response including hash and notModified flag.
2671
+ *
2672
+ * @param params - Parameters for fetching the component
2673
+ * @returns Full response with specification, hash, and caching metadata
2674
+ *
2675
+ * @example
2676
+ * ```typescript
2677
+ * const response = await client.GetRegistryComponentWithHash({
2678
+ * registryName: 'MJ',
2679
+ * namespace: 'core/ui',
2680
+ * name: 'DataGrid',
2681
+ * version: '1.0.0',
2682
+ * hash: 'abc123...'
2683
+ * });
2684
+ *
2685
+ * if (response.notModified) {
2686
+ * // Use cached version
2687
+ * } else {
2688
+ * // Use response.specification
2689
+ * }
2690
+ * ```
2691
+ */
2692
+ GetRegistryComponentWithHash(params: GetRegistryComponentParams): Promise<ComponentSpecWithHash>;
2693
+ /**
2694
+ * Search for components in registries.
2695
+ *
2696
+ * This method searches for components across one or more registries
2697
+ * based on the provided criteria. Results are paginated for performance.
2698
+ *
2699
+ * @param params The search parameters
2700
+ * @returns A Promise that resolves to a RegistryComponentSearchResult
2701
+ *
2702
+ * @example
2703
+ * ```typescript
2704
+ * const searchResult = await registryClient.SearchRegistryComponents({
2705
+ * query: "dashboard",
2706
+ * type: "dashboard",
2707
+ * tags: ["analytics", "reporting"],
2708
+ * limit: 20,
2709
+ * offset: 0
2710
+ * });
2711
+ *
2712
+ * console.log(`Found ${searchResult.total} components`);
2713
+ * searchResult.components.forEach(component => {
2714
+ * console.log(`- ${component.name}: ${component.description}`);
2715
+ * });
2716
+ * ```
2717
+ */
2718
+ SearchRegistryComponents(params: SearchRegistryComponentsParams): Promise<RegistryComponentSearchResult>;
2719
+ /**
2720
+ * Resolve the dependency tree for a component.
2721
+ *
2722
+ * This method fetches the complete dependency tree for a component,
2723
+ * including all transitive dependencies. The server handles circular
2724
+ * dependency detection and marks them appropriately.
2725
+ *
2726
+ * @param registryId The registry ID
2727
+ * @param componentId The component ID
2728
+ * @returns A Promise that resolves to a ComponentDependencyTree
2729
+ *
2730
+ * @example
2731
+ * ```typescript
2732
+ * const dependencyTree = await registryClient.ResolveComponentDependencies(
2733
+ * "mj-central",
2734
+ * "component-123"
2735
+ * );
2736
+ *
2737
+ * console.log(`Component has ${dependencyTree.totalCount} total dependencies`);
2738
+ * if (dependencyTree.circular) {
2739
+ * console.warn('Circular dependency detected!');
2740
+ * }
2741
+ * ```
2742
+ */
2743
+ ResolveComponentDependencies(registryId: string, componentId: string): Promise<ComponentDependencyTree | null>;
2744
+ /**
2745
+ * Check if a specific version of a component exists in a registry.
2746
+ *
2747
+ * @param params The parameters for checking component existence
2748
+ * @returns A Promise that resolves to true if the component exists, false otherwise
2749
+ *
2750
+ * @example
2751
+ * ```typescript
2752
+ * const exists = await registryClient.ComponentExists({
2753
+ * registryId: "mj-central",
2754
+ * namespace: "core/ui",
2755
+ * name: "DataGrid",
2756
+ * version: "2.0.0"
2757
+ * });
2758
+ *
2759
+ * if (exists) {
2760
+ * console.log('Component is available');
2761
+ * }
2762
+ * ```
2763
+ */
2764
+ ComponentExists(params: GetRegistryComponentParams): Promise<boolean>;
2765
+ /**
2766
+ * Get the latest version of a component.
2767
+ *
2768
+ * @param registryId The registry ID
2769
+ * @param namespace The component namespace
2770
+ * @param name The component name
2771
+ * @returns A Promise that resolves to the latest version string or null
2772
+ *
2773
+ * @example
2774
+ * ```typescript
2775
+ * const latestVersion = await registryClient.GetLatestVersion(
2776
+ * "mj-central",
2777
+ * "core/ui",
2778
+ * "DataGrid"
2779
+ * );
2780
+ *
2781
+ * console.log(`Latest version: ${latestVersion}`);
2782
+ * ```
2783
+ */
2784
+ GetLatestVersion(registryName: string, namespace: string, name: string): Promise<string | null>;
2785
+ }
2786
+
2787
+ export { ActionItemInput, ActionItemOutput, type ComponentDependencyTree, type ComponentSpecWithHash, type CreateQueryInput, type CreateQueryResult, type DeleteQueryOptionsInput, type DeleteQueryResult, type EmbedTextParams, type EmbedTextResult, type ExecuteSimplePromptParams, FieldMapper, GetDataOutput, type GetQueryDataByNameSystemUserInput, type GetQueryDataSystemUserInput, type GetRegistryComponentParams, GraphQLAIClient, GraphQLActionClient, GraphQLComponentRegistryClient, GraphQLDataProvider, GraphQLProviderConfigData, GraphQLSystemUserClient, GraphQLTransactionGroup, type QueryEntity, type QueryField, type QueryParameter, type QueryPermission, type QueryPermissionInput, type RegistryComponentSearchResult, RoleInput, RolesAndUsersInput, type RunAIAgentParams, type RunAIAgentResult, type RunAIPromptParams, type RunAIPromptResult, type RunDynamicViewSystemUserInput, type RunQuerySystemUserResult, type RunViewByIDSystemUserInput, type RunViewByNameSystemUserInput, type RunViewSystemUserInput, type RunViewSystemUserResult, type RunViewSystemUserResultRow, type SearchRegistryComponentsParams, type SimplePromptResult, SimpleRemoteEntity, SimpleRemoteEntityField, SimpleRemoteEntityOutput, SyncDataAction, SyncDataResult, SyncRolesAndUsersResult, type UpdateQueryInput, type UpdateQueryResult, UserInput, setupGraphQLClient };