UNPKG

@camunda8/sdk

Version:

[![NPM](https://nodei.co/npm/@camunda8/sdk.png)](https://www.npmjs.com/package/@camunda8/sdk)

53 lines (52 loc) 1.99 kB
import { LosslessDto } from '../../lib'; import { DecisionDeployment, DecisionRequirementsDeployment, FormDeployment, ProcessDeployment } from './C8Dto'; export declare class DeployResourceResponseDto extends LosslessDto { deploymentKey: string; deployments: ({ processDefinition: ProcessDeployment; } | { decisionDefinition: DecisionDeployment; } | { decisionRequirements: DecisionRequirementsDeployment; } | { form: FormDeployment; })[]; tenantId: string; } export type Ctor<T> = new (obj: any) => T; export type UnknownRequestBody = Record<string, any>; export interface JsonApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> extends BaseApiEndpointRequest<T> { /** JSON-parse response? Default: true */ json?: true | undefined; } export interface RawApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> extends BaseApiEndpointRequest<T> { /** JSON-parse response? */ json: false; } export type ApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> = JsonApiEndpointRequest<T> | RawApiEndpointRequest<T>; export type SearchSortRequest<T = string> = Array<{ /** The field to sort by. */ field: T; /** The order in which to sort the related field. Default value: ASC */ order?: 'ASC' | 'DESC'; }>; interface BaseApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> { method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; /** The URL path of the API endpoint. */ urlPath: string; /** The request body. */ body?: T; /** TODO: multi-part form support needs to be implemented */ formData?: FormData; /** The query parameters. */ queryParams?: { [key: string]: string | number | boolean | undefined; }; /** The headers. */ headers?: { [key: string]: string | number | boolean; }; /** A custom JSON parsing function */ parseJson?: typeof JSON.parse; } export {};