UNPKG

@vzeta/camunda-api-zod-schemas

Version:

Zod schemas and TypeScript types for Camunda 8 unified API

88 lines (87 loc) 3.44 kB
import { z } from 'zod'; import { Endpoint } from './common'; declare const documentMetadataSchema: z.ZodObject<{ contentType: z.ZodString; fileName: z.ZodString; expiresAt: z.ZodString; size: z.ZodNumber; processDefinitionId: z.ZodString; processInstanceKey: z.ZodString; customProperties: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>; type DocumentMetadata = z.infer<typeof documentMetadataSchema>; declare const documentReferenceSchema: z.ZodObject<{ 'camunda.document.type': z.ZodLiteral<"camunda">; storeId: z.ZodString; documentId: z.ZodString; contentHash: z.ZodString; metadata: z.ZodObject<{ contentType: z.ZodString; fileName: z.ZodString; expiresAt: z.ZodString; size: z.ZodNumber; processDefinitionId: z.ZodString; processInstanceKey: z.ZodString; customProperties: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>; }, z.core.$strip>; type DocumentReference = z.infer<typeof documentReferenceSchema>; declare const documentCreationFailureDetailSchema: z.ZodObject<{ fileName: z.ZodString; detail: z.ZodString; }, z.core.$strip>; type DocumentCreationFailureDetail = z.infer<typeof documentCreationFailureDetailSchema>; declare const createDocumentsResponseBodySchema: z.ZodObject<{ createdDocuments: z.ZodArray<z.ZodObject<{ 'camunda.document.type': z.ZodLiteral<"camunda">; storeId: z.ZodString; documentId: z.ZodString; contentHash: z.ZodString; metadata: z.ZodObject<{ contentType: z.ZodString; fileName: z.ZodString; expiresAt: z.ZodString; size: z.ZodNumber; processDefinitionId: z.ZodString; processInstanceKey: z.ZodString; customProperties: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>; }, z.core.$strip>>; failedDocuments: z.ZodArray<z.ZodObject<{ fileName: z.ZodString; detail: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; type CreateDocumentsResponseBody = z.infer<typeof createDocumentsResponseBodySchema>; declare const documentLinkRequestBodySchema: z.ZodObject<{ timeToLive: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; }, z.core.$strip>; type DocumentLinkRequestBody = z.infer<typeof documentLinkRequestBodySchema>; declare const documentLinkSchema: z.ZodObject<{ url: z.ZodString; expiresAt: z.ZodString; }, z.core.$strip>; type DocumentLink = z.infer<typeof documentLinkSchema>; declare const createDocument: Endpoint<{ storeId?: string; documentId: string; }>; declare const createDocuments: Endpoint<{ storeId?: string; }>; declare const getDocument: Endpoint<{ documentId: string; storeId?: string; contentHash?: string; }>; declare const deleteDocument: Endpoint<{ documentId: string; storeId?: string; }>; declare const createDocumentLink: Endpoint<{ documentId: string; storeId?: string; contentHash?: string; }>; export { documentMetadataSchema, documentReferenceSchema, documentCreationFailureDetailSchema, createDocumentsResponseBodySchema, documentLinkRequestBodySchema, documentLinkSchema, createDocument, createDocuments, getDocument, deleteDocument, createDocumentLink, }; export type { DocumentMetadata, DocumentReference, DocumentCreationFailureDetail, CreateDocumentsResponseBody, DocumentLinkRequestBody, DocumentLink, };