@memberjunction/graphql-dataprovider 2.116.0 → 2.118.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
@@ -2014,6 +2014,150 @@ declare class GraphQLActionClient {
2014
2014
  private handleEntityActionError;
2015
2015
  }
2016
2016
 
2017
+ /**
2018
+ * Parameters for running a test
2019
+ */
2020
+ interface RunTestParams {
2021
+ testId: string;
2022
+ verbose?: boolean;
2023
+ environment?: string;
2024
+ onProgress?: (progress: TestExecutionProgress) => void;
2025
+ }
2026
+ /**
2027
+ * Result from running a test
2028
+ */
2029
+ interface RunTestResult {
2030
+ success: boolean;
2031
+ errorMessage?: string;
2032
+ executionTimeMs?: number;
2033
+ result: any;
2034
+ }
2035
+ /**
2036
+ * Parameters for running a test suite
2037
+ */
2038
+ interface RunTestSuiteParams {
2039
+ suiteId: string;
2040
+ verbose?: boolean;
2041
+ environment?: string;
2042
+ parallel?: boolean;
2043
+ onProgress?: (progress: TestExecutionProgress) => void;
2044
+ }
2045
+ /**
2046
+ * Result from running a test suite
2047
+ */
2048
+ interface RunTestSuiteResult {
2049
+ success: boolean;
2050
+ errorMessage?: string;
2051
+ executionTimeMs?: number;
2052
+ result: any;
2053
+ }
2054
+ /**
2055
+ * Test execution progress update
2056
+ */
2057
+ interface TestExecutionProgress {
2058
+ currentStep: string;
2059
+ percentage: number;
2060
+ message: string;
2061
+ testName?: string;
2062
+ driverType?: string;
2063
+ oracleEvaluation?: string;
2064
+ }
2065
+ /**
2066
+ * Client for executing tests through GraphQL.
2067
+ * This class provides an easy way to run tests and test suites from a client application.
2068
+ *
2069
+ * @example
2070
+ * ```typescript
2071
+ * // Create the client
2072
+ * const testingClient = new GraphQLTestingClient(graphQLProvider);
2073
+ *
2074
+ * // Run a test
2075
+ * const result = await testingClient.RunTest({
2076
+ * testId: "test-uuid",
2077
+ * verbose: true,
2078
+ * environment: "dev"
2079
+ * });
2080
+ *
2081
+ * // Run a test suite
2082
+ * const suiteResult = await testingClient.RunTestSuite({
2083
+ * suiteId: "suite-uuid",
2084
+ * parallel: true
2085
+ * });
2086
+ * ```
2087
+ */
2088
+ declare class GraphQLTestingClient {
2089
+ private _dataProvider;
2090
+ /**
2091
+ * Creates a new GraphQLTestingClient instance.
2092
+ * @param dataProvider The GraphQL data provider to use for queries
2093
+ */
2094
+ constructor(dataProvider: GraphQLDataProvider);
2095
+ /**
2096
+ * Run a single test with the specified parameters.
2097
+ *
2098
+ * This method invokes a test on the server through GraphQL and returns the result.
2099
+ * If a progress callback is provided in params.onProgress, this method will subscribe
2100
+ * to real-time progress updates from the GraphQL server and forward them to the callback.
2101
+ *
2102
+ * @param params The parameters for running the test
2103
+ * @returns A Promise that resolves to a RunTestResult object
2104
+ *
2105
+ * @example
2106
+ * ```typescript
2107
+ * const result = await testingClient.RunTest({
2108
+ * testId: "test-uuid",
2109
+ * verbose: true,
2110
+ * environment: "staging",
2111
+ * onProgress: (progress) => {
2112
+ * console.log(`${progress.currentStep}: ${progress.message} (${progress.percentage}%)`);
2113
+ * }
2114
+ * });
2115
+ *
2116
+ * if (result.success) {
2117
+ * console.log('Test passed!', result.result);
2118
+ * } else {
2119
+ * console.error('Test failed:', result.errorMessage);
2120
+ * }
2121
+ * ```
2122
+ */
2123
+ RunTest(params: RunTestParams): Promise<RunTestResult>;
2124
+ /**
2125
+ * Run a test suite with the specified parameters.
2126
+ *
2127
+ * If a progress callback is provided in params.onProgress, this method will subscribe
2128
+ * to real-time progress updates from the GraphQL server and forward them to the callback.
2129
+ *
2130
+ * @param params The parameters for running the test suite
2131
+ * @returns A Promise that resolves to a RunTestSuiteResult object
2132
+ *
2133
+ * @example
2134
+ * ```typescript
2135
+ * const result = await testingClient.RunTestSuite({
2136
+ * suiteId: "suite-uuid",
2137
+ * parallel: true,
2138
+ * verbose: false,
2139
+ * onProgress: (progress) => {
2140
+ * console.log(`Progress: ${progress.message} (${progress.percentage}%)`);
2141
+ * }
2142
+ * });
2143
+ *
2144
+ * console.log(`Suite: ${result.result.totalTests} tests run`);
2145
+ * console.log(`Passed: ${result.result.passedTests}`);
2146
+ * ```
2147
+ */
2148
+ RunTestSuite(params: RunTestSuiteParams): Promise<RunTestSuiteResult>;
2149
+ /**
2150
+ * Check if a test is currently running
2151
+ *
2152
+ * @param testId The test ID to check
2153
+ * @returns True if the test is running, false otherwise
2154
+ */
2155
+ IsTestRunning(testId: string): Promise<boolean>;
2156
+ private processTestResult;
2157
+ private processSuiteResult;
2158
+ private handleError;
2159
+ }
2160
+
2017
2161
  interface ComponentDataRequirements {
2018
2162
  /**
2019
2163
  * How the component gets its data
@@ -2345,6 +2489,19 @@ declare class ComponentSpec {
2345
2489
  * Technical explanation of the component in markdown.
2346
2490
  */
2347
2491
  technicalDesign: string;
2492
+ /**
2493
+ * Optional array of diagrams that use Mermaid syntax to illustrate component design.
2494
+ * When provided each entry in the array specifies a title, optional description and the mermaid content itself.
2495
+ * Examples of diagrams include:
2496
+ * - Flowcharts of the process the component implements
2497
+ * - Entity-relationship diagrams of the data model the component uses
2498
+ * - Sequence diagrams illustrating interactions between the components various parts
2499
+ */
2500
+ diagrams?: Array<{
2501
+ title: string;
2502
+ description?: string;
2503
+ content: string;
2504
+ }>;
2348
2505
  /**
2349
2506
  * Properties the component accepts, if any
2350
2507
  */
@@ -2374,6 +2531,21 @@ declare class ComponentSpec {
2374
2531
  * Relevant examples of components intended to inspire this component's creation
2375
2532
  */
2376
2533
  relevantExamples?: ComponentExample[];
2534
+ /**
2535
+ * Self-declared maturity level of the component. When a component is "in progress" and is not
2536
+ * yet complete but is partially done, it can be marked as "incomplete". When it is functionally complete
2537
+ * but not yet widely tested, it can be marked as "beta". When it is fully complete and tested, it can be marked
2538
+ * as "production". This is intended to help architects and developers understand the readiness of a component
2539
+ * for use in production systems.
2540
+ */
2541
+ readinessLevel?: "incomplete" | "beta" | "production";
2542
+ /**
2543
+ * If a component isn't complete or encounters problems in testing, this field can be used to
2544
+ * track a work plan for completing or fixing the component. Generally this work plan string will contain
2545
+ * a markdown formatted list of tasks to be done with rich explanations to allow developers (human+AI) to
2546
+ * collaborate on completing the component.
2547
+ */
2548
+ workPlan?: string;
2377
2549
  }
2378
2550
  /**
2379
2551
  * Defines standard and custom methods a component implements
@@ -2863,4 +3035,4 @@ declare class GraphQLComponentRegistryClient {
2863
3035
  SendComponentFeedback(params: ComponentFeedbackParams): Promise<ComponentFeedbackResponse>;
2864
3036
  }
2865
3037
 
2866
- 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 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 };
3038
+ 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, GraphQLTestingClient, GraphQLTransactionGroup, type QueryEntity, type QueryField, type QueryParameter, type QueryPermission, type QueryPermissionInput, type RegistryComponentSearchResult, RoleInput, RolesAndUsersInput, type RunAIPromptParams, type RunAIPromptResult, type RunDynamicViewSystemUserInput, type RunQuerySystemUserResult, type RunTestParams, type RunTestResult, type RunTestSuiteParams, type RunTestSuiteResult, type RunViewByIDSystemUserInput, type RunViewByNameSystemUserInput, type RunViewSystemUserInput, type RunViewSystemUserResult, type RunViewSystemUserResultRow, type SearchRegistryComponentsParams, type SimplePromptResult, SimpleRemoteEntity, SimpleRemoteEntityField, SimpleRemoteEntityOutput, SyncDataAction, SyncDataResult, SyncRolesAndUsersResult, type TestExecutionProgress, type UpdateQueryInput, type UpdateQueryResult, UserInput, setupGraphQLClient };
package/dist/index.d.mts CHANGED
@@ -2014,6 +2014,150 @@ declare class GraphQLActionClient {
2014
2014
  private handleEntityActionError;
2015
2015
  }
2016
2016
 
2017
+ /**
2018
+ * Parameters for running a test
2019
+ */
2020
+ interface RunTestParams {
2021
+ testId: string;
2022
+ verbose?: boolean;
2023
+ environment?: string;
2024
+ onProgress?: (progress: TestExecutionProgress) => void;
2025
+ }
2026
+ /**
2027
+ * Result from running a test
2028
+ */
2029
+ interface RunTestResult {
2030
+ success: boolean;
2031
+ errorMessage?: string;
2032
+ executionTimeMs?: number;
2033
+ result: any;
2034
+ }
2035
+ /**
2036
+ * Parameters for running a test suite
2037
+ */
2038
+ interface RunTestSuiteParams {
2039
+ suiteId: string;
2040
+ verbose?: boolean;
2041
+ environment?: string;
2042
+ parallel?: boolean;
2043
+ onProgress?: (progress: TestExecutionProgress) => void;
2044
+ }
2045
+ /**
2046
+ * Result from running a test suite
2047
+ */
2048
+ interface RunTestSuiteResult {
2049
+ success: boolean;
2050
+ errorMessage?: string;
2051
+ executionTimeMs?: number;
2052
+ result: any;
2053
+ }
2054
+ /**
2055
+ * Test execution progress update
2056
+ */
2057
+ interface TestExecutionProgress {
2058
+ currentStep: string;
2059
+ percentage: number;
2060
+ message: string;
2061
+ testName?: string;
2062
+ driverType?: string;
2063
+ oracleEvaluation?: string;
2064
+ }
2065
+ /**
2066
+ * Client for executing tests through GraphQL.
2067
+ * This class provides an easy way to run tests and test suites from a client application.
2068
+ *
2069
+ * @example
2070
+ * ```typescript
2071
+ * // Create the client
2072
+ * const testingClient = new GraphQLTestingClient(graphQLProvider);
2073
+ *
2074
+ * // Run a test
2075
+ * const result = await testingClient.RunTest({
2076
+ * testId: "test-uuid",
2077
+ * verbose: true,
2078
+ * environment: "dev"
2079
+ * });
2080
+ *
2081
+ * // Run a test suite
2082
+ * const suiteResult = await testingClient.RunTestSuite({
2083
+ * suiteId: "suite-uuid",
2084
+ * parallel: true
2085
+ * });
2086
+ * ```
2087
+ */
2088
+ declare class GraphQLTestingClient {
2089
+ private _dataProvider;
2090
+ /**
2091
+ * Creates a new GraphQLTestingClient instance.
2092
+ * @param dataProvider The GraphQL data provider to use for queries
2093
+ */
2094
+ constructor(dataProvider: GraphQLDataProvider);
2095
+ /**
2096
+ * Run a single test with the specified parameters.
2097
+ *
2098
+ * This method invokes a test on the server through GraphQL and returns the result.
2099
+ * If a progress callback is provided in params.onProgress, this method will subscribe
2100
+ * to real-time progress updates from the GraphQL server and forward them to the callback.
2101
+ *
2102
+ * @param params The parameters for running the test
2103
+ * @returns A Promise that resolves to a RunTestResult object
2104
+ *
2105
+ * @example
2106
+ * ```typescript
2107
+ * const result = await testingClient.RunTest({
2108
+ * testId: "test-uuid",
2109
+ * verbose: true,
2110
+ * environment: "staging",
2111
+ * onProgress: (progress) => {
2112
+ * console.log(`${progress.currentStep}: ${progress.message} (${progress.percentage}%)`);
2113
+ * }
2114
+ * });
2115
+ *
2116
+ * if (result.success) {
2117
+ * console.log('Test passed!', result.result);
2118
+ * } else {
2119
+ * console.error('Test failed:', result.errorMessage);
2120
+ * }
2121
+ * ```
2122
+ */
2123
+ RunTest(params: RunTestParams): Promise<RunTestResult>;
2124
+ /**
2125
+ * Run a test suite with the specified parameters.
2126
+ *
2127
+ * If a progress callback is provided in params.onProgress, this method will subscribe
2128
+ * to real-time progress updates from the GraphQL server and forward them to the callback.
2129
+ *
2130
+ * @param params The parameters for running the test suite
2131
+ * @returns A Promise that resolves to a RunTestSuiteResult object
2132
+ *
2133
+ * @example
2134
+ * ```typescript
2135
+ * const result = await testingClient.RunTestSuite({
2136
+ * suiteId: "suite-uuid",
2137
+ * parallel: true,
2138
+ * verbose: false,
2139
+ * onProgress: (progress) => {
2140
+ * console.log(`Progress: ${progress.message} (${progress.percentage}%)`);
2141
+ * }
2142
+ * });
2143
+ *
2144
+ * console.log(`Suite: ${result.result.totalTests} tests run`);
2145
+ * console.log(`Passed: ${result.result.passedTests}`);
2146
+ * ```
2147
+ */
2148
+ RunTestSuite(params: RunTestSuiteParams): Promise<RunTestSuiteResult>;
2149
+ /**
2150
+ * Check if a test is currently running
2151
+ *
2152
+ * @param testId The test ID to check
2153
+ * @returns True if the test is running, false otherwise
2154
+ */
2155
+ IsTestRunning(testId: string): Promise<boolean>;
2156
+ private processTestResult;
2157
+ private processSuiteResult;
2158
+ private handleError;
2159
+ }
2160
+
2017
2161
  interface ComponentDataRequirements {
2018
2162
  /**
2019
2163
  * How the component gets its data
@@ -2345,6 +2489,19 @@ declare class ComponentSpec {
2345
2489
  * Technical explanation of the component in markdown.
2346
2490
  */
2347
2491
  technicalDesign: string;
2492
+ /**
2493
+ * Optional array of diagrams that use Mermaid syntax to illustrate component design.
2494
+ * When provided each entry in the array specifies a title, optional description and the mermaid content itself.
2495
+ * Examples of diagrams include:
2496
+ * - Flowcharts of the process the component implements
2497
+ * - Entity-relationship diagrams of the data model the component uses
2498
+ * - Sequence diagrams illustrating interactions between the components various parts
2499
+ */
2500
+ diagrams?: Array<{
2501
+ title: string;
2502
+ description?: string;
2503
+ content: string;
2504
+ }>;
2348
2505
  /**
2349
2506
  * Properties the component accepts, if any
2350
2507
  */
@@ -2374,6 +2531,21 @@ declare class ComponentSpec {
2374
2531
  * Relevant examples of components intended to inspire this component's creation
2375
2532
  */
2376
2533
  relevantExamples?: ComponentExample[];
2534
+ /**
2535
+ * Self-declared maturity level of the component. When a component is "in progress" and is not
2536
+ * yet complete but is partially done, it can be marked as "incomplete". When it is functionally complete
2537
+ * but not yet widely tested, it can be marked as "beta". When it is fully complete and tested, it can be marked
2538
+ * as "production". This is intended to help architects and developers understand the readiness of a component
2539
+ * for use in production systems.
2540
+ */
2541
+ readinessLevel?: "incomplete" | "beta" | "production";
2542
+ /**
2543
+ * If a component isn't complete or encounters problems in testing, this field can be used to
2544
+ * track a work plan for completing or fixing the component. Generally this work plan string will contain
2545
+ * a markdown formatted list of tasks to be done with rich explanations to allow developers (human+AI) to
2546
+ * collaborate on completing the component.
2547
+ */
2548
+ workPlan?: string;
2377
2549
  }
2378
2550
  /**
2379
2551
  * Defines standard and custom methods a component implements
@@ -2863,4 +3035,4 @@ declare class GraphQLComponentRegistryClient {
2863
3035
  SendComponentFeedback(params: ComponentFeedbackParams): Promise<ComponentFeedbackResponse>;
2864
3036
  }
2865
3037
 
2866
- 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 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 };
3038
+ 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, GraphQLTestingClient, GraphQLTransactionGroup, type QueryEntity, type QueryField, type QueryParameter, type QueryPermission, type QueryPermissionInput, type RegistryComponentSearchResult, RoleInput, RolesAndUsersInput, type RunAIPromptParams, type RunAIPromptResult, type RunDynamicViewSystemUserInput, type RunQuerySystemUserResult, type RunTestParams, type RunTestResult, type RunTestSuiteParams, type RunTestSuiteResult, type RunViewByIDSystemUserInput, type RunViewByNameSystemUserInput, type RunViewSystemUserInput, type RunViewSystemUserResult, type RunViewSystemUserResultRow, type SearchRegistryComponentsParams, type SimplePromptResult, SimpleRemoteEntity, SimpleRemoteEntityField, SimpleRemoteEntityOutput, SyncDataAction, SyncDataResult, SyncRolesAndUsersResult, type TestExecutionProgress, type UpdateQueryInput, type UpdateQueryResult, UserInput, setupGraphQLClient };