/** * SmartyMeet Dev03 API REST * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.1 * Contact: developer@smartymeet.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { CreateDocumentRequestBody, DocumentSchema, DocumentsSchema, GuestDocumentActionSchema, GuestDocumentSchema, SubmitGuestDocumentRequestBody, UpdateDocumentRequestBody } from '../models/index'; export interface CreateDocumentRequest { createDocumentRequestBody: CreateDocumentRequestBody; } export interface DeleteDocumentRequest { documentId: string; } export interface DocumentOptionsRequest { documentId: string; } export interface GuestDocumentOptionsRequest { documentId: string; } export interface ListDocumentsRequest { filterStatus?: ListDocumentsFilterStatusEnum; filterCandidateId?: string; filterCreatedFrom?: Date; filterCreatedTo?: Date; filterModifiedFrom?: Date; filterModifiedTo?: Date; pageSize?: number; pageNumber?: number; pageAfter?: string; pageBefore?: string; } export interface ShowDocumentRequest { documentId: string; } export interface ShowGuestDocumentRequest { documentId: string; tenantId: string; token: string; process?: ShowGuestDocumentProcessEnum; } export interface SubmitGuestDocumentRequest { documentId: string; submitGuestDocumentRequestBody: SubmitGuestDocumentRequestBody; } export interface UpdateDocumentRequest { documentId: string; updateDocumentRequestBody: UpdateDocumentRequestBody; } /** * */ export declare class DocumentsApi extends runtime.BaseAPI { /** * Creates request options for createDocument without sending the request */ createDocumentRequestOpts(requestParameters: CreateDocumentRequest): Promise; /** * Creates a document DRAFT. There is no create-and-send shortcut - sending happens via `PATCH status=pending`, which validates the content, assigns the human `reference`, mints per-participant access tokens, stamps `contentHash` and LOCKS the content. `documentType` is required; `process` derives from it when absent (employment_offer -> offer; employment_contract/b2b_contract/nda -> contract; policy/consent -> document). `body` is the typed block tree, `fields` the registry the body references by id, `participants` the recipient list (ids are server-assigned). * Create Document */ createDocumentRaw(requestParameters: CreateDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates a document DRAFT. There is no create-and-send shortcut - sending happens via `PATCH status=pending`, which validates the content, assigns the human `reference`, mints per-participant access tokens, stamps `contentHash` and LOCKS the content. `documentType` is required; `process` derives from it when absent (employment_offer -> offer; employment_contract/b2b_contract/nda -> contract; policy/consent -> document). `body` is the typed block tree, `fields` the registry the body references by id, `participants` the recipient list (ids are server-assigned). * Create Document */ createDocument(requestParameters: CreateDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for deleteDocument without sending the request */ deleteDocumentRequestOpts(requestParameters: DeleteDocumentRequest): Promise; /** * Deletes a DRAFT. A sent document is an evidence artifact - it only accepts `PATCH status=withdrawn` and cannot be deleted. * Delete Document */ deleteDocumentRaw(requestParameters: DeleteDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Deletes a DRAFT. A sent document is an evidence artifact - it only accepts `PATCH status=withdrawn` and cannot be deleted. * Delete Document */ deleteDocument(requestParameters: DeleteDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for documentOptions without sending the request */ documentOptionsRequestOpts(requestParameters: DocumentOptionsRequest): Promise; /** * Enable CORS by returning correct headers * Document Options */ documentOptionsRaw(requestParameters: DocumentOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Document Options */ documentOptions(requestParameters: DocumentOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for documentsOptions without sending the request */ documentsOptionsRequestOpts(): Promise; /** * Enable CORS by returning correct headers * Documents Options */ documentsOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Documents Options */ documentsOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for guestDocumentOptions without sending the request */ guestDocumentOptionsRequestOpts(requestParameters: GuestDocumentOptionsRequest): Promise; /** * Enable CORS by returning correct headers * Guest Document Options */ guestDocumentOptionsRaw(requestParameters: GuestDocumentOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Guest Document Options */ guestDocumentOptions(requestParameters: GuestDocumentOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for listDocuments without sending the request */ listDocumentsRequestOpts(requestParameters: ListDocumentsRequest): Promise; /** * Returns a collection of documents for the caller\'s tenant. Use one filter at a time (one GSI per query): - `filterStatus=pending` - sent, awaiting the recipient - `filterCandidateId=` - documents for one candidate * List Documents */ listDocumentsRaw(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a collection of documents for the caller\'s tenant. Use one filter at a time (one GSI per query): - `filterStatus=pending` - sent, awaiting the recipient - `filterCandidateId=` - documents for one candidate * List Documents */ listDocuments(requestParameters?: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for showDocument without sending the request */ showDocumentRequestOpts(requestParameters: ShowDocumentRequest): Promise; /** * Returns a single document, including the block tree, field registry, participants (without their access tokens), the activity/evidence trail and `contentHash` once sent. * Show Document */ showDocumentRaw(requestParameters: ShowDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a single document, including the block tree, field registry, participants (without their access tokens), the activity/evidence trail and `contentHash` once sent. * Show Document */ showDocument(requestParameters: ShowDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for showGuestDocument without sending the request */ showGuestDocumentRequestOpts(requestParameters: ShowGuestDocumentRequest): Promise; /** * Recipient opens the sign link from the email. There is no authorizer on this path: auth is `tenantId` + `token` (per-participant, minted at send) from the link query string, never a session. The token resolves the VIEWER server-side. `process` from the link path must match the row - a mismatch is treated exactly like a bad token. Returns EVERYTHING the screen needs in one resource (the page holds a credential and must not fan out): process, documentType, effective status, title, reference, languageCode, organization, timestamps, the block-tree body, the field registry, availableActions (computed server-side from the backend\'s documentType matrix), sanitized participants and activity, comments (always [] in v1) and the resolved viewer. No meta, no candidateId/jobId, no contentHash, no relationships. Every auth failure (unknown tenant, unknown or draft document, wrong token, wrong process) collapses to the same 404 - existence is never leaked. * Show Guest Document */ showGuestDocumentRaw(requestParameters: ShowGuestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Recipient opens the sign link from the email. There is no authorizer on this path: auth is `tenantId` + `token` (per-participant, minted at send) from the link query string, never a session. The token resolves the VIEWER server-side. `process` from the link path must match the row - a mismatch is treated exactly like a bad token. Returns EVERYTHING the screen needs in one resource (the page holds a credential and must not fan out): process, documentType, effective status, title, reference, languageCode, organization, timestamps, the block-tree body, the field registry, availableActions (computed server-side from the backend\'s documentType matrix), sanitized participants and activity, comments (always [] in v1) and the resolved viewer. No meta, no candidateId/jobId, no contentHash, no relationships. Every auth failure (unknown tenant, unknown or draft document, wrong token, wrong process) collapses to the same 404 - existence is never leaked. * Show Guest Document */ showGuestDocument(requestParameters: ShowGuestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for submitGuestDocument without sending the request */ submitGuestDocumentRequestOpts(requestParameters: SubmitGuestDocumentRequest): Promise; /** * Recipient acts on the document. Auth is `meta.tenantId` + `meta.accessToken` from the emailed link, never a session. `attributes.action` is `VIEW` (explicit, idempotent mark-as-opened - fire-and-forget after first render; never appears in availableActions), `ACCEPT` or `DECLINE`. `attributes.confirmations` must include every assertion the action requires. Returns the DELTA the FE applies to its state: `{outcome, status, participant, activity[]}` - never invent entries client-side. Error contract (frozen): 409 = the document settled between GET and PATCH (already acted / expired / withdrawn) - go to the terminal screen; 400 = payload problem (unknown action, missing confirmations) - stay on the form; 404 = auth, identical to GET. ACCEPT/DECLINE are single-use - a racing second write gets 409, never an overwrite. * Submit Guest Document */ submitGuestDocumentRaw(requestParameters: SubmitGuestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Recipient acts on the document. Auth is `meta.tenantId` + `meta.accessToken` from the emailed link, never a session. `attributes.action` is `VIEW` (explicit, idempotent mark-as-opened - fire-and-forget after first render; never appears in availableActions), `ACCEPT` or `DECLINE`. `attributes.confirmations` must include every assertion the action requires. Returns the DELTA the FE applies to its state: `{outcome, status, participant, activity[]}` - never invent entries client-side. Error contract (frozen): 409 = the document settled between GET and PATCH (already acted / expired / withdrawn) - go to the terminal screen; 400 = payload problem (unknown action, missing confirmations) - stay on the form; 404 = auth, identical to GET. ACCEPT/DECLINE are single-use - a racing second write gets 409, never an overwrite. * Submit Guest Document */ submitGuestDocument(requestParameters: SubmitGuestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for updateDocument without sending the request */ updateDocumentRequestOpts(requestParameters: UpdateDocumentRequest): Promise; /** * Draft edits and the two lifecycle doors. - While `draft`: title, body, fields, participants, expiry and relationships are editable. - `status: pending` is the SEND door: send-validation (title, well- formed blocks, required fields filled, exactly one counterparty signer with an email), the `reference` is assigned, per-participant tokens are minted, `contentHash` is stamped, the content LOCKS and `service:document:sent` fires (the Send Document Link workflow emails the guest link). - `status: withdrawn` is the only write a sent document accepts. * Update Document */ updateDocumentRaw(requestParameters: UpdateDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Draft edits and the two lifecycle doors. - While `draft`: title, body, fields, participants, expiry and relationships are editable. - `status: pending` is the SEND door: send-validation (title, well- formed blocks, required fields filled, exactly one counterparty signer with an email), the `reference` is assigned, per-participant tokens are minted, `contentHash` is stamped, the content LOCKS and `service:document:sent` fires (the Send Document Link workflow emails the guest link). - `status: withdrawn` is the only write a sent document accepts. * Update Document */ updateDocument(requestParameters: UpdateDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * @export */ export declare const ListDocumentsFilterStatusEnum: { readonly Draft: "draft"; readonly Pending: "pending"; readonly Completed: "completed"; readonly Declined: "declined"; readonly Expired: "expired"; readonly Withdrawn: "withdrawn"; }; export type ListDocumentsFilterStatusEnum = typeof ListDocumentsFilterStatusEnum[keyof typeof ListDocumentsFilterStatusEnum]; /** * @export */ export declare const ShowGuestDocumentProcessEnum: { readonly Offer: "offer"; readonly Contract: "contract"; readonly Document: "document"; }; export type ShowGuestDocumentProcessEnum = typeof ShowGuestDocumentProcessEnum[keyof typeof ShowGuestDocumentProcessEnum]; //# sourceMappingURL=DocumentsApi.d.ts.map