mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-01 21:13:11 +00:00
update types
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
"masked": null,
|
||||
"placeholder": null,
|
||||
"pattern": "^[a-zA-Z0-9_-]+:([0-9a-fA-F]{2})+\\$([0-9a-fA-F]{2})+$",
|
||||
"pattern-description":
|
||||
"patternDescription":
|
||||
'Each item must be of the form "<USERNAME>:<SALT>$<HASH>".',
|
||||
"textarea": false,
|
||||
},
|
||||
@@ -65,8 +65,8 @@ export class List<A extends ValueSpecList> extends IBuilder<A> {
|
||||
range: string;
|
||||
spec: {
|
||||
spec: Config<InputSpec>;
|
||||
"display-as": null | string;
|
||||
"unique-by": null | UniqueBy;
|
||||
displayAs: null | string;
|
||||
uniqueBy: null | UniqueBy;
|
||||
};
|
||||
}
|
||||
>(a: A) {
|
||||
@@ -94,18 +94,13 @@ export class List<A extends ValueSpecList> extends IBuilder<A> {
|
||||
Default<string[]> & {
|
||||
range: string;
|
||||
spec: {
|
||||
tag: {
|
||||
id: B;
|
||||
name: string;
|
||||
description: null | string;
|
||||
warning: null | string;
|
||||
"variant-names": {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
variants: Variants<{ [key: string]: InputSpec }>;
|
||||
"display-as": null | string;
|
||||
"unique-by": UniqueBy;
|
||||
id: B;
|
||||
name: string;
|
||||
description: null | string;
|
||||
warning: null | string;
|
||||
variants: Variants<{ [key: string]: { name: string, spec: InputSpec } }>;
|
||||
displayAs: null | string;
|
||||
uniqueBy: UniqueBy;
|
||||
default: string;
|
||||
};
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@ export type StringSpec = {
|
||||
masked: boolean | null;
|
||||
placeholder: string | null;
|
||||
pattern: null | string;
|
||||
"pattern-description": null | string;
|
||||
patternDescription: null | string;
|
||||
textarea: boolean | null;
|
||||
};
|
||||
export type NumberSpec = {
|
||||
@@ -64,7 +64,7 @@ export type Nullable = {
|
||||
masked: null, // If there is a masked, then the value is going to be masked in the FE, like a password
|
||||
placeholder: null, // If there is a placeholder, then the value is going to be masked in the FE, like a password
|
||||
pattern: null, // A regex pattern to validate the value
|
||||
"pattern-description": null,
|
||||
patternDescription: null,
|
||||
textarea: null
|
||||
})
|
||||
```
|
||||
@@ -99,7 +99,7 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
A extends Description &
|
||||
Default<string> & {
|
||||
values: readonly string[] | string[];
|
||||
"value-names": Record<string, string>;
|
||||
valueNames: Record<string, string>;
|
||||
}
|
||||
>(a: A) {
|
||||
return new Value({
|
||||
@@ -113,10 +113,10 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
description: string | null;
|
||||
warning: string | null;
|
||||
default: null | { [k: string]: unknown };
|
||||
"display-as": null | string;
|
||||
"unique-by": null | string;
|
||||
displayAs: null | string;
|
||||
uniqueBy: null | string;
|
||||
spec: Config<InputSpec>;
|
||||
"value-names": Record<string, string>;
|
||||
valueNames: Record<string, string>;
|
||||
}
|
||||
>(a: A) {
|
||||
const { spec: previousSpec, ...rest } = a;
|
||||
@@ -135,13 +135,13 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
name: string;
|
||||
description: string | null;
|
||||
warning: string | null;
|
||||
"variant-names": {
|
||||
variantNames: {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
variants: Variants<{ [key: string]: InputSpec }>;
|
||||
"display-as": string | null;
|
||||
"unique-by": UniqueBy;
|
||||
displayAs: string | null;
|
||||
uniqueBy: UniqueBy;
|
||||
},
|
||||
B extends string
|
||||
>(a: A) {
|
||||
|
||||
@@ -26,15 +26,15 @@ import { Config } from ".";
|
||||
"description":
|
||||
'- Disabled: Disable pruning\n- Automatic: Limit blockchain size on disk to a certain number of megabytes\n- Manual: Prune blockchain with the "pruneblockchain" RPC\n',
|
||||
"warning": null,
|
||||
"variant-names": {
|
||||
"variantNames": {
|
||||
"disabled": "Disabled",
|
||||
"automatic": "Automatic",
|
||||
"manual": "Manual",
|
||||
},
|
||||
},
|
||||
"display-as": null,
|
||||
"unique-by": null,
|
||||
"variant-names": null,
|
||||
"displayAs": null,
|
||||
"uniqueBy": null,
|
||||
"variantNames": null,
|
||||
});
|
||||
```
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user