@genesislcap/foundation-comms 14.291.2-alpha-309a406.0 → 14.291.2-alpha-f8334d9.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/dts/datasource/datasource.d.ts +14 -3
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/esm/datasource/datasource.js +39 -18
- package/dist/foundation-comms.api.json +0 -92
- package/dist/foundation-comms.d.ts +14 -3
- package/docs/api/foundation-comms.defaultdatasource.md +0 -3
- package/docs/api-report.md +6 -6
- package/package.json +13 -13
- package/docs/api/foundation-comms.defaultdatasource.allparams.md +0 -11
- package/docs/api/foundation-comms.defaultdatasource.dataserverparams.md +0 -11
- package/docs/api/foundation-comms.defaultdatasource.requestparams.md +0 -11
@@ -193,6 +193,7 @@ export declare class DefaultDatasource implements Datasource {
|
|
193
193
|
protected options: DatasourceOptions;
|
194
194
|
resourceType: ResourceType;
|
195
195
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
196
|
+
private _allParams;
|
196
197
|
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
197
198
|
/**
|
198
199
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
@@ -202,9 +203,18 @@ export declare class DefaultDatasource implements Datasource {
|
|
202
203
|
startStream(): Promise<void>;
|
203
204
|
/** {@inheritDoc Datasource.destroy} */
|
204
205
|
destroy(): void;
|
205
|
-
|
206
|
-
|
207
|
-
|
206
|
+
/**
|
207
|
+
* @internal
|
208
|
+
*/
|
209
|
+
get allResourceParams(): DataserverParams & RequestParams;
|
210
|
+
/**
|
211
|
+
* @internal
|
212
|
+
*/
|
213
|
+
get dataserverOnlyParams(): DataserverParams;
|
214
|
+
/**
|
215
|
+
* @internal
|
216
|
+
*/
|
217
|
+
get requestOnlyParams(): RequestParams;
|
208
218
|
snapshot(overrideParams?: any): Promise<Message>;
|
209
219
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
210
220
|
private createStream;
|
@@ -219,6 +229,7 @@ export declare class DefaultDatasource implements Datasource {
|
|
219
229
|
* @internal
|
220
230
|
*/
|
221
231
|
protected normaliseStatus(status: Partial<DatasourceStatus>): DatasourceStatus;
|
232
|
+
private invalidateCache;
|
222
233
|
}
|
223
234
|
/**
|
224
235
|
* The DI token for the Datasource interface.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,EAEd,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAA2B,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,aAAa,EAAE,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,cAAc,EAAE,CAAC;IACzC,QAAQ,CAAC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IAC/C,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,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C;IAEK,QAAQ,CAAC,cAAc,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAsBhD,gBAAgB,CAAC,KAAK,GAAE,MAAkB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;YAYnD,YAAY;YAeZ,sBAAsB;IAYpC,OAAO,CAAC,kBAAkB;cAgBV,qBAAqB,CAAC,YAAY,EAAE,MAAM;IA2B1D;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM;IAa7D;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAa9E,OAAO,CAAC,eAAe;CAGxB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,kEAAwE,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
|
@@ -40,6 +40,7 @@ let DefaultDatasource = class DefaultDatasource {
|
|
40
40
|
/** {@inheritDoc DatasourceMetadata.availableIndexes} */
|
41
41
|
this.availableIndexes = [];
|
42
42
|
this.readOnly = true;
|
43
|
+
this._allParams = null;
|
43
44
|
}
|
44
45
|
/**
|
45
46
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
@@ -57,6 +58,8 @@ let DefaultDatasource = class DefaultDatasource {
|
|
57
58
|
return __awaiter(this, void 0, void 0, function* () {
|
58
59
|
this.fetchMetadataRequired = fetchMeta;
|
59
60
|
this.options = Object.assign(Object.assign({}, this.config.options), options);
|
61
|
+
// Invalidate parameter cache when options change
|
62
|
+
this.invalidateCache();
|
60
63
|
const resourceName = this.options.resourceName;
|
61
64
|
const connected = this.connect.isConnected || (yield this.connect.connect());
|
62
65
|
if (!connected) {
|
@@ -78,6 +81,8 @@ let DefaultDatasource = class DefaultDatasource {
|
|
78
81
|
}
|
79
82
|
if (this.fetchMetadataRequired) {
|
80
83
|
yield this.fetchAndApplyMetadata(this.options.resourceName);
|
84
|
+
// Invalidate cache again after metadata fetch as availableIndexes may have changed
|
85
|
+
this._allParams = null;
|
81
86
|
}
|
82
87
|
logger.debug(`Initializing ${resourceName} datasource from ${this.connect.host}`);
|
83
88
|
if (!this.options.isSnapshot && startStream) {
|
@@ -109,8 +114,14 @@ let DefaultDatasource = class DefaultDatasource {
|
|
109
114
|
this.requestFields = [];
|
110
115
|
this.stream = undefined;
|
111
116
|
}
|
112
|
-
|
117
|
+
/**
|
118
|
+
* @internal
|
119
|
+
*/
|
120
|
+
get allResourceParams() {
|
113
121
|
var _a;
|
122
|
+
if (this._allParams) {
|
123
|
+
return this._allParams;
|
124
|
+
}
|
114
125
|
let ORDER_BY;
|
115
126
|
if (this.options.orderBy) {
|
116
127
|
if (((_a = this.availableIndexes) === null || _a === void 0 ? void 0 : _a.findIndex((i) => i.NAME === this.options.orderBy)) > -1) {
|
@@ -121,7 +132,7 @@ let DefaultDatasource = class DefaultDatasource {
|
|
121
132
|
logger.warn('Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:', validIndexes);
|
122
133
|
}
|
123
134
|
}
|
124
|
-
|
135
|
+
this._allParams = {
|
125
136
|
// Common between DATASERVER and REQUEST_SERVER (REQ-REP)
|
126
137
|
CRITERIA_MATCH: this.options.criteria,
|
127
138
|
MAX_ROWS: this.options.maxRows,
|
@@ -137,23 +148,30 @@ let DefaultDatasource = class DefaultDatasource {
|
|
137
148
|
POLLING_INTERVAL: this.options.pollingInterval,
|
138
149
|
REQUEST: this.options.request,
|
139
150
|
};
|
140
|
-
|
151
|
+
logger.debug('Getting configured params:', this._allParams);
|
152
|
+
return this._allParams;
|
141
153
|
}
|
142
|
-
|
154
|
+
/**
|
155
|
+
* @internal
|
156
|
+
*/
|
157
|
+
get dataserverOnlyParams() {
|
143
158
|
return {
|
144
|
-
CRITERIA_MATCH: this.
|
145
|
-
MAX_ROWS: this.
|
146
|
-
VIEW_NUMBER: this.
|
147
|
-
FIELDS: this.
|
148
|
-
MAX_VIEW: this.
|
149
|
-
MOVING_VIEW: this.
|
150
|
-
ORDER_BY: this.
|
151
|
-
REVERSE: this.
|
159
|
+
CRITERIA_MATCH: this.allResourceParams.CRITERIA_MATCH,
|
160
|
+
MAX_ROWS: this.allResourceParams.MAX_ROWS,
|
161
|
+
VIEW_NUMBER: this.allResourceParams.VIEW_NUMBER,
|
162
|
+
FIELDS: this.allResourceParams.FIELDS,
|
163
|
+
MAX_VIEW: this.allResourceParams.MAX_VIEW,
|
164
|
+
MOVING_VIEW: this.allResourceParams.MOVING_VIEW,
|
165
|
+
ORDER_BY: this.allResourceParams.ORDER_BY,
|
166
|
+
REVERSE: this.allResourceParams.REVERSE,
|
152
167
|
};
|
153
168
|
}
|
154
|
-
|
169
|
+
/**
|
170
|
+
* @internal
|
171
|
+
*/
|
172
|
+
get requestOnlyParams() {
|
155
173
|
var _a;
|
156
|
-
const _b = this.
|
174
|
+
const _b = this.allResourceParams, { REQUEST } = _b, DETAILS = __rest(_b, ["REQUEST"]);
|
157
175
|
const reqParams = {
|
158
176
|
DETAILS: {
|
159
177
|
CRITERIA_MATCH: !this.options.requestAutoSetup ? DETAILS.CRITERIA_MATCH : undefined,
|
@@ -177,9 +195,9 @@ let DefaultDatasource = class DefaultDatasource {
|
|
177
195
|
logger.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`);
|
178
196
|
switch (this.resourceType) {
|
179
197
|
case ResourceType.DATASERVER:
|
180
|
-
return this.connect.snapshot(this.options.resourceName, Object.assign(Object.assign({}, this.
|
198
|
+
return this.connect.snapshot(this.options.resourceName, Object.assign(Object.assign({}, this.dataserverOnlyParams), overrideParams));
|
181
199
|
case ResourceType.REQUEST_SERVER: {
|
182
|
-
return this.connect.request(this.options.resourceName, Object.assign(Object.assign({}, this.
|
200
|
+
return this.connect.request(this.options.resourceName, Object.assign(Object.assign({}, this.requestOnlyParams), overrideParams));
|
183
201
|
}
|
184
202
|
default:
|
185
203
|
throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`);
|
@@ -216,11 +234,11 @@ let DefaultDatasource = class DefaultDatasource {
|
|
216
234
|
return __awaiter(this, void 0, void 0, function* () {
|
217
235
|
const onMessage = (message) => { };
|
218
236
|
const onError = (error) => logger.error(error);
|
219
|
-
return this.connect.stream(this.options.resourceName, onMessage, onError, this.
|
237
|
+
return this.connect.stream(this.options.resourceName, onMessage, onError, this.dataserverOnlyParams);
|
220
238
|
});
|
221
239
|
}
|
222
240
|
createReqRepStream() {
|
223
|
-
return timer(0, this.
|
241
|
+
return timer(0, this.allResourceParams.DISABLE_POLLING ? undefined : this.allResourceParams.POLLING_INTERVAL).pipe(switchMap(() => {
|
224
242
|
// Combine the isConnected status with the isLoggedIn status
|
225
243
|
return combineLatest([this.connect.isConnected$, this.auth.isLoggedIn$]).pipe(
|
226
244
|
// Use takeWhile to continue polling until isConnected becomes false or isLoggedIn becomes false
|
@@ -288,6 +306,9 @@ let DefaultDatasource = class DefaultDatasource {
|
|
288
306
|
hasMetadata,
|
289
307
|
};
|
290
308
|
}
|
309
|
+
invalidateCache() {
|
310
|
+
this._allParams = null;
|
311
|
+
}
|
291
312
|
};
|
292
313
|
__decorate([
|
293
314
|
observable
|
@@ -14017,36 +14017,6 @@
|
|
14017
14017
|
}
|
14018
14018
|
]
|
14019
14019
|
},
|
14020
|
-
{
|
14021
|
-
"kind": "Property",
|
14022
|
-
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#allParams:member",
|
14023
|
-
"docComment": "",
|
14024
|
-
"excerptTokens": [
|
14025
|
-
{
|
14026
|
-
"kind": "Content",
|
14027
|
-
"text": "get allParams(): "
|
14028
|
-
},
|
14029
|
-
{
|
14030
|
-
"kind": "Content",
|
14031
|
-
"text": "any"
|
14032
|
-
},
|
14033
|
-
{
|
14034
|
-
"kind": "Content",
|
14035
|
-
"text": ";"
|
14036
|
-
}
|
14037
|
-
],
|
14038
|
-
"isReadonly": true,
|
14039
|
-
"isOptional": false,
|
14040
|
-
"releaseTag": "Public",
|
14041
|
-
"name": "allParams",
|
14042
|
-
"propertyTypeTokenRange": {
|
14043
|
-
"startIndex": 1,
|
14044
|
-
"endIndex": 2
|
14045
|
-
},
|
14046
|
-
"isStatic": false,
|
14047
|
-
"isProtected": false,
|
14048
|
-
"isAbstract": false
|
14049
|
-
},
|
14050
14020
|
{
|
14051
14021
|
"kind": "Property",
|
14052
14022
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#auth:member",
|
@@ -14210,37 +14180,6 @@
|
|
14210
14180
|
"isProtected": false,
|
14211
14181
|
"isAbstract": false
|
14212
14182
|
},
|
14213
|
-
{
|
14214
|
-
"kind": "Property",
|
14215
|
-
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#dataserverParams:member",
|
14216
|
-
"docComment": "",
|
14217
|
-
"excerptTokens": [
|
14218
|
-
{
|
14219
|
-
"kind": "Content",
|
14220
|
-
"text": "get dataserverParams(): "
|
14221
|
-
},
|
14222
|
-
{
|
14223
|
-
"kind": "Reference",
|
14224
|
-
"text": "DataserverParams",
|
14225
|
-
"canonicalReference": "@genesislcap/foundation-comms!DataserverParams:type"
|
14226
|
-
},
|
14227
|
-
{
|
14228
|
-
"kind": "Content",
|
14229
|
-
"text": ";"
|
14230
|
-
}
|
14231
|
-
],
|
14232
|
-
"isReadonly": true,
|
14233
|
-
"isOptional": false,
|
14234
|
-
"releaseTag": "Public",
|
14235
|
-
"name": "dataserverParams",
|
14236
|
-
"propertyTypeTokenRange": {
|
14237
|
-
"startIndex": 1,
|
14238
|
-
"endIndex": 2
|
14239
|
-
},
|
14240
|
-
"isStatic": false,
|
14241
|
-
"isProtected": false,
|
14242
|
-
"isAbstract": false
|
14243
|
-
},
|
14244
14183
|
{
|
14245
14184
|
"kind": "Method",
|
14246
14185
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#destroy:member(1)",
|
@@ -14637,37 +14576,6 @@
|
|
14637
14576
|
"isProtected": false,
|
14638
14577
|
"isAbstract": false
|
14639
14578
|
},
|
14640
|
-
{
|
14641
|
-
"kind": "Property",
|
14642
|
-
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#requestParams:member",
|
14643
|
-
"docComment": "",
|
14644
|
-
"excerptTokens": [
|
14645
|
-
{
|
14646
|
-
"kind": "Content",
|
14647
|
-
"text": "get requestParams(): "
|
14648
|
-
},
|
14649
|
-
{
|
14650
|
-
"kind": "Reference",
|
14651
|
-
"text": "RequestParams",
|
14652
|
-
"canonicalReference": "@genesislcap/foundation-comms!RequestParams:type"
|
14653
|
-
},
|
14654
|
-
{
|
14655
|
-
"kind": "Content",
|
14656
|
-
"text": ";"
|
14657
|
-
}
|
14658
|
-
],
|
14659
|
-
"isReadonly": true,
|
14660
|
-
"isOptional": false,
|
14661
|
-
"releaseTag": "Public",
|
14662
|
-
"name": "requestParams",
|
14663
|
-
"propertyTypeTokenRange": {
|
14664
|
-
"startIndex": 1,
|
14665
|
-
"endIndex": 2
|
14666
|
-
},
|
14667
|
-
"isStatic": false,
|
14668
|
-
"isProtected": false,
|
14669
|
-
"isAbstract": false
|
14670
|
-
},
|
14671
14579
|
{
|
14672
14580
|
"kind": "Property",
|
14673
14581
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#resources:member",
|
@@ -1805,6 +1805,7 @@ export declare class DefaultDatasource implements Datasource {
|
|
1805
1805
|
protected options: DatasourceOptions;
|
1806
1806
|
resourceType: ResourceType;
|
1807
1807
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
1808
|
+
private _allParams;
|
1808
1809
|
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
1809
1810
|
/**
|
1810
1811
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
@@ -1814,9 +1815,18 @@ export declare class DefaultDatasource implements Datasource {
|
|
1814
1815
|
startStream(): Promise<void>;
|
1815
1816
|
/** {@inheritDoc Datasource.destroy} */
|
1816
1817
|
destroy(): void;
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1818
|
+
/**
|
1819
|
+
* @internal
|
1820
|
+
*/
|
1821
|
+
get allResourceParams(): DataserverParams & RequestParams;
|
1822
|
+
/**
|
1823
|
+
* @internal
|
1824
|
+
*/
|
1825
|
+
get dataserverOnlyParams(): DataserverParams;
|
1826
|
+
/**
|
1827
|
+
* @internal
|
1828
|
+
*/
|
1829
|
+
get requestOnlyParams(): RequestParams;
|
1820
1830
|
snapshot(overrideParams?: any): Promise<Message>;
|
1821
1831
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
1822
1832
|
private createStream;
|
@@ -1831,6 +1841,7 @@ export declare class DefaultDatasource implements Datasource {
|
|
1831
1841
|
* @internal
|
1832
1842
|
*/
|
1833
1843
|
protected normaliseStatus(status: Partial<DatasourceStatus>): DatasourceStatus;
|
1844
|
+
private invalidateCache;
|
1834
1845
|
}
|
1835
1846
|
|
1836
1847
|
/**
|
@@ -23,13 +23,11 @@ export declare class DefaultDatasource implements Datasource
|
|
23
23
|
|
24
24
|
| Property | Modifiers | Type | Description |
|
25
25
|
| --- | --- | --- | --- |
|
26
|
-
| [allParams](./foundation-comms.defaultdatasource.allparams.md) | <code>readonly</code> | any | |
|
27
26
|
| [auth](./foundation-comms.defaultdatasource.auth.md) | <code>protected</code> | [Auth](./foundation-comms.auth.md) | |
|
28
27
|
| [availableIndexes](./foundation-comms.defaultdatasource.availableindexes.md) | | [IndexDetail](./foundation-comms.indexdetail.md)<!-- -->\[\] | |
|
29
28
|
| [config](./foundation-comms.defaultdatasource.config.md) | <code>protected</code> | [DatasourceConfig](./foundation-comms.datasourceconfig.md) | |
|
30
29
|
| [connect](./foundation-comms.defaultdatasource.connect.md) | <code>protected</code> | [Connect](./foundation-comms.connect.md) | |
|
31
30
|
| [customRequestFields](./foundation-comms.defaultdatasource.customrequestfields.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
32
|
-
| [dataserverParams](./foundation-comms.defaultdatasource.dataserverparams.md) | <code>readonly</code> | [DataserverParams](./foundation-comms.dataserverparams.md) | |
|
33
31
|
| [fetchMetadataRequired](./foundation-comms.defaultdatasource.fetchmetadatarequired.md) | | boolean | |
|
34
32
|
| [fieldMetadata](./foundation-comms.defaultdatasource.fieldmetadata.md) | | [FieldMetadata](./foundation-comms.fieldmetadata.md)<!-- -->\[\] | |
|
35
33
|
| [initialized](./foundation-comms.defaultdatasource.initialized.md) | <code>readonly</code> | boolean | Indicates whether the datasource has been initialized. |
|
@@ -37,7 +35,6 @@ export declare class DefaultDatasource implements Datasource
|
|
37
35
|
| [originalFieldDef](./foundation-comms.defaultdatasource.originalfielddef.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
38
36
|
| [readOnly](./foundation-comms.defaultdatasource.readonly.md) | | boolean | |
|
39
37
|
| [requestFields](./foundation-comms.defaultdatasource.requestfields.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
40
|
-
| [requestParams](./foundation-comms.defaultdatasource.requestparams.md) | <code>readonly</code> | [RequestParams](./foundation-comms.requestparams.md) | |
|
41
38
|
| [resources](./foundation-comms.defaultdatasource.resources.md) | <code>protected</code> | [GenesisResources](./foundation-comms.genesisresources.md) | |
|
42
39
|
| [resourceType](./foundation-comms.defaultdatasource.resourcetype.md) | | [ResourceType](./foundation-comms.resourcetype.md) | |
|
43
40
|
| [startStreamRequired](./foundation-comms.defaultdatasource.startstreamrequired.md) | | boolean | |
|
package/docs/api-report.md
CHANGED
@@ -1100,8 +1100,8 @@ export const defaultCredentialRequestOptions: GetCredentialOptions;
|
|
1100
1100
|
// @public
|
1101
1101
|
export class DefaultDatasource implements Datasource {
|
1102
1102
|
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
1103
|
-
// (undocumented)
|
1104
|
-
get
|
1103
|
+
// @internal (undocumented)
|
1104
|
+
get allResourceParams(): DataserverParams & RequestParams;
|
1105
1105
|
// (undocumented)
|
1106
1106
|
protected auth: Auth;
|
1107
1107
|
// (undocumented)
|
@@ -1112,8 +1112,8 @@ export class DefaultDatasource implements Datasource {
|
|
1112
1112
|
protected connect: Connect;
|
1113
1113
|
// (undocumented)
|
1114
1114
|
customRequestFields: MetadataDetail[];
|
1115
|
-
// (undocumented)
|
1116
|
-
get
|
1115
|
+
// @internal (undocumented)
|
1116
|
+
get dataserverOnlyParams(): DataserverParams;
|
1117
1117
|
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "Datasource" has more than one declaration; you need to add a TSDoc member reference selector
|
1118
1118
|
//
|
1119
1119
|
// (undocumented)
|
@@ -1142,8 +1142,8 @@ export class DefaultDatasource implements Datasource {
|
|
1142
1142
|
protected reportStatus(detail?: Partial<DatasourceStatus>): void;
|
1143
1143
|
// (undocumented)
|
1144
1144
|
requestFields: MetadataDetail[];
|
1145
|
-
// (undocumented)
|
1146
|
-
get
|
1145
|
+
// @internal (undocumented)
|
1146
|
+
get requestOnlyParams(): RequestParams;
|
1147
1147
|
// (undocumented)
|
1148
1148
|
protected resources: GenesisResources;
|
1149
1149
|
// (undocumented)
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genesislcap/foundation-comms",
|
3
3
|
"description": "Genesis Foundation UI Comms",
|
4
|
-
"version": "14.291.2-alpha-
|
4
|
+
"version": "14.291.2-alpha-f8334d9.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -75,23 +75,23 @@
|
|
75
75
|
}
|
76
76
|
},
|
77
77
|
"devDependencies": {
|
78
|
-
"@genesislcap/foundation-testing": "14.291.2-alpha-
|
79
|
-
"@genesislcap/genx": "14.291.2-alpha-
|
80
|
-
"@genesislcap/rollup-builder": "14.291.2-alpha-
|
81
|
-
"@genesislcap/ts-builder": "14.291.2-alpha-
|
82
|
-
"@genesislcap/uvu-playwright-builder": "14.291.2-alpha-
|
83
|
-
"@genesislcap/vite-builder": "14.291.2-alpha-
|
84
|
-
"@genesislcap/webpack-builder": "14.291.2-alpha-
|
78
|
+
"@genesislcap/foundation-testing": "14.291.2-alpha-f8334d9.0",
|
79
|
+
"@genesislcap/genx": "14.291.2-alpha-f8334d9.0",
|
80
|
+
"@genesislcap/rollup-builder": "14.291.2-alpha-f8334d9.0",
|
81
|
+
"@genesislcap/ts-builder": "14.291.2-alpha-f8334d9.0",
|
82
|
+
"@genesislcap/uvu-playwright-builder": "14.291.2-alpha-f8334d9.0",
|
83
|
+
"@genesislcap/vite-builder": "14.291.2-alpha-f8334d9.0",
|
84
|
+
"@genesislcap/webpack-builder": "14.291.2-alpha-f8334d9.0",
|
85
85
|
"@types/js-cookie": "^3.0.2",
|
86
86
|
"@types/json-schema": "^7.0.11",
|
87
87
|
"@types/webappsec-credential-management": "^0.6.2",
|
88
88
|
"rimraf": "^5.0.0"
|
89
89
|
},
|
90
90
|
"dependencies": {
|
91
|
-
"@genesislcap/foundation-broadcast-channel": "14.291.2-alpha-
|
92
|
-
"@genesislcap/foundation-logger": "14.291.2-alpha-
|
93
|
-
"@genesislcap/foundation-user": "14.291.2-alpha-
|
94
|
-
"@genesislcap/foundation-utils": "14.291.2-alpha-
|
91
|
+
"@genesislcap/foundation-broadcast-channel": "14.291.2-alpha-f8334d9.0",
|
92
|
+
"@genesislcap/foundation-logger": "14.291.2-alpha-f8334d9.0",
|
93
|
+
"@genesislcap/foundation-user": "14.291.2-alpha-f8334d9.0",
|
94
|
+
"@genesislcap/foundation-utils": "14.291.2-alpha-f8334d9.0",
|
95
95
|
"@microsoft/fast-element": "1.14.0",
|
96
96
|
"@microsoft/fast-foundation": "2.49.6",
|
97
97
|
"analytics": "^0.8.0",
|
@@ -111,5 +111,5 @@
|
|
111
111
|
"publishConfig": {
|
112
112
|
"access": "public"
|
113
113
|
},
|
114
|
-
"gitHead": "
|
114
|
+
"gitHead": "daa7b5af7619b8f3365cdcef574fc35989c30de8"
|
115
115
|
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [allParams](./foundation-comms.defaultdatasource.allparams.md)
|
4
|
-
|
5
|
-
## DefaultDatasource.allParams property
|
6
|
-
|
7
|
-
**Signature:**
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
get allParams(): any;
|
11
|
-
```
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [dataserverParams](./foundation-comms.defaultdatasource.dataserverparams.md)
|
4
|
-
|
5
|
-
## DefaultDatasource.dataserverParams property
|
6
|
-
|
7
|
-
**Signature:**
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
get dataserverParams(): DataserverParams;
|
11
|
-
```
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [requestParams](./foundation-comms.defaultdatasource.requestparams.md)
|
4
|
-
|
5
|
-
## DefaultDatasource.requestParams property
|
6
|
-
|
7
|
-
**Signature:**
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
get requestParams(): RequestParams;
|
11
|
-
```
|