@salesforce/lds-drafts 1.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.
package/dist/main.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export { DraftQueue, DraftQueueState, DraftAction, ErrorDraftAction, PendingDraftAction, CompletedDraftAction, DraftActionStatus, ProcessActionResult, DraftQueueChangeListener, DraftActionMetadata, DraftQueueEventType, QueueOperation, } from './DraftQueue';
2
+ export { AdapterBuildNetworkSnapshot, buildLuvioOverrideForDraftAdapters, } from './DraftAwareAdapter';
3
+ export { DRAFT_ID_MAPPINGS_SEGMENT, DraftKeyMapping } from './DraftIdMapping';
4
+ export { DurableDraftQueue, DRAFT_SEGMENT } from './DurableDraftQueue';
5
+ export { generateUniqueDraftActionId } from './utils/id';
6
+ export { DurableDraftStore } from './DurableDraftStore';
7
+ export { DraftStore } from './DraftStore';
8
+ export { DraftManager, DraftManagerState, DraftActionOperationType, DraftQueueItem, DraftQueueItemMetadata, } from './DraftManager';
9
+ export { ActionHandler, ReplacingActions, DraftIdAndKeyMapping, } from './actionHandlers/ActionHandler';
10
+ export type { CustomActionResult } from './actionHandlers/CustomActionHandler';
11
+ export { CustomActionResultType, CustomActionExecutor } from './actionHandlers/CustomActionHandler';
12
+ export { AbstractResourceRequestActionHandler, ResponseIngestionEntry, } from './actionHandlers/AbstractResourceRequestActionHandler';
13
+ export { makeEnvironmentDraftAware } from './makeEnvironmentDraftAware';
14
+ export * from './DraftFetchResponse';
15
+ export { DraftSynthesisErrorType, DraftSynthesisError, isDraftSynthesisError, } from './DraftSynthesisError';
@@ -0,0 +1,4 @@
1
+ import type { Luvio, ResourceRequest } from '@luvio/engine';
2
+ import type { DurableEnvironment, DurableStore } from '@luvio/environments';
3
+ import type { ActionHandler, DraftQueue } from './main';
4
+ export declare function makeEnvironmentDraftAware(luvio: Luvio, env: DurableEnvironment, durableStore: DurableStore, handlers: ActionHandler<ResourceRequest, any, any>[], draftQueue: DraftQueue): DurableEnvironment;
@@ -0,0 +1,2 @@
1
+ import type { Adapter } from '@luvio/engine';
2
+ export declare function getAdapterData<Config, Data>(adapter: Adapter<Config, Data>, config: Config): Promise<Data | undefined>;
@@ -0,0 +1 @@
1
+ export declare function clone<T>(obj: T): T;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generates a time-ordered, unique id to associate with a DraftAction. Ensures
3
+ * no collisions with existing draft action IDs.
4
+ */
5
+ export declare function generateUniqueDraftActionId(existingIds: string[]): string;
@@ -0,0 +1,24 @@
1
+ declare const keys: {
2
+ (o: object): string[];
3
+ (o: {}): string[];
4
+ }, create: {
5
+ (o: object | null): any;
6
+ (o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
7
+ }, assign: {
8
+ <T extends {}, U>(target: T, source: U): T & U;
9
+ <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
10
+ <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;
11
+ (target: object, ...sources: any[]): any;
12
+ }, values: {
13
+ <T>(o: {
14
+ [s: string]: T;
15
+ } | ArrayLike<T>): T[];
16
+ (o: {}): any[];
17
+ };
18
+ declare const stringify: {
19
+ (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
20
+ (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
21
+ }, parse: (text: string, reviver?: ((this: any, key: string, value: any) => any) | undefined) => any;
22
+ declare const shift: () => any;
23
+ declare const isArray: (arg: any) => arg is any[];
24
+ export { keys as ObjectKeys, create as ObjectCreate, assign as ObjectAssign, values as ObjectValues, stringify as JSONStringify, parse as JSONParse, shift as ArrayPrototypeShift, isArray as ArrayIsArray, };
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@salesforce/lds-drafts",
3
+ "version": "1.100.1",
4
+ "license": "SEE LICENSE IN LICENSE.txt",
5
+ "description": "LDS Drafts",
6
+ "main": "dist/ldsDrafts.js",
7
+ "module": "dist/ldsDrafts.js",
8
+ "types": "dist/main.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/ldsDrafts.js",
15
+ "types": "./dist/main.d.ts",
16
+ "default": "./dist/ldsDrafts.js"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "prepare": "yarn build",
21
+ "build": "rollup --config rollup.config.js",
22
+ "clean": "rm -rf dist",
23
+ "test:unit": "NODE_ENV=production jest",
24
+ "release:corejar": "yarn build && ../core-build/scripts/core.js --adapter=lds-drafts"
25
+ },
26
+ "dependencies": {
27
+ "@luvio/engine": "0.135.4",
28
+ "@luvio/environments": "0.135.4"
29
+ }
30
+ }