@salesforce/lds-adapters-community-microbatching 1.170.0 → 1.171.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/es/es2018/community-microbatching.js +9 -7
- package/dist/es/es2018/types/src/generated/resources/postConnectCommunitiesMicrobatchingByCommunityId.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/MicrobatchingIngestionInputRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/MicrobatchingIngestionInputWrapperRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/MicrobatchingIngestionOutputRepresentation.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/types/MicrobatchingIngestionRequestBodyInputRepresentation.d.ts +2 -2
- package/package.json +1 -1
- package/sfdc/index.js +10 -8
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey,
|
|
7
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -172,8 +172,7 @@ const ingest = function MicrobatchingIngestionOutputRepresentationIngest(input,
|
|
|
172
172
|
}
|
|
173
173
|
return createLink(key);
|
|
174
174
|
};
|
|
175
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
176
|
-
const rootKeySet = new StoreKeyMap();
|
|
175
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
177
176
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
178
177
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
179
178
|
rootKeySet.set(rootKey, {
|
|
@@ -181,14 +180,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
181
180
|
representationName: RepresentationType,
|
|
182
181
|
mergeable: false
|
|
183
182
|
});
|
|
184
|
-
return rootKeySet;
|
|
185
183
|
}
|
|
186
184
|
|
|
187
185
|
function select(luvio, params) {
|
|
188
186
|
return select$1();
|
|
189
187
|
}
|
|
190
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
191
|
-
|
|
188
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
189
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
192
190
|
}
|
|
193
191
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
194
192
|
const { body } = response;
|
|
@@ -273,7 +271,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
273
271
|
return luvio.handleSuccessResponse(() => {
|
|
274
272
|
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
275
273
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
276
|
-
}, () =>
|
|
274
|
+
}, () => {
|
|
275
|
+
const cache = new StoreKeyMap();
|
|
276
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
277
|
+
return cache;
|
|
278
|
+
});
|
|
277
279
|
}, (response) => {
|
|
278
280
|
deepFreeze(response);
|
|
279
281
|
throw response;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MicrobatchingIngestionInputRepresentation as types_MicrobatchingIngestionInputRepresentation_MicrobatchingIngestionInputRepresentation } from '../types/MicrobatchingIngestionInputRepresentation';
|
|
2
|
-
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment,
|
|
2
|
+
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';
|
|
3
3
|
import { MicrobatchingIngestionOutputRepresentation as types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation } from '../types/MicrobatchingIngestionOutputRepresentation';
|
|
4
4
|
export interface ResourceRequestConfig {
|
|
5
5
|
urlParams: {
|
|
@@ -10,7 +10,7 @@ export interface ResourceRequestConfig {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
13
|
-
export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation):
|
|
13
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation): void;
|
|
14
14
|
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation, any>;
|
|
15
15
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
16
16
|
export default createResourceRequest;
|
package/dist/es/es2018/types/src/generated/types/MicrobatchingIngestionInputRepresentation.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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,
|
|
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
2
|
export declare const VERSION = "d6460a3f3b539eaacae325efca70eb0e";
|
|
3
3
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
4
|
export declare const RepresentationType: string;
|
|
@@ -6,7 +6,7 @@ export declare function normalize(input: MicrobatchingIngestionInputRepresentati
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: MicrobatchingIngestionInputRepresentationNormalized, incoming: MicrobatchingIngestionInputRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Microbatching Ingestion Input Representation
|
|
12
12
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MicrobatchingIngestionInputRepresentation as MicrobatchingIngestionInputRepresentation_MicrobatchingIngestionInputRepresentation } from './MicrobatchingIngestionInputRepresentation';
|
|
2
|
-
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,
|
|
2
|
+
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';
|
|
3
3
|
export declare const VERSION = "9ee748701cf95cd53730e834dc12dafd";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
5
|
export declare const RepresentationType: string;
|
|
@@ -7,7 +7,7 @@ export declare function normalize(input: MicrobatchingIngestionInputWrapperRepre
|
|
|
7
7
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
8
|
export declare function equals(existing: MicrobatchingIngestionInputWrapperRepresentationNormalized, incoming: MicrobatchingIngestionInputWrapperRepresentationNormalized): boolean;
|
|
9
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionInputWrapperRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionInputWrapperRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
11
|
/**
|
|
12
12
|
* Wrapper Microbatching Ingestion Input Representation
|
|
13
13
|
*
|
package/dist/es/es2018/types/src/generated/types/MicrobatchingIngestionOutputRepresentation.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare function normalize(input: MicrobatchingIngestionOutputRepresentat
|
|
|
16
16
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
17
17
|
export declare function equals(existing: MicrobatchingIngestionOutputRepresentationNormalized, incoming: MicrobatchingIngestionOutputRepresentationNormalized): boolean;
|
|
18
18
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
19
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
19
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
20
20
|
/**
|
|
21
21
|
* Representation for microbatching buffering response
|
|
22
22
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
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,
|
|
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
2
|
export declare const VERSION = "fff7567386d4c0f9e9c816c13d022a25";
|
|
3
3
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
4
|
export declare const RepresentationType: string;
|
|
@@ -6,7 +6,7 @@ export declare function normalize(input: MicrobatchingIngestionRequestBodyInputR
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: MicrobatchingIngestionRequestBodyInputRepresentationNormalized, incoming: MicrobatchingIngestionRequestBodyInputRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionRequestBodyInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: MicrobatchingIngestionRequestBodyInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Encapsulates request body payload
|
|
12
12
|
*
|
package/package.json
CHANGED
package/sfdc/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey,
|
|
16
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
19
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -181,8 +181,7 @@ const ingest = function MicrobatchingIngestionOutputRepresentationIngest(input,
|
|
|
181
181
|
}
|
|
182
182
|
return createLink(key);
|
|
183
183
|
};
|
|
184
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
185
|
-
const rootKeySet = new StoreKeyMap();
|
|
184
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
186
185
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
187
186
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
188
187
|
rootKeySet.set(rootKey, {
|
|
@@ -190,14 +189,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
190
189
|
representationName: RepresentationType,
|
|
191
190
|
mergeable: false
|
|
192
191
|
});
|
|
193
|
-
return rootKeySet;
|
|
194
192
|
}
|
|
195
193
|
|
|
196
194
|
function select(luvio, params) {
|
|
197
195
|
return select$1();
|
|
198
196
|
}
|
|
199
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
200
|
-
|
|
197
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
198
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
201
199
|
}
|
|
202
200
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
203
201
|
const { body } = response;
|
|
@@ -282,7 +280,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
282
280
|
return luvio.handleSuccessResponse(() => {
|
|
283
281
|
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
284
282
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
285
|
-
}, () =>
|
|
283
|
+
}, () => {
|
|
284
|
+
const cache = new StoreKeyMap();
|
|
285
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
286
|
+
return cache;
|
|
287
|
+
});
|
|
286
288
|
}, (response) => {
|
|
287
289
|
deepFreeze(response);
|
|
288
290
|
throw response;
|
|
@@ -317,4 +319,4 @@ withDefaultLuvio((luvio) => {
|
|
|
317
319
|
});
|
|
318
320
|
|
|
319
321
|
export { ingestRecord };
|
|
320
|
-
// version: 1.
|
|
322
|
+
// version: 1.171.0-c5e524eba
|