UNPKG

@smj0x/homebridge-shortcuts-buttons

Version:

Run any Apple Shortcut with just the tap of a button, and execute a custom unix command (or another shortcut!) after completion to handle its success/failure, using x-callback-url.

20 lines 999 B
/** * @module server */ interface HSBXCallbackUrlRequestValidatorDescriptor { readonly condition: () => boolean; readonly errorCode: number; readonly errorMessage: string; } type HSBXCallbackUrlRequestValidatorsKeys = 'hasValidMethod' | 'hasValidPathname' | 'hasValidSearchParams' | 'hasValidAuthToken'; type HSBXCallbackUrlRequestValidatorsDescriptors = Readonly<Record<HSBXCallbackUrlRequestValidatorsKeys, HSBXCallbackUrlRequestValidatorDescriptor>>; declare class HSBXCallbackUrlRequestValidator implements HSBXCallbackUrlRequestValidatorDescriptor { readonly condition: () => boolean; readonly errorCode: number; readonly errorMessage: string; constructor(condition: () => boolean, errorCode: number, errorMessage: string); test(): boolean; } export declare const createRequestValidators: (validatorsDescriptors: HSBXCallbackUrlRequestValidatorsDescriptors) => ReadonlyArray<HSBXCallbackUrlRequestValidator>; export {}; //# sourceMappingURL=validators.d.ts.map