@sjcrh/proteinpaint-types 2.89.1-1 → 2.89.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/package.json +1 -1
- package/src/dataset.ts +38 -0
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -1543,19 +1543,56 @@ export type Mds = BaseMds & {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
1545
|
type PreInitStatus = {
|
|
1546
|
+
/**
|
|
1547
|
+
* status: 'OK' indicates a valid response
|
|
1548
|
+
*
|
|
1549
|
+
* status: 'recoverableError' may cause the server code to retry until the response is healthy,
|
|
1550
|
+
* depending on the server startup code flow
|
|
1551
|
+
*
|
|
1552
|
+
* other status will be considered fatal error
|
|
1553
|
+
* */
|
|
1546
1554
|
status: string
|
|
1555
|
+
/** response message as related to the status */
|
|
1547
1556
|
message?: string
|
|
1557
|
+
/** arbitrary response payload properties that is specific to a dataset */
|
|
1548
1558
|
[props: string]: any
|
|
1549
1559
|
}
|
|
1550
1560
|
|
|
1551
1561
|
export type PreInit = {
|
|
1562
|
+
/**
|
|
1563
|
+
getStatus() is used to make sure that data sources are ready before starting to query data;
|
|
1564
|
+
for example, wait on GDC API server to be healthy before starting to initialize,
|
|
1565
|
+
or wait for intermittent network errors to clear on a network mount;
|
|
1566
|
+
HTTP connection timeout errors or status 5xx are considered recoverable,
|
|
1567
|
+
status 4xx are not considered recoverable (client-related request errors)
|
|
1568
|
+
*/
|
|
1552
1569
|
getStatus: () => Promise<PreInitStatus>
|
|
1570
|
+
/** number of milliseconds to wait before calling th preInit.getStatus() again */
|
|
1553
1571
|
retryDelay?: number
|
|
1572
|
+
/** maximum number of times to call preInit.getStatus() before giving up */
|
|
1554
1573
|
retryMax?: number
|
|
1574
|
+
/**
|
|
1575
|
+
* optional callback to send notifications of pre-init errors
|
|
1576
|
+
* for St. Jude, this may reuse code that post to Slack channel;
|
|
1577
|
+
* in dev and other portals, this may use custom callbacks
|
|
1578
|
+
* */
|
|
1555
1579
|
errorCallback?: (response: PreInitStatus) => void
|
|
1580
|
+
/**
|
|
1581
|
+
* dev only, used to test preInit handling by simulating different
|
|
1582
|
+
* responses in a known sequence of steps that may edit the preInit
|
|
1583
|
+
* response
|
|
1584
|
+
*/
|
|
1556
1585
|
test?: {
|
|
1586
|
+
/** the current number of calls to preInit.getStatus() */
|
|
1557
1587
|
numCalls: number
|
|
1588
|
+
/**
|
|
1589
|
+
* an arbitrary response payload property that is edited in mayEditResponse()
|
|
1590
|
+
* for example, this is used to simulate a stale or current GDC version
|
|
1591
|
+
* */
|
|
1558
1592
|
minor: number
|
|
1593
|
+
/**
|
|
1594
|
+
* a callback to potentially edit the preInit.getStatus() response
|
|
1595
|
+
*/
|
|
1559
1596
|
mayEditResponse: (response: any) => any
|
|
1560
1597
|
}
|
|
1561
1598
|
}
|
|
@@ -1566,6 +1603,7 @@ export type PreInit = {
|
|
|
1566
1603
|
- can supply ()=>false to hide charts that will otherwise shown
|
|
1567
1604
|
- can define arbitrary chart type names for purpose-specific charts
|
|
1568
1605
|
*/
|
|
1606
|
+
|
|
1569
1607
|
export type isSupportedChartCallbacks = {
|
|
1570
1608
|
[chartType: string]: (f: any, auth: any) => boolean | undefined
|
|
1571
1609
|
}
|