@wix/auto_sdk_papyrus_documents 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/build/cjs/index.d.ts +115 -0
  2. package/build/cjs/index.js +1101 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1465 -0
  5. package/build/cjs/index.typings.js +863 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1030 -0
  8. package/build/cjs/meta.js +705 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +411 -0
  11. package/build/cjs/schemas.js +658 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +115 -0
  14. package/build/es/index.mjs +1050 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +1465 -0
  17. package/build/es/index.typings.mjs +817 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +1030 -0
  20. package/build/es/meta.mjs +658 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +411 -0
  24. package/build/es/schemas.mjs +602 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +115 -0
  27. package/build/internal/cjs/index.js +1101 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +1465 -0
  30. package/build/internal/cjs/index.typings.js +863 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +1030 -0
  33. package/build/internal/cjs/meta.js +705 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +411 -0
  36. package/build/internal/cjs/schemas.js +658 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +115 -0
  39. package/build/internal/es/index.mjs +1050 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +1465 -0
  42. package/build/internal/es/index.typings.mjs +817 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +1030 -0
  45. package/build/internal/es/meta.mjs +658 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +411 -0
  48. package/build/internal/es/schemas.mjs +602 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../index.ts","../../../src/papyrus-v1-document-documents.public.ts","../../../src/papyrus-v1-document-documents.universal.ts","../../../src/papyrus-v1-document-documents.http.ts","../../../src/papyrus-v1-document-documents.context.ts"],"sourcesContent":["export * from './src/papyrus-v1-document-documents.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n CreateDocumentOptions,\n DeleteDocumentResponse,\n DocumentCreatedEnvelope,\n DocumentDeletedEnvelope,\n DocumentQuery,\n DocumentRenderDelayedEnvelope,\n DocumentRenderFailedEnvelope,\n DocumentRenderedEnvelope,\n DocumentUpdatedEnvelope,\n DocumentsQueryBuilder,\n DownloadDocumentApplicationErrors,\n DownloadDocumentOptions,\n DownloadDocumentResponse,\n DownloadDocumentSourceApplicationErrors,\n DownloadDocumentSourceOptions,\n DownloadDocumentSourceResponse,\n GetDocumentOptions,\n GetDownloadUrlOptions,\n GetDownloadUrlResponse,\n QueryDocumentOptions,\n QueryDocumentResponse,\n RawHttpResponse,\n UpdateDocumentOptions,\n UpdateDocumentResponse,\n createDocument as universalCreateDocument,\n deleteDocument as universalDeleteDocument,\n downloadDocument as universalDownloadDocument,\n downloadDocumentSource as universalDownloadDocumentSource,\n getDocument as universalGetDocument,\n getDownloadPage as universalGetDownloadPage,\n getDownloadUrl as universalGetDownloadUrl,\n queryDocument as universalQueryDocument,\n redirectToDocument as universalRedirectToDocument,\n typedQueryDocument as universalTypedQueryDocument,\n updateDocument as universalUpdateDocument,\n} from './papyrus-v1-document-documents.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/papyrus' };\n\nexport function getDownloadPage(\n httpClient: HttpClient\n): GetDownloadPageSignature {\n return (file: string | null) =>\n universalGetDownloadPage(\n file,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDownloadPageSignature {\n /**\n * Get Document.\n */\n (file: string | null): Promise<RawHttpResponse>;\n}\n\nexport function redirectToDocument(\n httpClient: HttpClient\n): RedirectToDocumentSignature {\n return (file: string | null) =>\n universalRedirectToDocument(\n file,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedirectToDocumentSignature {\n /**\n * Get Document.\n */\n (file: string | null): Promise<RawHttpResponse>;\n}\n\nexport function createDocument(\n httpClient: HttpClient\n): CreateDocumentSignature {\n return (options?: CreateDocumentOptions) =>\n universalCreateDocument(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateDocumentSignature {\n /**\n * Creates a new Document\n * @returns The created Document\n */\n (options?: CreateDocumentOptions): Promise<Document>;\n}\n\nexport function getDocument(httpClient: HttpClient): GetDocumentSignature {\n return (documentId: string, options?: GetDocumentOptions) =>\n universalGetDocument(\n documentId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDocumentSignature {\n /**\n * Get Document.\n * @param - ID of the Document to retrieve\n * @returns The retrieved Document\n */\n (documentId: string, options?: GetDocumentOptions): Promise<Document>;\n}\n\nexport function deleteDocument(\n httpClient: HttpClient\n): DeleteDocumentSignature {\n return (documentId: string) =>\n universalDeleteDocument(\n documentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteDocumentSignature {\n /**\n * Deletes Document.\n * @param - ID of the Document to delete\n */\n (documentId: string): Promise<DeleteDocumentResponse>;\n}\n\nexport function queryDocument(httpClient: HttpClient): QueryDocumentSignature {\n return (options?: QueryDocumentOptions) =>\n universalQueryDocument(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryDocumentSignature {\n /**\n * Query Documents using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n */\n (options?: QueryDocumentOptions): DocumentsQueryBuilder;\n}\n\nexport function typedQueryDocument(\n httpClient: HttpClient\n): TypedQueryDocumentSignature {\n return (query: DocumentQuery, options?: QueryDocumentOptions) =>\n universalTypedQueryDocument(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryDocumentSignature {\n /** */\n (\n query: DocumentQuery,\n options?: QueryDocumentOptions\n ): Promise<QueryDocumentResponse>;\n}\n\nexport function updateDocument(\n httpClient: HttpClient\n): UpdateDocumentSignature {\n return (_id: string | null, options?: UpdateDocumentOptions) =>\n universalUpdateDocument(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateDocumentSignature {\n /**\n * Updates Document. Currently supports only render_status, file_id and static_url updates.\n * @param - Document ID.\n */\n (\n _id: string | null,\n options?: UpdateDocumentOptions\n ): Promise<UpdateDocumentResponse>;\n}\n\nexport function downloadDocument(\n httpClient: HttpClient\n): DownloadDocumentSignature {\n return (documentId: string, options?: DownloadDocumentOptions) =>\n universalDownloadDocument(\n documentId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DownloadDocumentSignature {\n /**\n * Downloads document.\n * @param - ID of the Document to retrieve\n */\n (documentId: string, options?: DownloadDocumentOptions): Promise<\n DownloadDocumentResponse & {\n __applicationErrorsType?: DownloadDocumentApplicationErrors;\n }\n >;\n}\n\nexport function getDownloadUrl(\n httpClient: HttpClient\n): GetDownloadUrlSignature {\n return (options?: GetDownloadUrlOptions) =>\n universalGetDownloadUrl(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDownloadUrlSignature {\n /**\n * Resolves document download url.\n */\n (options?: GetDownloadUrlOptions): Promise<GetDownloadUrlResponse>;\n}\n\nexport function downloadDocumentSource(\n httpClient: HttpClient\n): DownloadDocumentSourceSignature {\n return (documentId: string, options?: DownloadDocumentSourceOptions) =>\n universalDownloadDocumentSource(\n documentId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DownloadDocumentSourceSignature {\n /**\n * Downloads document.\n * @param - ID of the Document to retrieve\n */\n (documentId: string, options?: DownloadDocumentSourceOptions): Promise<\n DownloadDocumentSourceResponse & {\n __applicationErrorsType?: DownloadDocumentSourceApplicationErrors;\n }\n >;\n}\n\nexport const onDocumentCreated = EventDefinition(\n 'wix.papyrus.v1.document_created',\n true,\n (event: DocumentCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.expirationDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<DocumentCreatedEnvelope>();\nexport const onDocumentDeleted = EventDefinition(\n 'wix.papyrus.v1.document_deleted',\n true,\n (event: DocumentDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'undefined.expirationDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<DocumentDeletedEnvelope>();\nexport const onDocumentRenderDelayed = EventDefinition(\n 'wix.papyrus.v1.document_document_render_delayed',\n true,\n (event: DocumentRenderDelayedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.document.createdDate' },\n { path: 'data.document.updatedDate' },\n { path: 'data.document.expirationDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<DocumentRenderDelayedEnvelope>();\nexport const onDocumentRenderFailed = EventDefinition(\n 'wix.papyrus.v1.document_document_render_failed',\n true,\n (event: DocumentRenderFailedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.document.createdDate' },\n { path: 'data.document.updatedDate' },\n { path: 'data.document.expirationDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<DocumentRenderFailedEnvelope>();\nexport const onDocumentRendered = EventDefinition(\n 'wix.papyrus.v1.document_document_rendered',\n true,\n (event: DocumentRenderedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.document.createdDate' },\n { path: 'data.document.updatedDate' },\n { path: 'data.document.expirationDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<DocumentRenderedEnvelope>();\nexport const onDocumentUpdated = EventDefinition(\n 'wix.papyrus.v1.document_updated',\n true,\n (event: DocumentUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.expirationDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<DocumentUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n BackgroundSetting,\n BaseEventMetadata,\n ContentDisposition,\n CreateDocumentOptions,\n CreateDocumentRequest,\n CreateDocumentResponse,\n CursorPaging,\n Cursors,\n DebugOptions,\n DeleteDocumentByExternalIdRequest,\n DeleteDocumentByExternalIdResponse,\n DeleteDocumentRequest,\n DeleteDocumentResponse,\n Document,\n DocumentContent,\n DocumentCreatedEnvelope,\n DocumentDeletedEnvelope,\n DocumentFile,\n DocumentQuerySpec,\n DocumentRenderDelayed,\n DocumentRenderDelayedEnvelope,\n DocumentRenderFailed,\n DocumentRenderFailedEnvelope,\n DocumentRendered,\n DocumentRenderedEnvelope,\n DocumentUpdatedEnvelope,\n DocumentsQueryBuilder,\n DocumentsQueryResult,\n DomainEvent,\n DomainEventBodyOneOf,\n DownloadDocumentOptions,\n DownloadDocumentRequest,\n DownloadDocumentResponse,\n DownloadDocumentSourceOptions,\n DownloadDocumentSourceRequest,\n DownloadDocumentSourceResponse,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FocalPoint,\n Format,\n GetCachedHtmlRequest,\n GetDocumentOptions,\n GetDocumentRequest,\n GetDocumentResponse,\n GetDownloadPageRequest,\n GetDownloadUrlOptions,\n GetDownloadUrlOptionsDocumentOneOf,\n GetDownloadUrlRequest,\n GetDownloadUrlRequestDocumentOneOf,\n GetDownloadUrlResponse,\n GetRendererInfoRequest,\n GetRendererInfoResponse,\n HeadersEntry,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImageSetting,\n MessageEnvelope,\n PageOverflow,\n PageSettings,\n Paging,\n PagingMetadataV2,\n PaperSize,\n QueryDocumentOptions,\n QueryDocumentRequest,\n QueryDocumentResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RawHttpResponse,\n RedirectToDocumentRequest,\n RenderDelayedEventConfig,\n RenderDocumentByIdRequest,\n RenderDocumentRequest,\n RenderFormat,\n RenderStatus,\n RequestedFields,\n ResizeOption,\n RestoreInfo,\n SelectSetting,\n SettingsGroup,\n SortOrder,\n Sorting,\n TemplateSettings,\n TemplateSettingsOverride,\n TextContent,\n TextSetting,\n UpdateDocumentOptions,\n UpdateDocumentRequest,\n UpdateDocumentResponse,\n WebhookIdentityType,\n WixMpClientVersion,\n utils,\n} from './papyrus-v1-document-documents.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPapyrusV1Document from './papyrus-v1-document-documents.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/** Document is the main entity of DocumentService. */\nexport interface Document {\n /**\n * Document ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Represents the time this Document was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this Document was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Document render status.\n * @readonly\n */\n renderStatus?: RenderStatusWithLiterals;\n /**\n * URL to download document. Returned only when Document is in `READY` state.\n * @format WEB_URL\n * @readonly\n */\n downloadUrl?: string | null;\n /**\n * Template ID. When this parameter used the document will be rendered with this template default settings\n * @minLength 1\n * @maxLength 20\n * @immutable\n */\n templateId?: string | null;\n /**\n * Unique per tenant external ID, for example order number. Used to retrieve Document later.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n externalId?: string | null;\n /**\n * Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings.\n * @maxLength 100\n * @immutable\n */\n templateSettingsExternalId?: string | null;\n /**\n * Template settings ID.\n * @format GUID\n * @immutable\n */\n templateSettingsId?: string | null;\n /**\n * The app slug of the template\n * @minLength 1\n * @maxLength 20\n * @immutable\n */\n appSlug?: string | null;\n /**\n * The type of the template.\n * @minLength 1\n * @maxLength 20\n * @immutable\n */\n templateType?: string | null;\n /**\n * Document content that is injected into template.\n * @immutable\n */\n content?: DocumentContent;\n /**\n * Number of hours after which document will be eventually expired and its content erased.\n * @min 1\n * @max 43800\n * @immutable\n */\n expiresInHours?: number;\n /**\n * Represents the time this document becomes expired.\n * @readonly\n */\n expirationDate?: Date | null;\n /**\n * Document format. Defaults to `PDF`.\n * @immutable\n */\n format?: FormatWithLiterals;\n /**\n * Whether the link to the uploaded document is public or private.\n * For public document static URL will be returned.\n * For private document temporary URL will be generated by DocumentService.DownloadDocument.\n * @immutable\n */\n public?: boolean | null;\n /**\n * Optional filename (without extension) to be used for the downloadable document.\n * @minLength 1\n * @maxLength 50\n */\n fileName?: string | null;\n /**\n * Client defined content checksum. Can be used for content comparison.\n * @minLength 1\n * @maxLength 64\n * @immutable\n */\n contentChecksum?: string | null;\n /** Rendering notification config. */\n renderDelayedEventConfig?: RenderDelayedEventConfig;\n /**\n * Size in bytes of a rendered document. Returned only when Document is in `READY` state.\n * @readonly\n */\n sizeInBytes?: number | null;\n}\n\nexport enum RenderStatus {\n UNKNOWN = 'UNKNOWN',\n /** Document was accepted and is waiting to be rendered. */\n ACCEPTED = 'ACCEPTED',\n /** Rendering is in progress. */\n RENDERING = 'RENDERING',\n /** Rendering finished successfully and document is ready to download. */\n READY = 'READY',\n /** Rendering failed. */\n FAILED = 'FAILED',\n /** Rendered document expired and is no longer available for download. */\n EXPIRED = 'EXPIRED',\n}\n\n/** @enumType */\nexport type RenderStatusWithLiterals =\n | RenderStatus\n | 'UNKNOWN'\n | 'ACCEPTED'\n | 'RENDERING'\n | 'READY'\n | 'FAILED'\n | 'EXPIRED';\n\nexport interface DocumentContent {\n /**\n * Document pages. Each page is reference as $page.\n * @minSize 1\n * @maxSize 100\n */\n pages?: Record<string, any>[] | null;\n /** Other document content referenced by $content variable */\n content?: Record<string, any> | null;\n /**\n * ISO 639-1 language code of content (used in translations).\n * @format LANGUAGE\n */\n language?: string;\n /**\n * e.g. en-US.\n * @minLength 2\n * @maxLength 35\n */\n locale?: string | null;\n}\n\nexport enum Format {\n UNKNOWN = 'UNKNOWN',\n PDF = 'PDF',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN' | 'PDF';\n\nexport interface TemplateSettingsOverride {\n /**\n * Indices (0-based) of pages with template settings override.\n * @max 99\n */\n pageIndices?: number[];\n /**\n * Template settings ID.\n * @format GUID\n */\n templateSettingsId?: string | null;\n /**\n * Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings.\n * @maxLength 100\n */\n templateSettingsExternalId?: string | null;\n /**\n * Template ID. When this parameter used the page will be rendered with this template default settings\n * @minLength 1\n * @maxLength 20\n * @immutable\n */\n templateId?: string | null;\n}\n\nexport interface PageSettings {\n /**\n * Indices (0-based) of pages with template settings override.\n * @max 99\n */\n pageIndices?: number[];\n /**\n * Template settings ID.\n * @format GUID\n */\n templateSettingsId?: string | null;\n /**\n * Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings.\n * @maxLength 100\n */\n templateSettingsExternalId?: string | null;\n /**\n * Template ID. When this parameter used the page will be rendered with this template default settings\n * @minLength 1\n * @maxLength 20\n * @immutable\n */\n templateId?: string | null;\n}\n\nexport enum WixMpClientVersion {\n UNKNOWN = 'UNKNOWN',\n MP_V1 = 'MP_V1',\n MP_V2 = 'MP_V2',\n}\n\n/** @enumType */\nexport type WixMpClientVersionWithLiterals =\n | WixMpClientVersion\n | 'UNKNOWN'\n | 'MP_V1'\n | 'MP_V2';\n\nexport interface RenderDelayedEventConfig {\n /**\n * Controls DocumentRenderDelayed action event sending.\n * Event will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING.\n * @min 5\n * @max 120\n * @immutable\n */\n timeInQueueMinutes?: number;\n}\n\nexport interface DebugOptions {\n /**\n * Overrides statics for this document during the rendering\n * @maxLength 60\n * @immutable\n */\n staticsVersionOverride?: string | null;\n}\n\nexport interface RenderDocumentRequest {\n /** Template settings. */\n templateSettings?: TemplateSettings;\n /** Document content. */\n content?: DocumentContent;\n /** Output format, defaults to PDF. */\n outputFormat?: RenderFormatWithLiterals;\n /**\n * Overrides papyrusTemplatesStaticsUrl: \"//static.parastorage.com/services/papyrus-templates-statics/${version_override}/\"\n * @maxLength 100\n */\n versionOverride?: string | null;\n /**\n * Overrides static versions for the statics config.\n * @maxSize 10\n */\n staticOverrides?: Record<string, string>;\n}\n\nexport interface TemplateSettings {\n /**\n * Auto generated ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Wix app definition ID.\n * @minLength 1\n * @maxLength 20\n */\n appSlug?: string | null;\n /**\n * The type of the template.\n * @minLength 1\n * @maxLength 20\n */\n templateType?: string | null;\n /**\n * The id of the template.\n * @minLength 1\n * @maxLength 20\n */\n templateId?: string | null;\n /**\n * Template settings external ID. For example ticket definition ID.\n * Must be unique per tenant where tenant is taken from authorization (wix_app_id + meta_site_id)\n * @minLength 1\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Date settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** @maxSize 10 */\n settingGroups?: SettingsGroup[];\n /** Paper size */\n paperSize?: PaperSizeWithLiterals;\n pageOverflow?: PageOverflowWithLiterals;\n}\n\nexport interface TextSetting {\n /**\n * Font family class name\n * @maxLength 20\n */\n fontFamily?: string | null;\n /**\n * Font style class names\n * @maxSize 10\n * @maxLength 20\n */\n fontStyle?: string[];\n /**\n * Text alignment class name\n * @maxLength 20\n */\n textAlignment?: string | null;\n /**\n * Text color hex code\n * @minLength 7\n * @maxLength 7\n */\n textColor?: string | null;\n /**\n * Font size\n * @min 1\n */\n fontSize?: number | null;\n /** Text content setting */\n textContent?: TextContent[];\n}\n\nexport interface TextContent {\n /**\n * @minLength 3\n * @maxLength 50\n */\n _id?: string;\n /** @maxLength 500 */\n value?: string | null;\n visible?: boolean;\n}\n\nexport interface ImageSetting {\n /** Wix media Image */\n image?: string;\n /** Image resizing mode */\n resize?: ResizeOptionWithLiterals;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum ResizeOption {\n /** Automatically resizes full image to fit image field */\n FIT = 'FIT',\n /** Enables user to manually crop image to fit image field */\n CROP = 'CROP',\n}\n\n/** @enumType */\nexport type ResizeOptionWithLiterals = ResizeOption | 'FIT' | 'CROP';\n\nexport interface SelectSetting {\n /** Selected value */\n value?: string | null;\n /**\n * Color hex code\n * @minLength 7\n * @maxLength 7\n */\n primaryColor?: string | null;\n /**\n * Color hex code\n * @minLength 7\n * @maxLength 7\n */\n secondaryColor?: string | null;\n /** Size */\n size?: number | null;\n}\n\nexport interface BackgroundSetting {\n /**\n * Color of the background hex code\n * @minLength 7\n * @maxLength 9\n */\n color?: string | null;\n /** Wix media Image */\n image?: string;\n}\n\nexport interface SettingsGroup {\n /**\n * Id of the control group\n * @minLength 5\n * @maxLength 50\n */\n groupId?: string;\n /**\n * Display settings.\n * @maxSize 20\n */\n display?: Record<string, boolean>;\n /**\n * Texts settings.\n * @maxSize 20\n */\n texts?: Record<string, TextSetting>;\n /**\n * Images settings.\n * @maxSize 10\n */\n images?: Record<string, ImageSetting>;\n /**\n * Select option settings.\n * @maxSize 20\n */\n selects?: Record<string, SelectSetting>;\n /**\n * Backgrounds settings.\n * @maxSize 20\n */\n backgrounds?: Record<string, BackgroundSetting>;\n}\n\nexport enum PaperSize {\n A4_PORTRAIT = 'A4_PORTRAIT',\n A4_LANDSCAPE = 'A4_LANDSCAPE',\n}\n\n/** @enumType */\nexport type PaperSizeWithLiterals = PaperSize | 'A4_PORTRAIT' | 'A4_LANDSCAPE';\n\nexport enum PageOverflow {\n CONTENT_HIDDEN = 'CONTENT_HIDDEN',\n CONTENT_BREAK = 'CONTENT_BREAK',\n}\n\n/** @enumType */\nexport type PageOverflowWithLiterals =\n | PageOverflow\n | 'CONTENT_HIDDEN'\n | 'CONTENT_BREAK';\n\nexport enum RenderFormat {\n /** content-type: application/pdf */\n PDF = 'PDF',\n /** content-type: text/html */\n HTML = 'HTML',\n}\n\n/** @enumType */\nexport type RenderFormatWithLiterals = RenderFormat | 'PDF' | 'HTML';\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RenderDocumentByIdRequest {\n /**\n * Document ID.\n * @format GUID\n */\n documentId?: string | null;\n /** Output format, defaults to PDF. */\n outputFormat?: RenderFormatWithLiterals;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface GetRendererInfoRequest {}\n\nexport interface GetRendererInfoResponse {\n /** Renderer info */\n info?: Record<string, string>;\n}\n\nexport interface GetCachedHtmlRequest {\n /**\n * Html Access Key.\n * @maxLength 100\n */\n htmlAccessKey?: string;\n /**\n * Meta Site Id.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\nexport interface GetDownloadPageRequest {\n /** @maxLength 1000 */\n file: string | null;\n}\n\nexport interface RedirectToDocumentRequest {\n /** @maxLength 1000 */\n file: string | null;\n}\n\nexport interface DocumentRenderDelayed {\n /** Document that is being rendered. */\n document?: Document;\n}\n\nexport interface CreateDocumentRequest {\n /** Document to be created */\n document?: Document;\n}\n\nexport interface CreateDocumentResponse {\n /** The created Document */\n document?: Document;\n}\n\nexport interface GetDocumentRequest {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId: string;\n /** @maxSize 1 */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n /** Include `documentContent` in the response. */\n DOCUMENT_CONTENT = 'DOCUMENT_CONTENT',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals = RequestedFields | 'DOCUMENT_CONTENT';\n\nexport interface GetDocumentResponse {\n /** The retrieved Document */\n document?: Document;\n}\n\nexport interface DeleteDocumentRequest {\n /**\n * ID of the Document to delete\n * @format GUID\n */\n documentId: string;\n}\n\nexport interface DeleteDocumentResponse {\n /** Deleted document. */\n document?: Document;\n}\n\nexport interface DeleteDocumentByExternalIdRequest {\n /**\n * External ID of the Document to delete\n * @minLength 1\n * @maxLength 100\n */\n externalId?: string;\n}\n\nexport interface DeleteDocumentByExternalIdResponse {\n /** Deleted document. */\n document?: Document;\n}\n\nexport interface QueryDocumentRequest {\n /** WQL expression */\n query: QueryV2;\n /** @maxSize 1 */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n */\n sort?: Sorting[];\n /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n fields?: string[];\n /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryDocumentResponse {\n /** The retrieved Documents */\n documents?: Document[];\n /** Query results' metadata */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateDocumentRequest {\n /**\n * Document ID.\n * @format GUID\n * @readonly\n */\n _id: string | null;\n /** Document render status. */\n renderStatus?: RenderStatusWithLiterals;\n /** Rendered document file. */\n file?: DocumentFile;\n /** Rendered document source HTML file. */\n sourceFile?: DocumentFile;\n}\n\nexport interface DocumentFile {\n /** File ID. */\n fileId?: string | null;\n /** File URL. Defined only for public documents. */\n staticUrl?: string | null;\n /** File path. */\n filePath?: string | null;\n /** Size in bytes. */\n sizeInBytes?: number | null;\n}\n\nexport interface UpdateDocumentResponse {\n /** The created Document */\n document?: Document;\n}\n\nexport interface DocumentRendered {\n /** Rendered document */\n document?: Document;\n}\n\nexport interface DocumentRenderFailed {\n /** Document that failed to render */\n document?: Document;\n}\n\nexport interface DownloadDocumentRequest {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId: string;\n /**\n * URL expiration time. Only relevant for private documents.\n * @min 600\n * @max 86400\n */\n urlExpirationInSeconds?: number | null;\n /**\n * Whether the link downloads the file or opens the file in the browser.\n * Default: `ATTACHMENT`\n */\n contentDisposition?: ContentDispositionWithLiterals;\n}\n\nexport enum ContentDisposition {\n /** The link downloads the file. */\n ATTACHMENT = 'ATTACHMENT',\n /** The link opens the file in the browser. */\n INLINE = 'INLINE',\n}\n\n/** @enumType */\nexport type ContentDispositionWithLiterals =\n | ContentDisposition\n | 'ATTACHMENT'\n | 'INLINE';\n\nexport interface DownloadDocumentResponse {\n /** Download URL. */\n downloadUrl?: string;\n /** URL expiration timestamp. Not provided for public documents because their links do not expire. */\n expirationDate?: Date | null;\n}\n\nexport interface GetDownloadUrlRequest\n extends GetDownloadUrlRequestDocumentOneOf {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId?: string | null;\n /**\n * ID of the Document to retrieve\n * @minLength 1\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Signed file token\n * @minLength 1\n * @maxLength 500\n */\n fileToken?: string | null;\n /**\n * URL expiration time. Only relevant for private documents.\n * @min 600\n * @max 86400\n */\n urlExpirationInSeconds?: number | null;\n /** @maxLength 100 */\n downloadButtonText?: string | null;\n /**\n * Whether the link downloads the file or opens the file in the browser.\n * Default: `ATTACHMENT`\n */\n contentDisposition?: ContentDispositionWithLiterals;\n}\n\n/** @oneof */\nexport interface GetDownloadUrlRequestDocumentOneOf {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId?: string | null;\n /**\n * ID of the Document to retrieve\n * @minLength 1\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Signed file token\n * @minLength 1\n * @maxLength 500\n */\n fileToken?: string | null;\n}\n\nexport interface GetDownloadUrlResponse {\n /** Download URL. */\n downloadUrl?: string | null;\n /** URL expiration timestamp. Not provided for public documents because their links do not expire. */\n expirationDate?: Date | null;\n /**\n * Document ID.\n * @format GUID\n */\n documentId?: string | null;\n /** Document render status. */\n renderStatus?: RenderStatusWithLiterals;\n /** Download URL. */\n downloadPageUrl?: string | null;\n /**\n * Client defined content checksum. Can be used for content comparison.\n * @minLength 1\n * @maxLength 64\n */\n contentChecksum?: string | null;\n}\n\nexport interface DownloadDocumentSourceRequest {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId: string;\n /**\n * Whether the link downloads the file or opens the file in the browser.\n * Default: `ATTACHMENT`\n */\n contentDisposition?: ContentDispositionWithLiterals;\n}\n\nexport interface DownloadDocumentSourceResponse {\n /** Download URL. Expires after 10 minutes. */\n downloadUrl?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type DownloadDocumentApplicationErrors = {\n code?: 'DOCUMENT_NOT_READY';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DownloadDocumentSourceApplicationErrors = {\n code?: 'DOCUMENT_NOT_READY';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface DocumentCreatedEnvelope {\n entity: Document;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Read Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.READ_LIMITED\n * @permissionScope Read Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.READ\n * @permissionScope Manage Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE\n * @permissionScope Manage Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE_LIMITED\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @webhook\n * @eventType wix.papyrus.v1.document_created\n * @serviceIdentifier wix.papyrus.v1.DocumentService\n * @slug created\n */\nexport declare function onDocumentCreated(\n handler: (event: DocumentCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DocumentDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Read Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.READ_LIMITED\n * @permissionScope Read Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.READ\n * @permissionScope Manage Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE\n * @permissionScope Manage Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE_LIMITED\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @webhook\n * @eventType wix.papyrus.v1.document_deleted\n * @serviceIdentifier wix.papyrus.v1.DocumentService\n * @slug deleted\n */\nexport declare function onDocumentDeleted(\n handler: (event: DocumentDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DocumentRenderDelayedEnvelope {\n data: DocumentRenderDelayed;\n metadata: EventMetadata;\n}\n\n/**\n * Event is sent after specific time if configured and RenderStatus is ACCEPTED/RENDERING.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Read Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.READ_LIMITED\n * @permissionScope Read Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.READ\n * @permissionScope Manage Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE\n * @permissionScope Manage Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE_LIMITED\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @webhook\n * @eventType wix.papyrus.v1.document_document_render_delayed\n * @serviceIdentifier wix.papyrus.v1.DocumentService\n * @slug document_render_delayed\n */\nexport declare function onDocumentRenderDelayed(\n handler: (event: DocumentRenderDelayedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DocumentRenderFailedEnvelope {\n data: DocumentRenderFailed;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Read Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.READ_LIMITED\n * @permissionScope Read Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.READ\n * @permissionScope Manage Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE\n * @permissionScope Manage Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE_LIMITED\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @webhook\n * @eventType wix.papyrus.v1.document_document_render_failed\n * @serviceIdentifier wix.papyrus.v1.DocumentService\n * @slug document_render_failed\n */\nexport declare function onDocumentRenderFailed(\n handler: (event: DocumentRenderFailedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DocumentRenderedEnvelope {\n data: DocumentRendered;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Read Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.READ_LIMITED\n * @permissionScope Read Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.READ\n * @permissionScope Manage Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE\n * @permissionScope Manage Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE_LIMITED\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @webhook\n * @eventType wix.papyrus.v1.document_document_rendered\n * @serviceIdentifier wix.papyrus.v1.DocumentService\n * @slug document_rendered\n */\nexport declare function onDocumentRendered(\n handler: (event: DocumentRenderedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DocumentUpdatedEnvelope {\n entity: Document;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Read Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.READ_LIMITED\n * @permissionScope Read Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.READ\n * @permissionScope Manage Intake Form\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE\n * @permissionScope Manage Intake Form (PII)\n * @permissionScopeId SCOPE.INTAKE-FORM.MANAGE_LIMITED\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @webhook\n * @eventType wix.papyrus.v1.document_updated\n * @serviceIdentifier wix.papyrus.v1.DocumentService\n * @slug updated\n */\nexport declare function onDocumentUpdated(\n handler: (event: DocumentUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Get Document.\n * @public\n * @requiredField file\n * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT\n * @fqn wix.papyrus.v1.DownloadPageController.GetDownloadPage\n */\nexport async function getDownloadPage(\n file: string | null\n): Promise<RawHttpResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ file: file });\n\n const reqOpts = ambassadorWixPapyrusV1Document.getDownloadPage(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { file: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['file']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Get Document.\n * @public\n * @requiredField file\n * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT\n * @fqn wix.papyrus.v1.DownloadPageController.RedirectToDocument\n */\nexport async function redirectToDocument(\n file: string | null\n): Promise<RawHttpResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ file: file });\n\n const reqOpts = ambassadorWixPapyrusV1Document.redirectToDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { file: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['file']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a new Document\n * @public\n * @requiredField options.document.appSlug\n * @requiredField options.document.content\n * @requiredField options.document.externalId\n * @requiredField options.document.templateType\n * @permissionId PAPYRUS.CREATE_DOCUMENT\n * @applicableIdentity APP\n * @returns The created Document\n * @fqn wix.papyrus.v1.DocumentService.CreateDocument\n */\nexport async function createDocument(\n options?: CreateDocumentOptions\n): Promise<Document> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n document: options?.document,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.createDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.document!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { document: '$[0].document' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateDocumentOptions {\n /** Document to be created */\n document?: Document;\n}\n\n/**\n * Get Document.\n * @param documentId - ID of the Document to retrieve\n * @public\n * @requiredField documentId\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @applicableIdentity APP\n * @returns The retrieved Document\n * @fqn wix.papyrus.v1.DocumentService.GetDocument\n */\nexport async function getDocument(\n documentId: string,\n options?: GetDocumentOptions\n): Promise<Document> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n documentId: documentId,\n fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.getDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.document!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { documentId: '$[0]', fields: '$[1].fields' },\n singleArgumentUnchanged: false,\n },\n ['documentId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetDocumentOptions {\n /** @maxSize 1 */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Deletes Document.\n * @param documentId - ID of the Document to delete\n * @public\n * @requiredField documentId\n * @permissionId PAPYRUS.DELETE_DOCUMENT\n * @applicableIdentity APP\n * @fqn wix.papyrus.v1.DocumentService.DeleteDocument\n */\nexport async function deleteDocument(\n documentId: string\n): Promise<DeleteDocumentResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n documentId: documentId,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.deleteDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { documentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['documentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Query Documents using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n * @public\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @applicableIdentity APP\n * @fqn wix.papyrus.v1.DocumentService.QueryDocument\n */\nexport function queryDocument(\n options?: QueryDocumentOptions\n): DocumentsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Document,\n 'CURSOR',\n QueryDocumentRequest,\n QueryDocumentResponse\n >({\n func: async (payload: QueryDocumentRequest) => {\n const reqOpts = ambassadorWixPapyrusV1Document.queryDocument({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryDocumentRequest['query']) => {\n const args = [query, options] as [\n QueryDocumentRequest['query'],\n QueryDocumentOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryDocumentResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.documents,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryDocumentOptions {\n /** @maxSize 1 */\n fields?: RequestedFieldsWithLiterals[] | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface DocumentsQueryResult extends QueryCursorResult {\n items: Document[];\n query: DocumentsQueryBuilder;\n next: () => Promise<DocumentsQueryResult>;\n prev: () => Promise<DocumentsQueryResult>;\n}\n\nexport interface DocumentsQueryBuilder {\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => DocumentsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => DocumentsQueryBuilder;\n find: () => Promise<DocumentsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.papyrus.v1.DocumentService.QueryDocument\n * @requiredField query\n */\nexport async function typedQueryDocument(\n query: DocumentQuery,\n options?: QueryDocumentOptions\n): Promise<QueryDocumentResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.queryDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DocumentQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Document,\n DocumentQuerySpec\n>;\nexport type DocumentQuery = {\n /** \n Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<Document, DocumentQuerySpec, DocumentQuery>(),\n },\n};\n\n/**\n * Updates Document. Currently supports only render_status, file_id and static_url updates.\n * @param _id - Document ID.\n * @public\n * @requiredField _id\n * @permissionId PAPYRUS.UPDATE_DOCUMENT\n * @applicableIdentity APP\n * @fqn wix.papyrus.v1.DocumentService.UpdateDocument\n */\nexport async function updateDocument(\n _id: string | null,\n options?: UpdateDocumentOptions\n): Promise<UpdateDocumentResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n renderStatus: options?.renderStatus,\n file: options?.file,\n sourceFile: options?.sourceFile,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.updateDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n renderStatus: '$[1].renderStatus',\n file: '$[1].file',\n sourceFile: '$[1].sourceFile',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateDocumentOptions {\n /** Document render status. */\n renderStatus?: RenderStatusWithLiterals;\n /** Rendered document file. */\n file?: DocumentFile;\n /** Rendered document source HTML file. */\n sourceFile?: DocumentFile;\n}\n\n/**\n * Downloads document.\n * @param documentId - ID of the Document to retrieve\n * @public\n * @requiredField documentId\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @applicableIdentity APP\n * @fqn wix.papyrus.v1.DocumentService.DownloadDocument\n */\nexport async function downloadDocument(\n documentId: string,\n options?: DownloadDocumentOptions\n): Promise<\n DownloadDocumentResponse & {\n __applicationErrorsType?: DownloadDocumentApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n documentId: documentId,\n urlExpirationInSeconds: options?.urlExpirationInSeconds,\n contentDisposition: options?.contentDisposition,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.downloadDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n documentId: '$[0]',\n urlExpirationInSeconds: '$[1].urlExpirationInSeconds',\n contentDisposition: '$[1].contentDisposition',\n },\n singleArgumentUnchanged: false,\n },\n ['documentId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DownloadDocumentOptions {\n /**\n * URL expiration time. Only relevant for private documents.\n * @min 600\n * @max 86400\n */\n urlExpirationInSeconds?: number | null;\n /**\n * Whether the link downloads the file or opens the file in the browser.\n * Default: `ATTACHMENT`\n */\n contentDisposition?: ContentDispositionWithLiterals;\n}\n\n/**\n * Resolves document download url.\n * @public\n * @requiredField options.document\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @applicableIdentity APP\n * @fqn wix.papyrus.v1.DocumentService.GetDownloadUrl\n */\nexport async function getDownloadUrl(\n options?: GetDownloadUrlOptions\n): Promise<GetDownloadUrlResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n documentId: options?.documentId,\n externalId: options?.externalId,\n fileToken: options?.fileToken,\n urlExpirationInSeconds: options?.urlExpirationInSeconds,\n downloadButtonText: options?.downloadButtonText,\n contentDisposition: options?.contentDisposition,\n });\n\n const reqOpts = ambassadorWixPapyrusV1Document.getDownloadUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n documentId: '$[0].documentId',\n externalId: '$[0].externalId',\n fileToken: '$[0].fileToken',\n urlExpirationInSeconds: '$[0].urlExpirationInSeconds',\n downloadButtonText: '$[0].downloadButtonText',\n contentDisposition: '$[0].contentDisposition',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetDownloadUrlOptions\n extends GetDownloadUrlOptionsDocumentOneOf {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId?: string | null;\n /**\n * ID of the Document to retrieve\n * @minLength 1\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Signed file token\n * @minLength 1\n * @maxLength 500\n */\n fileToken?: string | null;\n /**\n * URL expiration time. Only relevant for private documents.\n * @min 600\n * @max 86400\n */\n urlExpirationInSeconds?: number | null;\n /** @maxLength 100 */\n downloadButtonText?: string | null;\n /**\n * Whether the link downloads the file or opens the file in the browser.\n * Default: `ATTACHMENT`\n */\n contentDisposition?: ContentDispositionWithLiterals;\n}\n\n/** @oneof */\nexport interface GetDownloadUrlOptionsDocumentOneOf {\n /**\n * ID of the Document to retrieve\n * @format GUID\n */\n documentId?: string | null;\n /**\n * ID of the Document to retrieve\n * @minLength 1\n * @maxLength 100\n */\n externalId?: string | null;\n /**\n * Signed file token\n * @minLength 1\n * @maxLength 500\n */\n fileToken?: string | null;\n}\n\n/**\n * Downloads document.\n * @param documentId - ID of the Document to retrieve\n * @public\n * @requiredField documentId\n * @permissionId PAPYRUS.READ_DOCUMENT\n * @applicableIdentity APP\n * @fqn wix.papyrus.v1.DocumentService.DownloadDocumentSource\n */\nexport async function downloadDocumentSource(\n documentId: string,\n options?: DownloadDocumentSourceOptions\n): Promise<\n DownloadDocumentSourceResponse & {\n __applicationErrorsType?: DownloadDocumentSourceApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n documentId: documentId,\n contentDisposition: options?.contentDisposition,\n });\n\n const reqOpts =\n ambassadorWixPapyrusV1Document.downloadDocumentSource(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n documentId: '$[0]',\n contentDisposition: '$[1].contentDisposition',\n },\n singleArgumentUnchanged: false,\n },\n ['documentId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DownloadDocumentSourceOptions {\n /**\n * Whether the link downloads the file or opens the file in the browser.\n * Default: `ATTACHMENT`\n */\n contentDisposition?: ContentDispositionWithLiterals;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPapyrusV1DocumentServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._base_domain_': [\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/papyrus-document/v1/documents',\n destPath: '/v1/documents',\n },\n ],\n 'papyrus.wixapps.net': [\n {\n srcPath: '/download',\n destPath: '/download',\n },\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n {\n srcPath: '/view',\n destPath: '/view',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixPapyrusV1DownloadPageControllerUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._base_domain_': [\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/papyrus-document/v1/documents',\n destPath: '/v1/documents',\n },\n ],\n 'papyrus.wixapps.net': [\n {\n srcPath: '/download',\n destPath: '/download',\n },\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n {\n srcPath: '/view',\n destPath: '/view',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/papyrus-document',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_papyrus_documents';\n\n/** Get Document. */\nexport function getDownloadPage(payload: object): RequestOptionsFactory<any> {\n function __getDownloadPage({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'GET' as any,\n methodFqn: 'wix.papyrus.v1.DownloadPageController.GetDownloadPage',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DownloadPageControllerUrl({\n protoPath: '/download',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDownloadPage;\n}\n\n/** Get Document. */\nexport function redirectToDocument(\n payload: object\n): RequestOptionsFactory<any> {\n function __redirectToDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'GET' as any,\n methodFqn: 'wix.papyrus.v1.DownloadPageController.RedirectToDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DownloadPageControllerUrl({\n protoPath: '/view',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redirectToDocument;\n}\n\n/** Creates a new Document */\nexport function createDocument(payload: object): RequestOptionsFactory<any> {\n function __createDocument({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'document.createdDate' },\n { path: 'document.updatedDate' },\n { path: 'document.expirationDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'POST' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.CreateDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'document.createdDate' },\n { path: 'document.updatedDate' },\n { path: 'document.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDocument;\n}\n\n/** Get Document. */\nexport function getDocument(payload: object): RequestOptionsFactory<any> {\n function __getDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'GET' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.GetDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/{documentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'document.createdDate' },\n { path: 'document.updatedDate' },\n { path: 'document.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDocument;\n}\n\n/** Deletes Document. */\nexport function deleteDocument(payload: object): RequestOptionsFactory<any> {\n function __deleteDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'DELETE' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.DeleteDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/{documentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'document.createdDate' },\n { path: 'document.updatedDate' },\n { path: 'document.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteDocument;\n}\n\n/** Query Documents using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) */\nexport function queryDocument(payload: object): RequestOptionsFactory<any> {\n function __queryDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'POST' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.QueryDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'documents.createdDate' },\n { path: 'documents.updatedDate' },\n { path: 'documents.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryDocument;\n}\n\n/** Updates Document. Currently supports only render_status, file_id and static_url updates. */\nexport function updateDocument(payload: object): RequestOptionsFactory<any> {\n function __updateDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'PATCH' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.UpdateDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/{id}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'document.createdDate' },\n { path: 'document.updatedDate' },\n { path: 'document.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateDocument;\n}\n\n/** Downloads document. */\nexport function downloadDocument(payload: object): RequestOptionsFactory<any> {\n function __downloadDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'GET' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.DownloadDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/download/{documentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'expirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __downloadDocument;\n}\n\n/** Resolves document download url. */\nexport function getDownloadUrl(payload: object): RequestOptionsFactory<any> {\n function __getDownloadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'GET' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.GetDownloadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/download-url',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'expirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDownloadUrl;\n}\n\n/** Downloads document. */\nexport function downloadDocumentSource(\n payload: object\n): RequestOptionsFactory<any> {\n function __downloadDocumentSource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.papyrus.v1.document',\n method: 'GET' as any,\n methodFqn: 'wix.papyrus.v1.DocumentService.DownloadDocumentSource',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPapyrusV1DocumentServiceUrl({\n protoPath: '/v1/documents/download/{documentId}/source',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __downloadDocumentSource;\n}\n","import {\n getDownloadPage as publicGetDownloadPage,\n redirectToDocument as publicRedirectToDocument,\n createDocument as publicCreateDocument,\n getDocument as publicGetDocument,\n deleteDocument as publicDeleteDocument,\n queryDocument as publicQueryDocument,\n typedQueryDocument as publicTypedQueryDocument,\n updateDocument as publicUpdateDocument,\n downloadDocument as publicDownloadDocument,\n getDownloadUrl as publicGetDownloadUrl,\n downloadDocumentSource as publicDownloadDocumentSource,\n} from './papyrus-v1-document-documents.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n DocumentQuery,\n DocumentsQueryBuilder,\n QueryDocumentOptions,\n typedQueryDocument as universalTypedQueryDocument,\n} from './papyrus-v1-document-documents.universal.js';\nimport { onDocumentCreated as publicOnDocumentCreated } from './papyrus-v1-document-documents.public.js';\nimport { onDocumentDeleted as publicOnDocumentDeleted } from './papyrus-v1-document-documents.public.js';\nimport { onDocumentRenderDelayed as publicOnDocumentRenderDelayed } from './papyrus-v1-document-documents.public.js';\nimport { onDocumentRenderFailed as publicOnDocumentRenderFailed } from './papyrus-v1-document-documents.public.js';\nimport { onDocumentRendered as publicOnDocumentRendered } from './papyrus-v1-document-documents.public.js';\nimport { onDocumentUpdated as publicOnDocumentUpdated } from './papyrus-v1-document-documents.public.js';\n\nfunction customQueryDocument(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryDocumentOptions) =>\n publicQueryDocument(httpClient)(options),\n typedQueryFunction: (\n query: DocumentQuery,\n options?: QueryDocumentOptions\n ) => publicTypedQueryDocument(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: DocumentQuery,\n options?: QueryDocumentOptions\n ): ReturnType<typeof universalTypedQueryDocument>;\n function overloadedQuery(\n options?: QueryDocumentOptions\n ): DocumentsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: DocumentQuery | QueryDocumentOptions,\n options?: QueryDocumentOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const getDownloadPage: MaybeContext<\n BuildRESTFunction<typeof publicGetDownloadPage> & typeof publicGetDownloadPage\n> = /*#__PURE__*/ createRESTModule(publicGetDownloadPage);\nexport const redirectToDocument: MaybeContext<\n BuildRESTFunction<typeof publicRedirectToDocument> &\n typeof publicRedirectToDocument\n> = /*#__PURE__*/ createRESTModule(publicRedirectToDocument);\nexport const createDocument: MaybeContext<\n BuildRESTFunction<typeof publicCreateDocument> & typeof publicCreateDocument\n> = /*#__PURE__*/ createRESTModule(publicCreateDocument);\nexport const getDocument: MaybeContext<\n BuildRESTFunction<typeof publicGetDocument> & typeof publicGetDocument\n> = /*#__PURE__*/ createRESTModule(publicGetDocument);\nexport const deleteDocument: MaybeContext<\n BuildRESTFunction<typeof publicDeleteDocument> & typeof publicDeleteDocument\n> = /*#__PURE__*/ createRESTModule(publicDeleteDocument);\nexport const updateDocument: MaybeContext<\n BuildRESTFunction<typeof publicUpdateDocument> & typeof publicUpdateDocument\n> = /*#__PURE__*/ createRESTModule(publicUpdateDocument);\nexport const downloadDocument: MaybeContext<\n BuildRESTFunction<typeof publicDownloadDocument> &\n typeof publicDownloadDocument\n> = /*#__PURE__*/ createRESTModule(publicDownloadDocument);\nexport const getDownloadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGetDownloadUrl> & typeof publicGetDownloadUrl\n> = /*#__PURE__*/ createRESTModule(publicGetDownloadUrl);\nexport const downloadDocumentSource: MaybeContext<\n BuildRESTFunction<typeof publicDownloadDocumentSource> &\n typeof publicDownloadDocumentSource\n> = /*#__PURE__*/ createRESTModule(publicDownloadDocumentSource);\nexport const queryDocument: MaybeContext<\n BuildRESTFunction<typeof customQueryDocument> & typeof customQueryDocument\n> = /*#__PURE__*/ createRESTModule(customQueryDocument);\n/** */\nexport const onDocumentCreated: BuildEventDefinition<\n typeof publicOnDocumentCreated\n> &\n typeof publicOnDocumentCreated = createEventModule(publicOnDocumentCreated);\n/** */\nexport const onDocumentDeleted: BuildEventDefinition<\n typeof publicOnDocumentDeleted\n> &\n typeof publicOnDocumentDeleted = createEventModule(publicOnDocumentDeleted);\n/**\n * Event is sent after specific time if configured and RenderStatus is ACCEPTED/RENDERING.\n */\nexport const onDocumentRenderDelayed: BuildEventDefinition<\n typeof publicOnDocumentRenderDelayed\n> &\n typeof publicOnDocumentRenderDelayed = createEventModule(\n publicOnDocumentRenderDelayed\n);\n/** */\nexport const onDocumentRenderFailed: BuildEventDefinition<\n typeof publicOnDocumentRenderFailed\n> &\n typeof publicOnDocumentRenderFailed = createEventModule(\n publicOnDocumentRenderFailed\n);\n/** */\nexport const onDocumentRendered: BuildEventDefinition<\n typeof publicOnDocumentRendered\n> &\n typeof publicOnDocumentRendered = createEventModule(publicOnDocumentRendered);\n/** */\nexport const onDocumentUpdated: BuildEventDefinition<\n typeof publicOnDocumentUpdated\n> &\n typeof publicOnDocumentUpdated = createEventModule(publicOnDocumentUpdated);\n\nexport {\n RenderStatus,\n Format,\n WixMpClientVersion,\n ResizeOption,\n PaperSize,\n PageOverflow,\n RenderFormat,\n RequestedFields,\n SortOrder,\n ContentDisposition,\n WebhookIdentityType,\n} from './papyrus-v1-document-documents.universal.js';\nexport {\n Document,\n DocumentContent,\n TemplateSettingsOverride,\n PageSettings,\n RenderDelayedEventConfig,\n DebugOptions,\n RenderDocumentRequest,\n TemplateSettings,\n TextSetting,\n TextContent,\n ImageSetting,\n FocalPoint,\n SelectSetting,\n BackgroundSetting,\n SettingsGroup,\n RawHttpResponse,\n HeadersEntry,\n RenderDocumentByIdRequest,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n GetRendererInfoRequest,\n GetRendererInfoResponse,\n GetCachedHtmlRequest,\n GetDownloadPageRequest,\n RedirectToDocumentRequest,\n DocumentRenderDelayed,\n CreateDocumentRequest,\n CreateDocumentResponse,\n GetDocumentRequest,\n GetDocumentResponse,\n DeleteDocumentRequest,\n DeleteDocumentResponse,\n DeleteDocumentByExternalIdRequest,\n DeleteDocumentByExternalIdResponse,\n QueryDocumentRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n Paging,\n CursorPaging,\n QueryDocumentResponse,\n PagingMetadataV2,\n Cursors,\n UpdateDocumentRequest,\n DocumentFile,\n UpdateDocumentResponse,\n DocumentRendered,\n DocumentRenderFailed,\n DownloadDocumentRequest,\n DownloadDocumentResponse,\n GetDownloadUrlRequest,\n GetDownloadUrlRequestDocumentOneOf,\n GetDownloadUrlResponse,\n DownloadDocumentSourceRequest,\n DownloadDocumentSourceResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n DocumentCreatedEnvelope,\n DocumentDeletedEnvelope,\n DocumentRenderDelayedEnvelope,\n DocumentRenderFailedEnvelope,\n DocumentRenderedEnvelope,\n DocumentUpdatedEnvelope,\n CreateDocumentOptions,\n GetDocumentOptions,\n QueryDocumentOptions,\n DocumentsQueryResult,\n DocumentsQueryBuilder,\n DocumentQuerySpec,\n UpdateDocumentOptions,\n DownloadDocumentOptions,\n GetDownloadUrlOptions,\n GetDownloadUrlOptionsDocumentOneOf,\n DownloadDocumentSourceOptions,\n} from './papyrus-v1-document-documents.universal.js';\nexport { utils } from './papyrus-v1-document-documents.universal.js';\nexport {\n RenderStatusWithLiterals,\n FormatWithLiterals,\n WixMpClientVersionWithLiterals,\n ResizeOptionWithLiterals,\n PaperSizeWithLiterals,\n PageOverflowWithLiterals,\n RenderFormatWithLiterals,\n RequestedFieldsWithLiterals,\n SortOrderWithLiterals,\n ContentDispositionWithLiterals,\n WebhookIdentityTypeWithLiterals,\n DownloadDocumentApplicationErrors,\n DownloadDocumentSourceApplicationErrors,\n CommonQueryWithEntityContext,\n DocumentQuery,\n} from './papyrus-v1-document-documents.universal.js';\n"],"mappings":";;;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getDocument","getDownloadPage","getDownloadUrl","onDocumentCreated","onDocumentDeleted","onDocumentRenderDelayed","onDocumentRenderFailed","onDocumentRendered","onDocumentUpdated","queryDocument","redirectToDocument","updateDocument","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","RenderStatus","Format","WixMpClientVersion","ResizeOption","PaperSize","PageOverflow","RenderFormat","RequestedFields","SortOrder","ContentDisposition","WebhookIdentityType","getDownloadPage","sdkTransformError","redirectToDocument","createDocument","getDocument","deleteDocument","queryDocument","updateDocument","downloadDocument","getDownloadUrl","downloadDocumentSource","getDownloadPage","redirectToDocument","createDocument","getDocument","deleteDocument","queryDocument","typedQueryDocument","updateDocument","downloadDocument","getDownloadUrl","downloadDocumentSource","import_rest_modules","queryDocument","typedQueryDocument","getDownloadPage","redirectToDocument","createDocument","getDocument","deleteDocument","updateDocument","downloadDocument","getDownloadUrl","downloadDocumentSource","onDocumentCreated","onDocumentDeleted","onDocumentRenderDelayed","onDocumentRenderFailed","onDocumentRendered","onDocumentUpdated"]}