export interface FunctionType { /** * Id of the Function type * @readonly */ id?: string | null; /** Function component from dev center */ function?: _Function; /** The Id of the app which exposes the function type */ appDefId?: string | null; /** Dev center component name */ compName?: string | null; /** * The name of the app which exposes the function type * @readonly */ appName?: string | null; } /** * A component that describes a Function * Design is highly influenced by business schema api */ export interface _Function { /** Function method definitions */ definitions?: Definition[]; /** Function configuration */ configuration?: Configuration; /** Function description */ description?: Description; } export interface Input { /** * Schema definition: https://json-schema.org/draft/2020-12/schema * Protobuf does not support `$` variables -- cannot define the json-schema in protobuf */ schema?: Record | null; /** UI definition */ ui?: Record | null; /** Input display description */ displayDescription?: string | null; /** Builder SPI */ builderSpi?: BuilderSpi; } export interface BuilderSpi { /** SPI url called from Function Builder */ baseUri?: string | null; /** Whether SPI supports appending Input Schema dynamically */ dynamicSchemaFetchingEnabled?: boolean | null; } export interface Output { /** * Schema definition: https://json-schema.org/draft/2020-12/schema * Protobuf does not support `$` variables -- cannot define the json-schema in protobuf */ schema?: Record | null; /** UI definition */ ui?: Record | null; /** Defined state */ defined?: State; /** Empty state */ empty?: State; } export interface State { /** State description */ description?: string | null; } export interface Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; /** * Image filename. * @readonly */ filename?: string | null; } export interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } export interface Spi { /** SPI fqdn */ fqdn?: string | null; /** * Configuration based on dev center SPI component configuration * Schema definition: https://json-schema.org/draft/2020-12/schema */ schema?: Record | null; /** UI definition */ ui?: Record | null; } /** * Function definition * IMPORTANT! Initial product will support only single function definition */ export interface Definition { /** Method */ method?: string; /** Function input. */ input?: Input; /** Function output. */ output?: Output; /** @readonly */ triggerId?: string | null; } export interface Configuration { /** Function can be implemented multiple times on single site */ multipleInstancesAllowed?: boolean | null; /** Spi configuration */ spi?: Spi; /** Do not include the function in the functions catalog in the BM */ hideFromFunctionsCatalog?: boolean | null; } export interface Description { aboutDescription?: string | null; /** Description of how it works */ howItWorksDescription?: string | null; /** Description of the outcome */ outcomeDescription?: string | null; /** Representative image */ representativeImage?: Image; } export interface GetFunctionTypeRequest { /** Function type id */ functionTypeId: string; /** The Id of the app which exposes the function type */ appDefId: string; } export interface GetFunctionTypeResponse { /** Function type */ functionType?: FunctionType; } export interface QueryFunctionTypesRequest { /** WQL expression. */ query?: CursorQuery; } export interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting[]; } /** @oneof */ export interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface CursorPaging { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface QueryFunctionTypesResponse { /** List of function types. */ functionTypes?: FunctionType[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } export interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface DefinitionNonNullableFields { method: string; } interface FocalPointNonNullableFields { x: number; y: number; } interface ImageNonNullableFields { id: string; url: string; height: number; width: number; focalPoint?: FocalPointNonNullableFields; } interface DescriptionNonNullableFields { representativeImage?: ImageNonNullableFields; } interface _FunctionNonNullableFields { definitions: DefinitionNonNullableFields[]; description?: DescriptionNonNullableFields; } interface FunctionTypeNonNullableFields { function?: _FunctionNonNullableFields; } export interface GetFunctionTypeResponseNonNullableFields { functionType?: FunctionTypeNonNullableFields; } export interface QueryFunctionTypesResponseNonNullableFields { functionTypes: FunctionTypeNonNullableFields[]; } export {};