@@ -46,7 +46,7 @@ import {
4646 V_TableFieldOptions ,
4747 V_ViewFieldOptions ,
4848} from 'packages/core/src/api/Validators' ;
49- import { validate } from 'packages/core/src/utils/ZodUtils' ;
49+ import { validateAPIArgs } from 'packages/core/src/utils/ZodUtils' ;
5050import { z } from 'zod' ;
5151import { TableMountable } from 'packages/core/src/fields/metaBindTable/TableMountable' ;
5252import {
@@ -131,7 +131,7 @@ export abstract class API<Plugin extends IPlugin> {
131131 options : FieldOptionMap [ Type ] ,
132132 honorExcludedSetting : boolean = true ,
133133 ) : FieldMountable {
134- validate (
134+ validateAPIArgs (
135135 z . object ( {
136136 type : V_FieldType ,
137137 filePath : V_FilePath ,
@@ -193,7 +193,7 @@ export abstract class API<Plugin extends IPlugin> {
193193 position ?: NotePosition | undefined ,
194194 honorExcludedSetting : boolean = true ,
195195 ) : FieldMountable {
196- validate (
196+ validateAPIArgs (
197197 z . object ( {
198198 fieldString : z . string ( ) ,
199199 filePath : V_FilePath ,
@@ -251,7 +251,7 @@ export abstract class API<Plugin extends IPlugin> {
251251 position ?: NotePosition | undefined ,
252252 honorExcludedSetting : boolean = true ,
253253 ) : FieldMountable {
254- validate (
254+ validateAPIArgs (
255255 z . object ( {
256256 type : V_FieldType ,
257257 declaration : z . string ( ) ,
@@ -314,7 +314,7 @@ export abstract class API<Plugin extends IPlugin> {
314314 * @param options
315315 */
316316 public createInputFieldMountable ( filePath : string , options : InputFieldOptions ) : InputFieldMountable {
317- validate (
317+ validateAPIArgs (
318318 z . object ( {
319319 filePath : V_FilePath ,
320320 options : V_InputFieldOptions ,
@@ -348,7 +348,7 @@ export abstract class API<Plugin extends IPlugin> {
348348 * @param options
349349 */
350350 public createViewFieldMountable ( filePath : string , options : ViewFieldOptions ) : ViewFieldMountable {
351- validate (
351+ validateAPIArgs (
352352 z . object ( {
353353 filePath : V_FilePath ,
354354 options : V_ViewFieldOptions ,
@@ -382,7 +382,7 @@ export abstract class API<Plugin extends IPlugin> {
382382 * @param options
383383 */
384384 public createJsViewFieldMountable ( filePath : string , options : JsViewFieldOptions ) : JsViewFieldMountable {
385- validate (
385+ validateAPIArgs (
386386 z . object ( {
387387 filePath : V_FilePath ,
388388 options : V_JsViewFieldOptions ,
@@ -412,7 +412,7 @@ export abstract class API<Plugin extends IPlugin> {
412412 * @param options
413413 */
414414 public createTableMountable ( filePath : string , options : TableOptions ) : TableMountable {
415- validate (
415+ validateAPIArgs (
416416 z . object ( {
417417 filePath : V_FilePath ,
418418 options : V_TableFieldOptions ,
@@ -435,7 +435,7 @@ export abstract class API<Plugin extends IPlugin> {
435435 * @param options
436436 */
437437 public createButtonGroupMountable ( filePath : string , options : ButtonGroupOptions ) : ButtonGroupMountable {
438- validate (
438+ validateAPIArgs (
439439 z . object ( {
440440 filePath : V_FilePath ,
441441 options : V_InlineButtonOptions ,
@@ -472,7 +472,7 @@ export abstract class API<Plugin extends IPlugin> {
472472 * @param options
473473 */
474474 public createButtonMountable ( filePath : string , options : ButtonOptions ) : ButtonMountable {
475- validate (
475+ validateAPIArgs (
476476 z . object ( {
477477 filePath : V_FilePath ,
478478 options : V_ButtonOptions ,
@@ -502,7 +502,7 @@ export abstract class API<Plugin extends IPlugin> {
502502 * @param options
503503 */
504504 public createEmbedMountable ( filePath : string , options : EmbedOptions ) : EmbedMountable {
505- validate (
505+ validateAPIArgs (
506506 z . object ( {
507507 filePath : V_FilePath ,
508508 options : V_EmbedOptions ,
@@ -523,7 +523,7 @@ export abstract class API<Plugin extends IPlugin> {
523523 * @param filePath the file path that the field is located in or an empty string
524524 */
525525 public createExcludedMountable ( filePath : string ) : ExcludedMountable {
526- validate (
526+ validateAPIArgs (
527527 z . object ( {
528528 filePath : V_FilePath ,
529529 } ) ,
@@ -542,7 +542,7 @@ export abstract class API<Plugin extends IPlugin> {
542542 * @param fieldType
543543 */
544544 public getInlineFieldDeclarationPrefix ( fieldType : FieldType ) : string {
545- validate (
545+ validateAPIArgs (
546546 z . object ( {
547547 fieldType : V_FieldType ,
548548 } ) ,
@@ -573,7 +573,7 @@ export abstract class API<Plugin extends IPlugin> {
573573 * @param str the declaration string
574574 */
575575 public isInlineFieldDeclaration ( fieldType : FieldType , str : string ) : boolean {
576- validate (
576+ validateAPIArgs (
577577 z . object ( {
578578 fieldType : V_FieldType ,
579579 str : z . string ( ) ,
@@ -596,7 +596,7 @@ export abstract class API<Plugin extends IPlugin> {
596596 * @param str the declaration string
597597 */
598598 public isInlineFieldDeclarationAndGetType ( str : string ) : InlineFieldType | undefined {
599- validate (
599+ validateAPIArgs (
600600 z . object ( {
601601 str : z . string ( ) ,
602602 } ) ,
@@ -645,7 +645,7 @@ export abstract class API<Plugin extends IPlugin> {
645645 property : string [ ] ,
646646 listenToChildren : boolean = false ,
647647 ) : BindTargetDeclaration {
648- validate (
648+ validateAPIArgs (
649649 z . object ( {
650650 storageType : z . string ( ) ,
651651 storagePath : z . string ( ) ,
@@ -680,7 +680,7 @@ export abstract class API<Plugin extends IPlugin> {
680680 filePath : string ,
681681 scope ?: BindTargetScope ,
682682 ) : BindTargetDeclaration {
683- validate (
683+ validateAPIArgs (
684684 z . object ( {
685685 declarationString : z . string ( ) ,
686686 filePath : V_FilePath ,
@@ -703,7 +703,7 @@ export abstract class API<Plugin extends IPlugin> {
703703 * @param value
704704 */
705705 public setMetadata ( bindTarget : BindTargetDeclaration , value : unknown ) : void {
706- validate (
706+ validateAPIArgs (
707707 z . object ( {
708708 bindTarget : V_BindTargetDeclaration ,
709709 } ) ,
@@ -722,7 +722,7 @@ export abstract class API<Plugin extends IPlugin> {
722722 * @param bindTarget
723723 */
724724 public getMetadata ( bindTarget : BindTargetDeclaration ) : unknown {
725- validate (
725+ validateAPIArgs (
726726 z . object ( {
727727 bindTarget : V_BindTargetDeclaration ,
728728 } ) ,
@@ -741,7 +741,7 @@ export abstract class API<Plugin extends IPlugin> {
741741 * @param updateFn a function that takes the current value and returns the new value
742742 */
743743 public updateMetadata ( bindTarget : BindTargetDeclaration , updateFn : ( value : unknown ) => unknown ) : void {
744- validate (
744+ validateAPIArgs (
745745 z . object ( {
746746 bindTarget : V_BindTargetDeclaration ,
747747 updateFn : z . function ( ) . args ( z . any ( ) ) . returns ( z . any ( ) ) ,
@@ -771,7 +771,7 @@ export abstract class API<Plugin extends IPlugin> {
771771 lifecycleHook : LifecycleHook ,
772772 callback : ( value : unknown ) => void ,
773773 ) : void {
774- validate (
774+ validateAPIArgs (
775775 z . object ( {
776776 bindTarget : V_BindTargetDeclaration ,
777777 lifecycleHook : this . plugin . internal . getLifecycleHookValidator ( ) ,
@@ -807,7 +807,7 @@ export abstract class API<Plugin extends IPlugin> {
807807 * @param lineEnd
808808 */
809809 public createNotePosition ( lineStart : number , lineEnd : number ) : NotePosition {
810- validate (
810+ validateAPIArgs (
811811 z . object ( {
812812 lineStart : z . number ( ) ,
813813 lineEnd : z . number ( ) ,
0 commit comments