@genesislcap/foundation-comms 14.290.0 → 14.291.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 +3 -14
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/esm/datasource/datasource.js +18 -39
- package/dist/foundation-comms.api.json +92 -0
- package/dist/foundation-comms.d.ts +3 -14
- package/docs/api/foundation-comms.defaultdatasource.allparams.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.dataserverparams.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.md +3 -0
- package/docs/api/foundation-comms.defaultdatasource.requestparams.md +11 -0
- package/docs/api-report.md +6 -6
- package/package.json +13 -13
@@ -193,7 +193,6 @@ export declare class DefaultDatasource implements Datasource {
|
|
193
193
|
protected options: DatasourceOptions;
|
194
194
|
resourceType: ResourceType;
|
195
195
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
196
|
-
private _allParams;
|
197
196
|
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
198
197
|
/**
|
199
198
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
@@ -203,18 +202,9 @@ export declare class DefaultDatasource implements Datasource {
|
|
203
202
|
startStream(): Promise<void>;
|
204
203
|
/** {@inheritDoc Datasource.destroy} */
|
205
204
|
destroy(): void;
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
get allResourceParams(): DataserverParams & RequestParams;
|
210
|
-
/**
|
211
|
-
* @internal
|
212
|
-
*/
|
213
|
-
get dataserverOnlyParams(): DataserverParams;
|
214
|
-
/**
|
215
|
-
* @internal
|
216
|
-
*/
|
217
|
-
get requestOnlyParams(): RequestParams;
|
205
|
+
get allParams(): any;
|
206
|
+
get dataserverParams(): DataserverParams;
|
207
|
+
get requestParams(): RequestParams;
|
218
208
|
snapshot(overrideParams?: any): Promise<Message>;
|
219
209
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
220
210
|
private createStream;
|
@@ -229,7 +219,6 @@ export declare class DefaultDatasource implements Datasource {
|
|
229
219
|
* @internal
|
230
220
|
*/
|
231
221
|
protected normaliseStatus(status: Partial<DatasourceStatus>): DatasourceStatus;
|
232
|
-
private invalidateCache;
|
233
222
|
}
|
234
223
|
/**
|
235
224
|
* 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,MAA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B,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;CAY/E;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,kEAAwE,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
|
@@ -40,7 +40,6 @@ let DefaultDatasource = class DefaultDatasource {
|
|
40
40
|
/** {@inheritDoc DatasourceMetadata.availableIndexes} */
|
41
41
|
this.availableIndexes = [];
|
42
42
|
this.readOnly = true;
|
43
|
-
this._allParams = null;
|
44
43
|
}
|
45
44
|
/**
|
46
45
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
@@ -58,8 +57,6 @@ let DefaultDatasource = class DefaultDatasource {
|
|
58
57
|
return __awaiter(this, void 0, void 0, function* () {
|
59
58
|
this.fetchMetadataRequired = fetchMeta;
|
60
59
|
this.options = Object.assign(Object.assign({}, this.config.options), options);
|
61
|
-
// Invalidate parameter cache when options change
|
62
|
-
this.invalidateCache();
|
63
60
|
const resourceName = this.options.resourceName;
|
64
61
|
const connected = this.connect.isConnected || (yield this.connect.connect());
|
65
62
|
if (!connected) {
|
@@ -81,8 +78,6 @@ let DefaultDatasource = class DefaultDatasource {
|
|
81
78
|
}
|
82
79
|
if (this.fetchMetadataRequired) {
|
83
80
|
yield this.fetchAndApplyMetadata(this.options.resourceName);
|
84
|
-
// Invalidate cache again after metadata fetch as availableIndexes may have changed
|
85
|
-
this._allParams = null;
|
86
81
|
}
|
87
82
|
logger.debug(`Initializing ${resourceName} datasource from ${this.connect.host}`);
|
88
83
|
if (!this.options.isSnapshot && startStream) {
|
@@ -114,14 +109,8 @@ let DefaultDatasource = class DefaultDatasource {
|
|
114
109
|
this.requestFields = [];
|
115
110
|
this.stream = undefined;
|
116
111
|
}
|
117
|
-
|
118
|
-
* @internal
|
119
|
-
*/
|
120
|
-
get allResourceParams() {
|
112
|
+
get allParams() {
|
121
113
|
var _a;
|
122
|
-
if (this._allParams) {
|
123
|
-
return this._allParams;
|
124
|
-
}
|
125
114
|
let ORDER_BY;
|
126
115
|
if (this.options.orderBy) {
|
127
116
|
if (((_a = this.availableIndexes) === null || _a === void 0 ? void 0 : _a.findIndex((i) => i.NAME === this.options.orderBy)) > -1) {
|
@@ -132,7 +121,7 @@ let DefaultDatasource = class DefaultDatasource {
|
|
132
121
|
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);
|
133
122
|
}
|
134
123
|
}
|
135
|
-
|
124
|
+
const params = {
|
136
125
|
// Common between DATASERVER and REQUEST_SERVER (REQ-REP)
|
137
126
|
CRITERIA_MATCH: this.options.criteria,
|
138
127
|
MAX_ROWS: this.options.maxRows,
|
@@ -148,30 +137,23 @@ let DefaultDatasource = class DefaultDatasource {
|
|
148
137
|
POLLING_INTERVAL: this.options.pollingInterval,
|
149
138
|
REQUEST: this.options.request,
|
150
139
|
};
|
151
|
-
|
152
|
-
return this._allParams;
|
140
|
+
return params;
|
153
141
|
}
|
154
|
-
|
155
|
-
* @internal
|
156
|
-
*/
|
157
|
-
get dataserverOnlyParams() {
|
142
|
+
get dataserverParams() {
|
158
143
|
return {
|
159
|
-
CRITERIA_MATCH: this.
|
160
|
-
MAX_ROWS: this.
|
161
|
-
VIEW_NUMBER: this.
|
162
|
-
FIELDS: this.
|
163
|
-
MAX_VIEW: this.
|
164
|
-
MOVING_VIEW: this.
|
165
|
-
ORDER_BY: this.
|
166
|
-
REVERSE: this.
|
144
|
+
CRITERIA_MATCH: this.allParams.CRITERIA_MATCH,
|
145
|
+
MAX_ROWS: this.allParams.MAX_ROWS,
|
146
|
+
VIEW_NUMBER: this.allParams.VIEW_NUMBER,
|
147
|
+
FIELDS: this.allParams.FIELDS,
|
148
|
+
MAX_VIEW: this.allParams.MAX_VIEW,
|
149
|
+
MOVING_VIEW: this.allParams.MOVING_VIEW,
|
150
|
+
ORDER_BY: this.allParams.ORDER_BY,
|
151
|
+
REVERSE: this.allParams.REVERSE,
|
167
152
|
};
|
168
153
|
}
|
169
|
-
|
170
|
-
* @internal
|
171
|
-
*/
|
172
|
-
get requestOnlyParams() {
|
154
|
+
get requestParams() {
|
173
155
|
var _a;
|
174
|
-
const _b = this.
|
156
|
+
const _b = this.allParams, { REQUEST } = _b, DETAILS = __rest(_b, ["REQUEST"]);
|
175
157
|
const reqParams = {
|
176
158
|
DETAILS: {
|
177
159
|
CRITERIA_MATCH: !this.options.requestAutoSetup ? DETAILS.CRITERIA_MATCH : undefined,
|
@@ -195,9 +177,9 @@ let DefaultDatasource = class DefaultDatasource {
|
|
195
177
|
logger.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`);
|
196
178
|
switch (this.resourceType) {
|
197
179
|
case ResourceType.DATASERVER:
|
198
|
-
return this.connect.snapshot(this.options.resourceName, Object.assign(Object.assign({}, this.
|
180
|
+
return this.connect.snapshot(this.options.resourceName, Object.assign(Object.assign({}, this.dataserverParams), overrideParams));
|
199
181
|
case ResourceType.REQUEST_SERVER: {
|
200
|
-
return this.connect.request(this.options.resourceName, Object.assign(Object.assign({}, this.
|
182
|
+
return this.connect.request(this.options.resourceName, Object.assign(Object.assign({}, this.requestParams), overrideParams));
|
201
183
|
}
|
202
184
|
default:
|
203
185
|
throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`);
|
@@ -234,11 +216,11 @@ let DefaultDatasource = class DefaultDatasource {
|
|
234
216
|
return __awaiter(this, void 0, void 0, function* () {
|
235
217
|
const onMessage = (message) => { };
|
236
218
|
const onError = (error) => logger.error(error);
|
237
|
-
return this.connect.stream(this.options.resourceName, onMessage, onError, this.
|
219
|
+
return this.connect.stream(this.options.resourceName, onMessage, onError, this.dataserverParams);
|
238
220
|
});
|
239
221
|
}
|
240
222
|
createReqRepStream() {
|
241
|
-
return timer(0, this.
|
223
|
+
return timer(0, this.allParams.DISABLE_POLLING ? undefined : this.allParams.POLLING_INTERVAL).pipe(switchMap(() => {
|
242
224
|
// Combine the isConnected status with the isLoggedIn status
|
243
225
|
return combineLatest([this.connect.isConnected$, this.auth.isLoggedIn$]).pipe(
|
244
226
|
// Use takeWhile to continue polling until isConnected becomes false or isLoggedIn becomes false
|
@@ -306,9 +288,6 @@ let DefaultDatasource = class DefaultDatasource {
|
|
306
288
|
hasMetadata,
|
307
289
|
};
|
308
290
|
}
|
309
|
-
invalidateCache() {
|
310
|
-
this._allParams = null;
|
311
|
-
}
|
312
291
|
};
|
313
292
|
__decorate([
|
314
293
|
observable
|
@@ -14017,6 +14017,36 @@
|
|
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
|
+
},
|
14020
14050
|
{
|
14021
14051
|
"kind": "Property",
|
14022
14052
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#auth:member",
|
@@ -14180,6 +14210,37 @@
|
|
14180
14210
|
"isProtected": false,
|
14181
14211
|
"isAbstract": false
|
14182
14212
|
},
|
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
|
+
},
|
14183
14244
|
{
|
14184
14245
|
"kind": "Method",
|
14185
14246
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#destroy:member(1)",
|
@@ -14576,6 +14637,37 @@
|
|
14576
14637
|
"isProtected": false,
|
14577
14638
|
"isAbstract": false
|
14578
14639
|
},
|
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
|
+
},
|
14579
14671
|
{
|
14580
14672
|
"kind": "Property",
|
14581
14673
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultDatasource#resources:member",
|
@@ -1805,7 +1805,6 @@ export declare class DefaultDatasource implements Datasource {
|
|
1805
1805
|
protected options: DatasourceOptions;
|
1806
1806
|
resourceType: ResourceType;
|
1807
1807
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
1808
|
-
private _allParams;
|
1809
1808
|
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
1810
1809
|
/**
|
1811
1810
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
@@ -1815,18 +1814,9 @@ export declare class DefaultDatasource implements Datasource {
|
|
1815
1814
|
startStream(): Promise<void>;
|
1816
1815
|
/** {@inheritDoc Datasource.destroy} */
|
1817
1816
|
destroy(): void;
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
get allResourceParams(): DataserverParams & RequestParams;
|
1822
|
-
/**
|
1823
|
-
* @internal
|
1824
|
-
*/
|
1825
|
-
get dataserverOnlyParams(): DataserverParams;
|
1826
|
-
/**
|
1827
|
-
* @internal
|
1828
|
-
*/
|
1829
|
-
get requestOnlyParams(): RequestParams;
|
1817
|
+
get allParams(): any;
|
1818
|
+
get dataserverParams(): DataserverParams;
|
1819
|
+
get requestParams(): RequestParams;
|
1830
1820
|
snapshot(overrideParams?: any): Promise<Message>;
|
1831
1821
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
1832
1822
|
private createStream;
|
@@ -1841,7 +1831,6 @@ export declare class DefaultDatasource implements Datasource {
|
|
1841
1831
|
* @internal
|
1842
1832
|
*/
|
1843
1833
|
protected normaliseStatus(status: Partial<DatasourceStatus>): DatasourceStatus;
|
1844
|
-
private invalidateCache;
|
1845
1834
|
}
|
1846
1835
|
|
1847
1836
|
/**
|
@@ -0,0 +1,11 @@
|
|
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
|
+
```
|
@@ -0,0 +1,11 @@
|
|
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
|
+
```
|
@@ -23,11 +23,13 @@ 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 | |
|
26
27
|
| [auth](./foundation-comms.defaultdatasource.auth.md) | <code>protected</code> | [Auth](./foundation-comms.auth.md) | |
|
27
28
|
| [availableIndexes](./foundation-comms.defaultdatasource.availableindexes.md) | | [IndexDetail](./foundation-comms.indexdetail.md)<!-- -->\[\] | |
|
28
29
|
| [config](./foundation-comms.defaultdatasource.config.md) | <code>protected</code> | [DatasourceConfig](./foundation-comms.datasourceconfig.md) | |
|
29
30
|
| [connect](./foundation-comms.defaultdatasource.connect.md) | <code>protected</code> | [Connect](./foundation-comms.connect.md) | |
|
30
31
|
| [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) | |
|
31
33
|
| [fetchMetadataRequired](./foundation-comms.defaultdatasource.fetchmetadatarequired.md) | | boolean | |
|
32
34
|
| [fieldMetadata](./foundation-comms.defaultdatasource.fieldmetadata.md) | | [FieldMetadata](./foundation-comms.fieldmetadata.md)<!-- -->\[\] | |
|
33
35
|
| [initialized](./foundation-comms.defaultdatasource.initialized.md) | <code>readonly</code> | boolean | Indicates whether the datasource has been initialized. |
|
@@ -35,6 +37,7 @@ export declare class DefaultDatasource implements Datasource
|
|
35
37
|
| [originalFieldDef](./foundation-comms.defaultdatasource.originalfielddef.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
36
38
|
| [readOnly](./foundation-comms.defaultdatasource.readonly.md) | | boolean | |
|
37
39
|
| [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) | |
|
38
41
|
| [resources](./foundation-comms.defaultdatasource.resources.md) | <code>protected</code> | [GenesisResources](./foundation-comms.genesisresources.md) | |
|
39
42
|
| [resourceType](./foundation-comms.defaultdatasource.resourcetype.md) | | [ResourceType](./foundation-comms.resourcetype.md) | |
|
40
43
|
| [startStreamRequired](./foundation-comms.defaultdatasource.startstreamrequired.md) | | boolean | |
|
@@ -0,0 +1,11 @@
|
|
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
|
+
```
|
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
|
-
//
|
1104
|
-
get
|
1103
|
+
// (undocumented)
|
1104
|
+
get allParams(): any;
|
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
|
-
//
|
1116
|
-
get
|
1115
|
+
// (undocumented)
|
1116
|
+
get dataserverParams(): 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
|
-
//
|
1146
|
-
get
|
1145
|
+
// (undocumented)
|
1146
|
+
get requestParams(): 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.
|
4
|
+
"version": "14.291.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.
|
79
|
-
"@genesislcap/genx": "14.
|
80
|
-
"@genesislcap/rollup-builder": "14.
|
81
|
-
"@genesislcap/ts-builder": "14.
|
82
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
83
|
-
"@genesislcap/vite-builder": "14.
|
84
|
-
"@genesislcap/webpack-builder": "14.
|
78
|
+
"@genesislcap/foundation-testing": "14.291.0",
|
79
|
+
"@genesislcap/genx": "14.291.0",
|
80
|
+
"@genesislcap/rollup-builder": "14.291.0",
|
81
|
+
"@genesislcap/ts-builder": "14.291.0",
|
82
|
+
"@genesislcap/uvu-playwright-builder": "14.291.0",
|
83
|
+
"@genesislcap/vite-builder": "14.291.0",
|
84
|
+
"@genesislcap/webpack-builder": "14.291.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.
|
92
|
-
"@genesislcap/foundation-logger": "14.
|
93
|
-
"@genesislcap/foundation-user": "14.
|
94
|
-
"@genesislcap/foundation-utils": "14.
|
91
|
+
"@genesislcap/foundation-broadcast-channel": "14.291.0",
|
92
|
+
"@genesislcap/foundation-logger": "14.291.0",
|
93
|
+
"@genesislcap/foundation-user": "14.291.0",
|
94
|
+
"@genesislcap/foundation-utils": "14.291.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": "cdfd959cfb35c6d9e4234e52cf37a11895481af5"
|
115
115
|
}
|