@salesforce/lds-adapters-platform-learning 1.299.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/LICENSE.txt +82 -0
- package/dist/es/es2018/platform-learning.js +456 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/evaluateLearningItem.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/adapters/evaluateLearningItemForCommunity.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectCommunitiesLearningItemActionsEvaluateByCommunityIdAndLearningItemId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectLearningItemActionsEvaluateByLearningItemId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/EvaluateLearningItemInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/LearningItemProgressRepresentation.d.ts +50 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +486 -0
- package/src/raml/api.raml +98 -0
- package/src/raml/luvio.raml +24 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
import { LearningItemProgressRepresentation as types_LearningItemProgressRepresentation_LearningItemProgressRepresentation } from '../types/LearningItemProgressRepresentation';
|
|
3
|
+
export interface ResourceRequestConfig {
|
|
4
|
+
urlParams: {
|
|
5
|
+
communityId: string;
|
|
6
|
+
learningItemId: string;
|
|
7
|
+
};
|
|
8
|
+
body: {
|
|
9
|
+
details?: {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
15
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_LearningItemProgressRepresentation_LearningItemProgressRepresentation): void;
|
|
16
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation, any>;
|
|
17
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
18
|
+
export default createResourceRequest;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
import { LearningItemProgressRepresentation as types_LearningItemProgressRepresentation_LearningItemProgressRepresentation } from '../types/LearningItemProgressRepresentation';
|
|
3
|
+
export interface ResourceRequestConfig {
|
|
4
|
+
urlParams: {
|
|
5
|
+
learningItemId: string;
|
|
6
|
+
};
|
|
7
|
+
body: {
|
|
8
|
+
details?: {
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
14
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_LearningItemProgressRepresentation_LearningItemProgressRepresentation): void;
|
|
15
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_LearningItemProgressRepresentation_LearningItemProgressRepresentation, any>;
|
|
16
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
17
|
+
export default createResourceRequest;
|
|
@@ -0,0 +1,32 @@
|
|
|
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, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
+
export declare const VERSION = "df8c2c7eb8ac96926f1c7eccd2ad5690";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: EvaluateLearningItemInputRepresentation, existing: EvaluateLearningItemInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): EvaluateLearningItemInputRepresentationNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: EvaluateLearningItemInputRepresentationNormalized, incoming: EvaluateLearningItemInputRepresentationNormalized): boolean;
|
|
8
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: EvaluateLearningItemInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Represents the data that's sent for evaluating the learning item
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface EvaluateLearningItemInputRepresentationNormalized {
|
|
17
|
+
/** The learning item data, in JSON format, that you want to evaluate. */
|
|
18
|
+
details?: {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents the data that's sent for evaluating the learning item
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface EvaluateLearningItemInputRepresentation {
|
|
29
|
+
details?: {
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
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';
|
|
2
|
+
export declare const TTL = 15000;
|
|
3
|
+
export declare const VERSION = "987ec5d201417fd82d2e377adf8ef5cd";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
7
|
+
learning_item_progress_id: string;
|
|
8
|
+
}
|
|
9
|
+
export type LearningItemProgressRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
|
|
10
|
+
export type PartialLearningItemProgressRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
|
|
11
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
|
|
12
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): LearningItemProgressRepresentationNormalizedKeyMetadata;
|
|
13
|
+
export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: LearningItemProgressRepresentation): string;
|
|
14
|
+
export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: LearningItemProgressRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
|
+
export declare function normalize(input: LearningItemProgressRepresentation, existing: LearningItemProgressRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): LearningItemProgressRepresentationNormalized;
|
|
16
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
17
|
+
export declare function equals(existing: LearningItemProgressRepresentationNormalized, incoming: LearningItemProgressRepresentationNormalized): boolean;
|
|
18
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
19
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: LearningItemProgressRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
20
|
+
/**
|
|
21
|
+
* Represents the response that's returned after a learning item is evaluated successfully
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* learning_item_progress_id (string): id
|
|
25
|
+
*/
|
|
26
|
+
export interface LearningItemProgressRepresentationNormalized {
|
|
27
|
+
/** The date when the user completed the learning item */
|
|
28
|
+
completedDate: string | null;
|
|
29
|
+
/** Percentage of the learning item that's complete */
|
|
30
|
+
completedPercent: number | null;
|
|
31
|
+
/** The ID of the learning item progress */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Whether the learning item is complete (true) or not (false). The default value is false */
|
|
34
|
+
isCompleted: boolean;
|
|
35
|
+
/** The ID of the learning item that was evaluated */
|
|
36
|
+
learningItemId: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents the response that's returned after a learning item is evaluated successfully
|
|
40
|
+
*
|
|
41
|
+
* Keys:
|
|
42
|
+
* learning_item_progress_id (string): id
|
|
43
|
+
*/
|
|
44
|
+
export interface LearningItemProgressRepresentation {
|
|
45
|
+
completedDate: string | null;
|
|
46
|
+
completedPercent: number | null;
|
|
47
|
+
id: string;
|
|
48
|
+
isCompleted: boolean;
|
|
49
|
+
learningItemId: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
+
export declare const ObjectKeys: {
|
|
3
|
+
(o: object): string[];
|
|
4
|
+
(o: {}): string[];
|
|
5
|
+
}, ObjectCreate: {
|
|
6
|
+
(o: object | null): any;
|
|
7
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
8
|
+
}, ObjectAssign: {
|
|
9
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
10
|
+
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
|
11
|
+
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
|
12
|
+
(target: object, ...sources: any[]): any;
|
|
13
|
+
};
|
|
14
|
+
export declare const ArrayIsArray: (arg: any) => arg is any[];
|
|
15
|
+
export declare const JSONStringify: {
|
|
16
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
17
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
18
|
+
};
|
|
19
|
+
type AllowedPrimitives = boolean | string | number | Date | null;
|
|
20
|
+
type Value<T> = T extends AllowedPrimitives ? T : RecursivePartial<T>;
|
|
21
|
+
export type RecursivePartial<T> = null | {
|
|
22
|
+
[P in keyof T]?: T[P] extends Array<infer U> ? Array<Value<U>> | null : Value<T[P]> | null;
|
|
23
|
+
};
|
|
24
|
+
export declare function equalsArray<U, V extends U[]>(a: V, b: V, equalsItem: (itemA: U, itemB: U) => boolean | void): boolean;
|
|
25
|
+
export declare function equalsObject<U, V extends {
|
|
26
|
+
[key: string]: U;
|
|
27
|
+
}>(a: V, b: V, equalsProp: (propA: U, propB: U) => boolean | void): boolean;
|
|
28
|
+
export declare function createLink(ref: string | $64$luvio_engine_NormalizedKeyMetadata): {
|
|
29
|
+
__ref: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function assignMetadataLink(entry: any, metadataKey: string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
32
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/lds-adapters-platform-learning",
|
|
3
|
+
"version": "1.299.0",
|
|
4
|
+
"description": "Learning Platform Public API",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"main": "dist/es/es2018/platform-learning.js",
|
|
7
|
+
"module": "dist/es/es2018/platform-learning.js",
|
|
8
|
+
"types": "dist/es/es2018/types/src/generated/artifacts/main.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"sfdc",
|
|
12
|
+
"src/raml/*"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/es/es2018/types/src/generated/artifacts/main.d.ts",
|
|
17
|
+
"import": "./dist/es/es2018/platform-learning.js",
|
|
18
|
+
"require": "./dist/es/es2018/platform-learning.js"
|
|
19
|
+
},
|
|
20
|
+
"./sfdc": {
|
|
21
|
+
"types": "./sfdc/index.d.ts",
|
|
22
|
+
"import": "./sfdc/index.js",
|
|
23
|
+
"default": "./sfdc/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sfdc": {
|
|
27
|
+
"namespace": "lightning",
|
|
28
|
+
"module": "platformLearningApi"
|
|
29
|
+
},
|
|
30
|
+
"contributors": [
|
|
31
|
+
"n.chandarraj@salesforce.com"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "yarn build:services",
|
|
35
|
+
"build:raml": "luvio generate src/raml/luvio.raml src/generated -p '../lds-compiler-plugins'",
|
|
36
|
+
"build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
|
|
37
|
+
"clean": "rm -rf dist sfdc src/generated",
|
|
38
|
+
"release:core": "../../scripts/release/core.js --adapter=lds-adapters-platform-learning",
|
|
39
|
+
"release:corejar": "yarn build && ../core-build/scripts/core.js --adapter=lds-adapters-platform-learning",
|
|
40
|
+
"test:unit": "jest"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@salesforce/lds-bindings": "^1.299.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.299.0"
|
|
47
|
+
},
|
|
48
|
+
"nx": {
|
|
49
|
+
"targets": {
|
|
50
|
+
"build": {
|
|
51
|
+
"outputs": [
|
|
52
|
+
"{projectRoot}/dist",
|
|
53
|
+
"{projectRoot}/sfdc"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"build:raml": {
|
|
57
|
+
"outputs": [
|
|
58
|
+
"{projectRoot}/src/generated"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"volta": {
|
|
64
|
+
"extends": "../../package.json"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/sfdc/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/es/es2018/types/src/generated/artifacts/sfdc';
|