@salesforce/lds-adapters-analytics-tableau-embedding 1.134.9 → 1.136.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/analytics-tableau-embedding.js +28 -4
- package/dist/es/es2018/types/src/generated/types/TableauJWTRepresentation.d.ts +1 -1
- package/dist/es/es2018/types/src/main.d.ts +3 -0
- package/dist/es/es2018/types/src/sfdc.d.ts +7 -0
- package/dist/es/es2018/types/src/wire/getJWT/index.d.ts +4 -0
- package/package.json +1 -1
- package/sfdc/index.d.ts +1 -1
- package/sfdc/index.js +40 -16
- package/src/raml/luvio.raml +2 -1
|
@@ -288,7 +288,7 @@ const getEASAdapterFactory = (luvio) => function TableauEmbedding__getEAS(untrus
|
|
|
288
288
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
const TTL =
|
|
291
|
+
const TTL = 100;
|
|
292
292
|
const VERSION = "53f57df1863a858a8575f7088b4d78cb";
|
|
293
293
|
function validate(obj, path = 'TableauJWTRepresentation') {
|
|
294
294
|
const v_error = (() => {
|
|
@@ -392,7 +392,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
392
392
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
393
393
|
const key = keyBuilder$3(luvio, params);
|
|
394
394
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
395
|
-
|
|
395
|
+
const storeMetadataParams = {
|
|
396
|
+
ttl: TTL,
|
|
397
|
+
namespace: keyPrefix,
|
|
398
|
+
version: VERSION,
|
|
399
|
+
representationName: RepresentationType
|
|
400
|
+
};
|
|
401
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
396
402
|
return errorSnapshot;
|
|
397
403
|
}
|
|
398
404
|
function createResourceRequest$1(config) {
|
|
@@ -511,13 +517,25 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
511
517
|
});
|
|
512
518
|
return cacheSnapshot;
|
|
513
519
|
}
|
|
520
|
+
|
|
521
|
+
const defaultCacheFactory = {
|
|
522
|
+
cachePolicy: {
|
|
523
|
+
type: 'no-cache',
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
// This implementation is based on the generated one from: packages/lds-adapters-analytics-tableau-embedding/src/generated/adapters/getJWT.ts.
|
|
527
|
+
// However, we force a `no-cache` policy here in order to avoid the various runtimes where LDS is implemented making the wrong choice for this API.
|
|
528
|
+
//
|
|
529
|
+
// You can make sure this is included in the build by checking the contents of:
|
|
530
|
+
// packages/lds-adapters-analytics-tableau-embedding/sfdc/index.js after `yarn build:services`
|
|
514
531
|
const getJWTAdapterFactory = (luvio) => function TableauEmbedding__getJWT(untrustedConfig, requestContext) {
|
|
515
532
|
const config = validateAdapterConfig$1(untrustedConfig, getJWT_ConfigPropertyNames);
|
|
516
533
|
// Invalid or incomplete config
|
|
517
534
|
if (config === null) {
|
|
518
535
|
return null;
|
|
519
536
|
}
|
|
520
|
-
|
|
537
|
+
const ctx = { ...requestContext, ...defaultCacheFactory }; // override any runtime decisions w/ our desired policy
|
|
538
|
+
return luvio.applyCachePolicy(ctx, { config, luvio }, // BuildSnapshotContext
|
|
521
539
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
522
540
|
};
|
|
523
541
|
|
|
@@ -550,7 +568,13 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
550
568
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
551
569
|
const key = keyBuilder$1(luvio, params);
|
|
552
570
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
553
|
-
|
|
571
|
+
const storeMetadataParams = {
|
|
572
|
+
ttl: TTL,
|
|
573
|
+
namespace: keyPrefix,
|
|
574
|
+
version: VERSION,
|
|
575
|
+
representationName: RepresentationType
|
|
576
|
+
};
|
|
577
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
554
578
|
return errorSnapshot;
|
|
555
579
|
}
|
|
556
580
|
function createResourceRequest(config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, 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 TTL =
|
|
2
|
+
export declare const TTL = 100;
|
|
3
3
|
export declare const VERSION = "53f57df1863a858a8575f7088b4d78cb";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
5
|
export declare const RepresentationType: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare let getEAS: any;
|
|
2
|
+
declare let getJWT: any;
|
|
3
|
+
declare let postJWT: any;
|
|
4
|
+
declare let getEAS_imperative: any;
|
|
5
|
+
declare let getJWT_imperative: any;
|
|
6
|
+
declare let postJWT_imperative: any;
|
|
7
|
+
export { getEAS, getJWT, postJWT, getEAS_imperative, getJWT_imperative, postJWT_imperative };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import type { GetJWTConfig } from '../../generated/adapters/getJWT';
|
|
3
|
+
import type { TableauJWTRepresentation } from '../../generated/types/TableauJWTRepresentation';
|
|
4
|
+
export declare const getJWTAdapterFactory: AdapterFactory<GetJWTConfig, TableauJWTRepresentation>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-analytics-tableau-embedding",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.136.0",
|
|
4
4
|
"description": "The APIs in this family are supporting embedding of Tableau vizualizations into Salesforce.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/es/es2018/analytics-tableau-embedding.js",
|
package/sfdc/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/es/es2018/types/src/
|
|
1
|
+
export * from '../dist/es/es2018/types/src/sfdc';
|
package/sfdc/index.js
CHANGED
|
@@ -298,7 +298,7 @@ const getEASAdapterFactory = (luvio) => function TableauEmbedding__getEAS(untrus
|
|
|
298
298
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
299
299
|
};
|
|
300
300
|
|
|
301
|
-
const TTL =
|
|
301
|
+
const TTL = 100;
|
|
302
302
|
const VERSION = "53f57df1863a858a8575f7088b4d78cb";
|
|
303
303
|
function validate(obj, path = 'TableauJWTRepresentation') {
|
|
304
304
|
const v_error = (() => {
|
|
@@ -402,7 +402,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
402
402
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
403
403
|
const key = keyBuilder$3(luvio, params);
|
|
404
404
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
405
|
-
|
|
405
|
+
const storeMetadataParams = {
|
|
406
|
+
ttl: TTL,
|
|
407
|
+
namespace: keyPrefix,
|
|
408
|
+
version: VERSION,
|
|
409
|
+
representationName: RepresentationType
|
|
410
|
+
};
|
|
411
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
406
412
|
return errorSnapshot;
|
|
407
413
|
}
|
|
408
414
|
function createResourceRequest$1(config) {
|
|
@@ -521,13 +527,25 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
521
527
|
});
|
|
522
528
|
return cacheSnapshot;
|
|
523
529
|
}
|
|
530
|
+
|
|
531
|
+
const defaultCacheFactory = {
|
|
532
|
+
cachePolicy: {
|
|
533
|
+
type: 'no-cache',
|
|
534
|
+
},
|
|
535
|
+
};
|
|
536
|
+
// This implementation is based on the generated one from: packages/lds-adapters-analytics-tableau-embedding/src/generated/adapters/getJWT.ts.
|
|
537
|
+
// However, we force a `no-cache` policy here in order to avoid the various runtimes where LDS is implemented making the wrong choice for this API.
|
|
538
|
+
//
|
|
539
|
+
// You can make sure this is included in the build by checking the contents of:
|
|
540
|
+
// packages/lds-adapters-analytics-tableau-embedding/sfdc/index.js after `yarn build:services`
|
|
524
541
|
const getJWTAdapterFactory = (luvio) => function TableauEmbedding__getJWT(untrustedConfig, requestContext) {
|
|
525
542
|
const config = validateAdapterConfig$1(untrustedConfig, getJWT_ConfigPropertyNames);
|
|
526
543
|
// Invalid or incomplete config
|
|
527
544
|
if (config === null) {
|
|
528
545
|
return null;
|
|
529
546
|
}
|
|
530
|
-
|
|
547
|
+
const ctx = { ...requestContext, ...defaultCacheFactory }; // override any runtime decisions w/ our desired policy
|
|
548
|
+
return luvio.applyCachePolicy(ctx, { config, luvio }, // BuildSnapshotContext
|
|
531
549
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
532
550
|
};
|
|
533
551
|
|
|
@@ -560,7 +578,13 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
560
578
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
561
579
|
const key = keyBuilder$1(luvio, params);
|
|
562
580
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
563
|
-
|
|
581
|
+
const storeMetadataParams = {
|
|
582
|
+
ttl: TTL,
|
|
583
|
+
namespace: keyPrefix,
|
|
584
|
+
version: VERSION,
|
|
585
|
+
representationName: RepresentationType
|
|
586
|
+
};
|
|
587
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
564
588
|
return errorSnapshot;
|
|
565
589
|
}
|
|
566
590
|
function createResourceRequest(config) {
|
|
@@ -693,6 +717,7 @@ const postJWTAdapterFactory = (luvio) => function TableauEmbedding__postJWT(untr
|
|
|
693
717
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
694
718
|
};
|
|
695
719
|
|
|
720
|
+
// Original file: packages/lds-adapters-analytics-tableau-embedding/src/generated/artifacts/sfdc.ts
|
|
696
721
|
let getEAS;
|
|
697
722
|
let getJWT;
|
|
698
723
|
let postJWT;
|
|
@@ -702,13 +727,18 @@ let getJWT_imperative;
|
|
|
702
727
|
let postJWT_imperative;
|
|
703
728
|
// Adapter Metadata
|
|
704
729
|
const getEASMetadata = { apiFamily: 'TableauEmbedding', name: 'getEAS', ttl: 180000 };
|
|
705
|
-
const getJWTMetadata = { apiFamily: 'TableauEmbedding', name: 'getJWT', ttl:
|
|
706
|
-
const postJWTMetadata = { apiFamily: 'TableauEmbedding', name: 'postJWT', ttl:
|
|
730
|
+
const getJWTMetadata = { apiFamily: 'TableauEmbedding', name: 'getJWT', ttl: 100 };
|
|
731
|
+
const postJWTMetadata = { apiFamily: 'TableauEmbedding', name: 'postJWT', ttl: 100 };
|
|
707
732
|
function bindExportsTo(luvio) {
|
|
708
733
|
// LDS Adapters
|
|
709
734
|
const getEAS_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getEAS', getEASAdapterFactory), getEASMetadata);
|
|
710
735
|
const getJWT_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getJWT', getJWTAdapterFactory), getJWTMetadata);
|
|
711
736
|
const postJWT_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'postJWT', postJWTAdapterFactory), postJWTMetadata);
|
|
737
|
+
// Not used
|
|
738
|
+
// function unwrapSnapshotData<Config,DataType>(factory: AdapterFactory<Config,DataType>) {
|
|
739
|
+
// const adapter = factory(luvio);
|
|
740
|
+
// return (config: Config) => (adapter(config) as Promise<Snapshot<DataType>>).then(snapshot => snapshot.data);
|
|
741
|
+
// }
|
|
712
742
|
return {
|
|
713
743
|
getEAS: createWireAdapterConstructor(luvio, getEAS_ldsAdapter, getEASMetadata),
|
|
714
744
|
getJWT: createWireAdapterConstructor(luvio, getJWT_ldsAdapter, getJWTMetadata),
|
|
@@ -716,19 +746,13 @@ function bindExportsTo(luvio) {
|
|
|
716
746
|
// Imperative GET Adapters
|
|
717
747
|
getEAS_imperative: createImperativeAdapter(luvio, getEAS_ldsAdapter, getEASMetadata),
|
|
718
748
|
getJWT_imperative: createImperativeAdapter(luvio, getJWT_ldsAdapter, getJWTMetadata),
|
|
719
|
-
postJWT_imperative: createImperativeAdapter(luvio, postJWT_ldsAdapter, postJWTMetadata)
|
|
749
|
+
postJWT_imperative: createImperativeAdapter(luvio, postJWT_ldsAdapter, postJWTMetadata),
|
|
720
750
|
};
|
|
721
751
|
}
|
|
722
752
|
withDefaultLuvio((luvio) => {
|
|
723
|
-
({
|
|
724
|
-
|
|
725
|
-
getJWT,
|
|
726
|
-
postJWT,
|
|
727
|
-
getEAS_imperative,
|
|
728
|
-
getJWT_imperative,
|
|
729
|
-
postJWT_imperative
|
|
730
|
-
} = bindExportsTo(luvio));
|
|
753
|
+
({ getEAS, getJWT, postJWT, getEAS_imperative, getJWT_imperative, postJWT_imperative } =
|
|
754
|
+
bindExportsTo(luvio));
|
|
731
755
|
});
|
|
732
756
|
|
|
733
757
|
export { getEAS, getEAS_imperative, getJWT, getJWT_imperative, postJWT, postJWT_imperative };
|
|
734
|
-
// version: 1.
|
|
758
|
+
// version: 1.136.0-00f6ce321
|
package/src/raml/luvio.raml
CHANGED