pw-js-api 0.3.14 → 0.3.15-dev.2f3e25b
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/esm/types/api.d.ts +19 -24
- package/package.json +1 -1
package/esm/types/api.d.ts
CHANGED
|
@@ -177,16 +177,14 @@ export interface ListBlockResult {
|
|
|
177
177
|
*/
|
|
178
178
|
MinimapColor?: number;
|
|
179
179
|
/**
|
|
180
|
-
*
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Maps to a block in EE that might be identical, its value will either be null or a list of argument types.
|
|
180
|
+
* Maps to block(s) in EE that might be identical, its value will either be null or a list of argument types.
|
|
181
|
+
*
|
|
182
|
+
* NOTE: The object will be empty if there isnt a corresponding block, it will not be undefined still.
|
|
185
183
|
*/
|
|
186
|
-
|
|
184
|
+
LegacyMorphs: { [blockId: number]: null | number[] };
|
|
187
185
|
}
|
|
188
186
|
|
|
189
|
-
export interface BlockField<T extends string
|
|
187
|
+
export interface BlockField<T extends string, TypeOf> {
|
|
190
188
|
/**
|
|
191
189
|
* Name of the field, used for identifying the field.
|
|
192
190
|
*/
|
|
@@ -199,20 +197,26 @@ export interface BlockField<T extends string = string> {
|
|
|
199
197
|
* Description describing what this field is for.
|
|
200
198
|
*/
|
|
201
199
|
Description: string;
|
|
200
|
+
/**
|
|
201
|
+
* The default value set for this field.
|
|
202
|
+
*
|
|
203
|
+
* If applicable.
|
|
204
|
+
*/
|
|
205
|
+
DefaultValue?: TypeOf;
|
|
202
206
|
/**
|
|
203
207
|
* Whether if this field is required.
|
|
204
208
|
*/
|
|
205
209
|
Required: boolean
|
|
206
210
|
}
|
|
207
211
|
|
|
208
|
-
export interface TextBlockField extends BlockField<"String"> {
|
|
212
|
+
export interface TextBlockField extends BlockField<"String", string> {
|
|
209
213
|
/**
|
|
210
|
-
*
|
|
214
|
+
* This will be a regex string which validates the input if not undefined.
|
|
211
215
|
*/
|
|
212
216
|
Pattern?: string;
|
|
213
217
|
}
|
|
214
218
|
|
|
215
|
-
export interface NumberBlockField extends BlockField<"Int32" | "UInt32"> {
|
|
219
|
+
export interface NumberBlockField extends BlockField<"Int32" | "UInt32", number> {
|
|
216
220
|
/**
|
|
217
221
|
* The minimum possible value for this field.
|
|
218
222
|
*/
|
|
@@ -221,39 +225,30 @@ export interface NumberBlockField extends BlockField<"Int32" | "UInt32"> {
|
|
|
221
225
|
* The maximum possible value for this field.
|
|
222
226
|
*/
|
|
223
227
|
MaxValue: number;
|
|
224
|
-
/**
|
|
225
|
-
* The default value set for this number field.
|
|
226
|
-
*/
|
|
227
|
-
DefaultValue: number;
|
|
228
|
-
|
|
229
228
|
/**
|
|
230
229
|
* May not be included, if so, this will be a list of numbers whose values cannot be given for this field.
|
|
231
230
|
*/
|
|
232
231
|
ExcludedValues?: number[]
|
|
233
232
|
}
|
|
234
233
|
|
|
235
|
-
export interface BoolBlockField extends BlockField<"Boolean"> {
|
|
236
|
-
/**
|
|
237
|
-
* The default value set for this boolean field.
|
|
238
|
-
*/
|
|
239
|
-
DefaultValue: boolean;
|
|
234
|
+
export interface BoolBlockField extends BlockField<"Boolean", boolean> {
|
|
240
235
|
}
|
|
241
236
|
|
|
242
237
|
/**
|
|
243
238
|
* Block field special for Note blocks.
|
|
244
239
|
*/
|
|
245
|
-
export interface NoteBlockField extends BlockField<"DrumNote[]" | "PianoNote[]" | "GuitarNote[]"> {
|
|
240
|
+
export interface NoteBlockField extends BlockField<"DrumNote[]" | "PianoNote[]" | "GuitarNote[]", never> {
|
|
246
241
|
/**
|
|
247
|
-
*
|
|
242
|
+
* For note fields, it's currently just 1 for now.
|
|
248
243
|
*/
|
|
249
244
|
MinLength: number;
|
|
250
245
|
/**
|
|
251
|
-
*
|
|
246
|
+
* For note fields, it's currently just 6 for now.
|
|
252
247
|
*/
|
|
253
248
|
MaxLength: number;
|
|
254
249
|
}
|
|
255
250
|
|
|
256
|
-
export type AnyBlockField =
|
|
251
|
+
export type AnyBlockField = TextBlockField | NumberBlockField | BoolBlockField | NoteBlockField;
|
|
257
252
|
|
|
258
253
|
|
|
259
254
|
export interface ApiClientOptions {
|