@salesforce/lds-adapters-platform-learning-content 1.132.0 → 1.133.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.
@@ -0,0 +1,27 @@
1
+ import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted, UncoercedConfiguration as adapter$45$utils_UncoercedConfiguration } from './adapter-utils';
2
+ import { ResourceRequestConfig as resources_getLearningContentPlatformLearningFeedbackresultByLearningItemId_ResourceRequestConfig } from '../resources/getLearningContentPlatformLearningFeedbackresultByLearningItemId';
3
+ import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
+ import { FeedbackResultRepresentation as types_FeedbackResultRepresentation_FeedbackResultRepresentation, KeyParams as types_FeedbackResultRepresentation_KeyParams } from '../types/FeedbackResultRepresentation';
5
+ export declare const adapterName = "getFeedbackResult";
6
+ export declare const getFeedbackResult_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
+ export interface GetFeedbackResultConfig {
8
+ learningItemId: string;
9
+ }
10
+ export declare function createResourceParams(config: GetFeedbackResultConfig): resources_getLearningContentPlatformLearningFeedbackresultByLearningItemId_ResourceRequestConfig;
11
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig): string;
12
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig): $64$luvio_engine_NormalizedKeyMetadata;
13
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetFeedbackResultConfig>): adapter$45$utils_Untrusted<GetFeedbackResultConfig>;
14
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetFeedbackResultConfig | null;
15
+ export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig): $64$luvio_engine_Fragment;
16
+ export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig): $64$luvio_engine_Snapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, any>;
17
+ export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig, resourceParams: resources_getLearningContentPlatformLearningFeedbackresultByLearningItemId_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_FeedbackResultRepresentation_FeedbackResultRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, any>>;
18
+ export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig, resourceParams: resources_getLearningContentPlatformLearningFeedbackresultByLearningItemId_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
19
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetFeedbackResultConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, any>>;
20
+ export type BuildSnapshotContext = {
21
+ luvio: $64$luvio_engine_Luvio;
22
+ config: GetFeedbackResultConfig;
23
+ };
24
+ export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, any>>;
25
+ export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_FeedbackResultRepresentation_FeedbackResultRepresentation>): $64$luvio_engine_Snapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, any>;
26
+ export declare const getFeedbackResultAdapterFactory: $64$luvio_engine_AdapterFactory<GetFeedbackResultConfig, types_FeedbackResultRepresentation_FeedbackResultRepresentation>;
27
+ export declare const notifyChangeFactory: (luvio: $64$luvio_engine_Luvio, options?: $64$luvio_engine_DispatchResourceRequestContext) => (configs: adapter$45$utils_UncoercedConfiguration<types_FeedbackResultRepresentation_KeyParams, any>[]) => void;
@@ -1,5 +1,6 @@
1
1
  export { getFeaturedItemsRecommendedListAdapterFactory } from '../adapters/getFeaturedItemsRecommendedList';
2
2
  export { getFeaturedItemsRelatedListAdapterFactory } from '../adapters/getFeaturedItemsRelatedList';
3
+ export { getFeedbackResultAdapterFactory } from '../adapters/getFeedbackResult';
3
4
  export { getLearningSearchDescribeAdapterFactory } from '../adapters/getLearningSearchDescribe';
4
5
  export { getLearningSearchResultsAdapterFactory } from '../adapters/getLearningSearchResults';
5
6
  export { getLearningConfigAdapterFactory } from '../adapters/getLearningConfig';
@@ -1,6 +1,8 @@
1
1
  declare let evaluateLearningItem: any;
2
2
  declare let getFeaturedItemsRecommendedList: any;
3
3
  declare let getFeaturedItemsRelatedList: any;
4
+ declare let getFeedbackResult: any;
5
+ declare let getFeedbackResultNotifyChange: any;
4
6
  declare let getLearningConfig: any;
5
7
  declare let getLearningItemProgress: any;
6
8
  declare let getLearningItemsList: any;
@@ -16,6 +18,7 @@ declare let getTextLesson: any;
16
18
  declare let getTextLessonNotifyChange: any;
17
19
  declare let getFeaturedItemsRecommendedList_imperative: any;
18
20
  declare let getFeaturedItemsRelatedList_imperative: any;
21
+ declare let getFeedbackResult_imperative: any;
19
22
  declare let getLearningConfig_imperative: any;
20
23
  declare let getLearningItemProgress_imperative: any;
21
24
  declare let getLearningItemsList_imperative: any;
@@ -25,4 +28,4 @@ declare let getLearningSearchDescribe_imperative: any;
25
28
  declare let getLearningSearchResults_imperative: any;
26
29
  declare let getModule_imperative: any;
27
30
  declare let getTextLesson_imperative: any;
28
- export { evaluateLearningItem, getFeaturedItemsRecommendedList, getFeaturedItemsRelatedList, getLearningConfig, getLearningItemProgress, getLearningItemsList, getLearningModel, getLearningPractice, getLearningPracticeNotifyChange, getLearningSearchDescribe, getLearningSearchResults, getLearningSearchResultsNotifyChange, getModule, getModuleNotifyChange, getTextLesson, getTextLessonNotifyChange, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList_imperative, getLearningConfig_imperative, getLearningItemProgress_imperative, getLearningItemsList_imperative, getLearningModel_imperative, getLearningPractice_imperative, getLearningSearchDescribe_imperative, getLearningSearchResults_imperative, getModule_imperative, getTextLesson_imperative };
31
+ export { evaluateLearningItem, getFeaturedItemsRecommendedList, getFeaturedItemsRelatedList, getFeedbackResult, getFeedbackResultNotifyChange, getLearningConfig, getLearningItemProgress, getLearningItemsList, getLearningModel, getLearningPractice, getLearningPracticeNotifyChange, getLearningSearchDescribe, getLearningSearchResults, getLearningSearchResultsNotifyChange, getModule, getModuleNotifyChange, getTextLesson, getTextLessonNotifyChange, getFeaturedItemsRecommendedList_imperative, getFeaturedItemsRelatedList_imperative, getFeedbackResult_imperative, getLearningConfig_imperative, getLearningItemProgress_imperative, getLearningItemsList_imperative, getLearningModel_imperative, getLearningPractice_imperative, getLearningSearchDescribe_imperative, getLearningSearchResults_imperative, getModule_imperative, getTextLesson_imperative };
@@ -0,0 +1,16 @@
1
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
+ import { FeedbackResultRepresentation as types_FeedbackResultRepresentation_FeedbackResultRepresentation } from '../types/FeedbackResultRepresentation';
3
+ export interface ResourceRequestConfig {
4
+ urlParams: {
5
+ learningItemId: string;
6
+ };
7
+ }
8
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
10
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
11
+ export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_FeedbackResultRepresentation_FeedbackResultRepresentation): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_FeedbackResultRepresentation_FeedbackResultRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_FeedbackResultRepresentation_FeedbackResultRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_FeedbackResultRepresentation_FeedbackResultRepresentation, any>;
13
+ export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_FeedbackResultRepresentation_FeedbackResultRepresentation>): $64$luvio_engine_ErrorSnapshot;
14
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
15
+ export default createResourceRequest;
16
+ export declare function createResourceRequestFromRepresentation(representation: types_FeedbackResultRepresentation_FeedbackResultRepresentation): $64$luvio_engine_ResourceRequest;
@@ -0,0 +1,52 @@
1
+ import { SurveyQuestionResponseRepresetation as SurveyQuestionResponseRepresetation_SurveyQuestionResponseRepresetation } from './SurveyQuestionResponseRepresetation';
2
+ import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
3
+ export declare const TTL = 15000;
4
+ export declare const VERSION = "49558b95e59b76b07748b6f259ebe54d";
5
+ export declare function validate(obj: any, path?: string): TypeError | null;
6
+ export declare const RepresentationType: string;
7
+ export interface KeyParams extends $64$luvio_engine_KeyMetadata {
8
+ learning_item_id: string;
9
+ }
10
+ export type FeedbackResultRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
11
+ export type PartialFeedbackResultRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
12
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
13
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): FeedbackResultRepresentationNormalizedKeyMetadata;
14
+ export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: FeedbackResultRepresentation): string;
15
+ export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: FeedbackResultRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
16
+ export declare function normalize(input: FeedbackResultRepresentation, existing: FeedbackResultRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeedbackResultRepresentationNormalized;
17
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
18
+ export declare function equals(existing: FeedbackResultRepresentationNormalized, incoming: FeedbackResultRepresentationNormalized): boolean;
19
+ export declare function deepFreeze(input: FeedbackResultRepresentation): void;
20
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
21
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FeedbackResultRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
22
+ /**
23
+ * This representation returns coaching feedback result if any feedback exists
24
+ *
25
+ * Keys:
26
+ * learning_item_id (string): learningItemId
27
+ */
28
+ export interface FeedbackResultRepresentationNormalized {
29
+ /** Returns if a feedback request submitted */
30
+ isFeedbackRequestSubmitted: boolean;
31
+ /** Returns if there is feedback result exists */
32
+ isFeedbackResultReturned: boolean;
33
+ /** Learning Item ID of the Coaching Feedback Result */
34
+ learningItemId: string;
35
+ /** List of the SurveyQuestionResponse Representation */
36
+ surveyQuestionResponseRepresetationList: Array<SurveyQuestionResponseRepresetation_SurveyQuestionResponseRepresetation>;
37
+ /** The total average score of all rating questions */
38
+ totalAvgScore: number;
39
+ }
40
+ /**
41
+ * This representation returns coaching feedback result if any feedback exists
42
+ *
43
+ * Keys:
44
+ * learning_item_id (string): learningItemId
45
+ */
46
+ export interface FeedbackResultRepresentation {
47
+ isFeedbackRequestSubmitted: boolean;
48
+ isFeedbackResultReturned: boolean;
49
+ learningItemId: string;
50
+ surveyQuestionResponseRepresetationList: Array<SurveyQuestionResponseRepresetation_SurveyQuestionResponseRepresetation>;
51
+ totalAvgScore: number;
52
+ }
@@ -0,0 +1,51 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
+ export declare const VERSION = "a415abdc6f1eb9f80ab2e7981189f769";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: SurveyQuestionResponseRepresetation, existing: SurveyQuestionResponseRepresetationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SurveyQuestionResponseRepresetationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: SurveyQuestionResponseRepresetationNormalized, incoming: SurveyQuestionResponseRepresetationNormalized): boolean;
8
+ export declare function deepFreeze(input: SurveyQuestionResponseRepresetation): void;
9
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
10
+ export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SurveyQuestionResponseRepresetation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
+ /**
12
+ * This representation maps to the SurveyQuestionResponse class
13
+ *
14
+ * Keys:
15
+ * (none)
16
+ */
17
+ export interface SurveyQuestionResponseRepresetationNormalized {
18
+ /** Average score of the question */
19
+ avgScore: number;
20
+ /** If question response is a rating value or text value */
21
+ isRatingResponse: boolean;
22
+ /** Description of the survey question */
23
+ questionDescription: string;
24
+ /** Id of the survey question response */
25
+ questionId: string;
26
+ /** Name of the survey question name */
27
+ questionName: string;
28
+ /** Rating value list of the rating type question response */
29
+ ratingValues: Array<number>;
30
+ /** User Id, Text value map of the text type question response */
31
+ textValues: {
32
+ [key: string]: string;
33
+ };
34
+ }
35
+ /**
36
+ * This representation maps to the SurveyQuestionResponse class
37
+ *
38
+ * Keys:
39
+ * (none)
40
+ */
41
+ export interface SurveyQuestionResponseRepresetation {
42
+ avgScore: number;
43
+ isRatingResponse: boolean;
44
+ questionDescription: string;
45
+ questionId: string;
46
+ questionName: string;
47
+ ratingValues: Array<number>;
48
+ textValues: {
49
+ [key: string]: string;
50
+ };
51
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-learning-content",
3
- "version": "1.132.0",
3
+ "version": "1.133.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Learning content platform",
6
6
  "main": "dist/es/es2018/platform-learning-content.js",