docspring-ts 3.2.0 → 4.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.
- package/AGENTS.md +80 -20
- package/README.md +71 -60
- package/dist/RequestSchemas.d.ts +1 -0
- package/dist/RequestSchemas.js +3191 -0
- package/dist/RequestSchemas.js.map +1 -0
- package/dist/RequestValidator.d.ts +14 -0
- package/dist/RequestValidator.js +438 -0
- package/dist/RequestValidator.js.map +1 -0
- package/dist/apis/Client.d.ts +123 -118
- package/dist/apis/Client.js +1771 -1096
- package/dist/apis/Client.js.map +1 -1
- package/dist/apis/baseapi.js +1 -0
- package/dist/apis/baseapi.js.map +1 -1
- package/dist/apis/exception.js +1 -0
- package/dist/apis/exception.js.map +1 -1
- package/dist/auth/auth.js +2 -2
- package/dist/auth/auth.js.map +1 -1
- package/dist/configuration.d.ts +2 -0
- package/dist/configuration.js +7 -5
- package/dist/configuration.js.map +1 -1
- package/dist/http/http.js +11 -5
- package/dist/http/http.js.map +1 -1
- package/dist/http/isomorphic-fetch.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/models/AiFieldNamingLanguage.d.ts +6 -0
- package/dist/models/AiFieldNamingLanguage.js +9 -0
- package/dist/models/AiFieldNamingLanguage.js.map +1 -0
- package/dist/models/{AddFieldsData.d.ts → AuthenticationCheck.d.ts} +2 -2
- package/dist/models/AuthenticationCheck.js +23 -0
- package/dist/models/AuthenticationCheck.js.map +1 -0
- package/dist/models/BarcodeSymbology.d.ts +11 -0
- package/dist/models/BarcodeSymbology.js +14 -0
- package/dist/models/BarcodeSymbology.js.map +1 -0
- package/dist/models/CheckCharacter.d.ts +8 -0
- package/dist/models/CheckCharacter.js +11 -0
- package/dist/models/CheckCharacter.js.map +1 -0
- package/dist/models/CombinedFieldType.d.ts +5 -0
- package/dist/models/CombinedFieldType.js +8 -0
- package/dist/models/CombinedFieldType.js.map +1 -0
- package/dist/models/CombinedPdf.d.ts +39 -0
- package/dist/models/CombinedPdf.js +101 -0
- package/dist/models/CombinedPdf.js.map +1 -0
- package/dist/models/CombinedPdfFiles.d.ts +21 -0
- package/dist/models/CombinedPdfFiles.js +23 -0
- package/dist/models/CombinedPdfFiles.js.map +1 -0
- package/dist/models/CombinedPdfList.d.ts +22 -0
- package/dist/models/CombinedPdfList.js +29 -0
- package/dist/models/CombinedPdfList.js.map +1 -0
- package/dist/models/CombinedPdfSource.d.ts +25 -0
- package/dist/models/CombinedPdfSource.js +47 -0
- package/dist/models/CombinedPdfSource.js.map +1 -0
- package/dist/models/CombinedPdfSourceInput.d.ts +12 -0
- package/dist/models/CombinedPdfSourceInput.js +18 -0
- package/dist/models/CombinedPdfSourceInput.js.map +1 -0
- package/dist/models/CombinedPdfSourcePdf.d.ts +21 -0
- package/dist/models/CombinedPdfSourcePdf.js +29 -0
- package/dist/models/CombinedPdfSourcePdf.js.map +1 -0
- package/dist/models/CombinedPdfSourceType.d.ts +8 -0
- package/dist/models/CombinedPdfSourceType.js +11 -0
- package/dist/models/CombinedPdfSourceType.js.map +1 -0
- package/dist/models/CombinedPdfState.d.ts +8 -0
- package/dist/models/CombinedPdfState.js +11 -0
- package/dist/models/CombinedPdfState.js.map +1 -0
- package/dist/models/{CopyTemplateOptions.d.ts → CopyTemplateRequest.d.ts} +2 -2
- package/dist/models/{CopyTemplateOptions.js → CopyTemplateRequest.js} +11 -11
- package/dist/models/CopyTemplateRequest.js.map +1 -0
- package/dist/models/{CombinePdfsData.d.ts → CreateCombinedPdfRequest.d.ts} +7 -5
- package/dist/models/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +21 -27
- package/dist/models/CreateCombinedPdfRequest.js.map +1 -0
- package/dist/models/{CreateCustomFileData.d.ts → CreateCustomFileFromUploadRequest.d.ts} +1 -1
- package/dist/models/CreateCustomFileFromUploadRequest.js +23 -0
- package/dist/models/CreateCustomFileFromUploadRequest.js.map +1 -0
- package/dist/models/{MoveFolderData.d.ts → CreateFolderRequest.d.ts} +2 -1
- package/dist/models/CreateFolderRequest.js +29 -0
- package/dist/models/CreateFolderRequest.js.map +1 -0
- package/dist/models/CreateSignatureRequestEventRequest.d.ts +25 -0
- package/dist/models/CreateSignatureRequestEventRequest.js +41 -0
- package/dist/models/CreateSignatureRequestEventRequest.js.map +1 -0
- package/dist/models/CreateSignatureRequestTokenRequest.d.ts +21 -0
- package/dist/models/CreateSignatureRequestTokenRequest.js +23 -0
- package/dist/models/CreateSignatureRequestTokenRequest.js.map +1 -0
- package/dist/models/{SubmissionBatchData.d.ts → CreateSubmissionBatchRequest.d.ts} +8 -5
- package/dist/models/{SubmissionBatchData.js → CreateSubmissionBatchRequest.js} +18 -18
- package/dist/models/CreateSubmissionBatchRequest.js.map +1 -0
- package/dist/models/CreateSubmissionRequest.d.ts +37 -0
- package/dist/models/{CreatePdfSubmissionData.js → CreateSubmissionRequest.js} +39 -33
- package/dist/models/CreateSubmissionRequest.js.map +1 -0
- package/dist/models/CreateTemplateRequest.d.ts +68 -0
- package/dist/models/CreateTemplateRequest.js +251 -0
- package/dist/models/CreateTemplateRequest.js.map +1 -0
- package/dist/models/CreateWebhookRequest.d.ts +34 -0
- package/dist/models/CreateWebhookRequest.js +83 -0
- package/dist/models/CreateWebhookRequest.js.map +1 -0
- package/dist/models/CustomFile.d.ts +6 -2
- package/dist/models/CustomFile.js +26 -2
- package/dist/models/CustomFile.js.map +1 -1
- package/dist/models/CustomFileList.d.ts +22 -0
- package/dist/models/CustomFileList.js +29 -0
- package/dist/models/CustomFileList.js.map +1 -0
- package/dist/models/CustomFileSourcePdf.d.ts +21 -0
- package/dist/models/CustomFileSourcePdf.js +29 -0
- package/dist/models/CustomFileSourcePdf.js.map +1 -0
- package/dist/models/ErrorCode.d.ts +24 -0
- package/dist/models/ErrorCode.js +27 -0
- package/dist/models/ErrorCode.js.map +1 -0
- package/dist/models/ErrorDetail.d.ts +24 -0
- package/dist/models/ErrorDetail.js +47 -0
- package/dist/models/ErrorDetail.js.map +1 -0
- package/dist/models/ErrorInfo.d.ts +29 -0
- package/dist/models/ErrorInfo.js +65 -0
- package/dist/models/ErrorInfo.js.map +1 -0
- package/dist/models/ErrorResponse.d.ts +2 -5
- package/dist/models/ErrorResponse.js +2 -12
- package/dist/models/ErrorResponse.js.map +1 -1
- package/dist/models/ExpirationInterval.d.ts +6 -0
- package/dist/models/ExpirationInterval.js +9 -0
- package/dist/models/ExpirationInterval.js.map +1 -0
- package/dist/models/FieldComparisonCondition.d.ts +23 -0
- package/dist/models/FieldComparisonCondition.js +35 -0
- package/dist/models/FieldComparisonCondition.js.map +1 -0
- package/dist/models/FieldComparisonOperator.d.ts +7 -0
- package/dist/models/FieldComparisonOperator.js +10 -0
- package/dist/models/FieldComparisonOperator.js.map +1 -0
- package/dist/models/FieldDisplayType.d.ts +9 -0
- package/dist/models/FieldDisplayType.js +12 -0
- package/dist/models/FieldDisplayType.js.map +1 -0
- package/dist/models/FieldEqualsCondition.d.ts +23 -0
- package/dist/models/FieldEqualsCondition.js +35 -0
- package/dist/models/FieldEqualsCondition.js.map +1 -0
- package/dist/models/FieldEqualsOperator.d.ts +5 -0
- package/dist/models/FieldEqualsOperator.js +8 -0
- package/dist/models/FieldEqualsOperator.js.map +1 -0
- package/dist/models/FieldInCondition.d.ts +22 -0
- package/dist/models/FieldInCondition.js +35 -0
- package/dist/models/FieldInCondition.js.map +1 -0
- package/dist/models/FieldOverride.d.ts +95 -0
- package/dist/models/FieldOverride.js +395 -0
- package/dist/models/FieldOverride.js.map +1 -0
- package/dist/models/FieldPresenceCondition.d.ts +22 -0
- package/dist/models/FieldPresenceCondition.js +29 -0
- package/dist/models/FieldPresenceCondition.js.map +1 -0
- package/dist/models/FieldPresenceOperator.d.ts +5 -0
- package/dist/models/FieldPresenceOperator.js +8 -0
- package/dist/models/FieldPresenceOperator.js.map +1 -0
- package/dist/models/FieldRangeCondition.d.ts +23 -0
- package/dist/models/FieldRangeCondition.js +41 -0
- package/dist/models/FieldRangeCondition.js.map +1 -0
- package/dist/models/FieldReimportState.d.ts +7 -0
- package/dist/models/FieldReimportState.js +10 -0
- package/dist/models/FieldReimportState.js.map +1 -0
- package/dist/models/FieldSetupLogic.d.ts +5 -0
- package/dist/models/FieldSetupLogic.js +8 -0
- package/dist/models/FieldSetupLogic.js.map +1 -0
- package/dist/models/FieldSetupNaming.d.ts +5 -0
- package/dist/models/FieldSetupNaming.js +8 -0
- package/dist/models/FieldSetupNaming.js.map +1 -0
- package/dist/models/FieldSetupSource.d.ts +6 -0
- package/dist/models/FieldSetupSource.js +9 -0
- package/dist/models/FieldSetupSource.js.map +1 -0
- package/dist/models/Folder.d.ts +5 -3
- package/dist/models/Folder.js +12 -0
- package/dist/models/Folder.js.map +1 -1
- package/dist/models/FolderList.d.ts +22 -0
- package/dist/models/FolderList.js +29 -0
- package/dist/models/FolderList.js.map +1 -0
- package/dist/models/{CreateCombinedSubmissionResponse.d.ts → GeneratedFile.d.ts} +10 -9
- package/dist/models/GeneratedFile.js +65 -0
- package/dist/models/GeneratedFile.js.map +1 -0
- package/dist/models/GeneratedFileState.d.ts +6 -0
- package/dist/models/GeneratedFileState.js +9 -0
- package/dist/models/GeneratedFileState.js.map +1 -0
- package/dist/models/HtmlEngineOptions.d.ts +30 -0
- package/dist/models/HtmlEngineOptions.js +77 -0
- package/dist/models/HtmlEngineOptions.js.map +1 -0
- package/dist/models/HtmlEngineOptionsInput.d.ts +30 -0
- package/dist/models/HtmlEngineOptionsInput.js +77 -0
- package/dist/models/HtmlEngineOptionsInput.js.map +1 -0
- package/dist/models/ImageGravity.d.ts +12 -0
- package/dist/models/ImageGravity.js +15 -0
- package/dist/models/ImageGravity.js.map +1 -0
- package/dist/models/ImageScaleType.d.ts +6 -0
- package/dist/models/ImageScaleType.js +9 -0
- package/dist/models/ImageScaleType.js.map +1 -0
- package/dist/models/ModelCodeLanguage.d.ts +12 -0
- package/dist/models/ModelCodeLanguage.js +15 -0
- package/dist/models/ModelCodeLanguage.js.map +1 -0
- package/dist/models/{MoveTemplateData.d.ts → MoveFolderRequest.d.ts} +1 -2
- package/dist/models/MoveFolderRequest.js +23 -0
- package/dist/models/MoveFolderRequest.js.map +1 -0
- package/dist/models/{CreateHtmlTemplate.d.ts → MoveTemplateRequest.d.ts} +2 -2
- package/dist/models/MoveTemplateRequest.js +23 -0
- package/dist/models/MoveTemplateRequest.js.map +1 -0
- package/dist/models/NumberConditionType.d.ts +9 -0
- package/dist/models/NumberConditionType.js +12 -0
- package/dist/models/NumberConditionType.js.map +1 -0
- package/dist/models/ObjectSerializer.d.ts +120 -49
- package/dist/models/ObjectSerializer.js +309 -201
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/PageFormat.d.ts +16 -0
- package/dist/models/PageFormat.js +19 -0
- package/dist/models/PageFormat.js.map +1 -0
- package/dist/models/{PublishVersionData.d.ts → PublishTemplateVersionRequest.d.ts} +3 -2
- package/dist/models/PublishTemplateVersionRequest.js +29 -0
- package/dist/models/PublishTemplateVersionRequest.js.map +1 -0
- package/dist/models/{RenameFolderData.d.ts → RenameFolderRequest.d.ts} +1 -1
- package/dist/models/RenameFolderRequest.js +23 -0
- package/dist/models/RenameFolderRequest.js.map +1 -0
- package/dist/models/{RestoreVersionData.d.ts → RestoreTemplateVersionRequest.d.ts} +1 -1
- package/dist/models/RestoreTemplateVersionRequest.js +23 -0
- package/dist/models/RestoreTemplateVersionRequest.js.map +1 -0
- package/dist/models/ShapeType.d.ts +9 -0
- package/dist/models/ShapeType.js +12 -0
- package/dist/models/ShapeType.js.map +1 -0
- package/dist/models/SignatureRequest.d.ts +51 -0
- package/dist/models/{SubmissionDataRequest.js → SignatureRequest.js} +58 -65
- package/dist/models/SignatureRequest.js.map +1 -0
- package/dist/models/SignatureRequestAuthSecondFactorType.d.ts +9 -0
- package/dist/models/SignatureRequestAuthSecondFactorType.js +12 -0
- package/dist/models/SignatureRequestAuthSecondFactorType.js.map +1 -0
- package/dist/models/SignatureRequestAuthType.d.ts +10 -0
- package/dist/models/SignatureRequestAuthType.js +13 -0
- package/dist/models/SignatureRequestAuthType.js.map +1 -0
- package/dist/models/SignatureRequestEvent.d.ts +29 -0
- package/dist/models/SignatureRequestEvent.js +65 -0
- package/dist/models/SignatureRequestEvent.js.map +1 -0
- package/dist/models/SignatureRequestEventType.d.ts +9 -0
- package/dist/models/SignatureRequestEventType.js +12 -0
- package/dist/models/SignatureRequestEventType.js.map +1 -0
- package/dist/models/SignatureRequestInput.d.ts +38 -0
- package/dist/models/SignatureRequestInput.js +107 -0
- package/dist/models/SignatureRequestInput.js.map +1 -0
- package/dist/models/SignatureRequestMessageType.d.ts +12 -0
- package/dist/models/SignatureRequestMessageType.js +15 -0
- package/dist/models/SignatureRequestMessageType.js.map +1 -0
- package/dist/models/SignatureRequestState.d.ts +6 -0
- package/dist/models/SignatureRequestState.js +9 -0
- package/dist/models/SignatureRequestState.js.map +1 -0
- package/dist/models/{SubmissionDataRequestToken.d.ts → SignatureRequestToken.d.ts} +8 -4
- package/dist/models/SignatureRequestToken.js +59 -0
- package/dist/models/SignatureRequestToken.js.map +1 -0
- package/dist/models/SignatureRequestTokenType.d.ts +5 -0
- package/dist/models/SignatureRequestTokenType.js +8 -0
- package/dist/models/SignatureRequestTokenType.js.map +1 -0
- package/dist/models/StringConditionType.d.ts +8 -0
- package/dist/models/StringConditionType.js +11 -0
- package/dist/models/StringConditionType.js.map +1 -0
- package/dist/models/Submission.d.ts +32 -48
- package/dist/models/Submission.js +71 -116
- package/dist/models/Submission.js.map +1 -1
- package/dist/models/SubmissionAction.d.ts +8 -21
- package/dist/models/SubmissionAction.js +4 -29
- package/dist/models/SubmissionAction.js.map +1 -1
- package/dist/models/SubmissionActionState.d.ts +7 -0
- package/dist/models/SubmissionActionState.js +10 -0
- package/dist/models/SubmissionActionState.js.map +1 -0
- package/dist/models/SubmissionActionType.d.ts +10 -0
- package/dist/models/SubmissionActionType.js +13 -0
- package/dist/models/SubmissionActionType.js.map +1 -0
- package/dist/models/SubmissionBatch.d.ts +11 -9
- package/dist/models/SubmissionBatch.js +27 -15
- package/dist/models/SubmissionBatch.js.map +1 -1
- package/dist/models/SubmissionBatchState.d.ts +6 -0
- package/dist/models/SubmissionBatchState.js +9 -0
- package/dist/models/SubmissionBatchState.js.map +1 -0
- package/dist/models/SubmissionFiles.d.ts +23 -0
- package/dist/models/SubmissionFiles.js +35 -0
- package/dist/models/SubmissionFiles.js.map +1 -0
- package/dist/models/{CreatePdfSubmissionData.d.ts → SubmissionInput.d.ts} +17 -9
- package/dist/models/SubmissionInput.js +83 -0
- package/dist/models/SubmissionInput.js.map +1 -0
- package/dist/models/{ListSubmissionsResponse.d.ts → SubmissionList.d.ts} +2 -3
- package/dist/models/SubmissionList.js +29 -0
- package/dist/models/SubmissionList.js.map +1 -0
- package/dist/models/SubmissionSource.d.ts +7 -0
- package/dist/models/SubmissionSource.js +10 -0
- package/dist/models/SubmissionSource.js.map +1 -0
- package/dist/models/SubmissionSourcePdf.d.ts +21 -0
- package/dist/models/SubmissionSourcePdf.js +29 -0
- package/dist/models/SubmissionSourcePdf.js.map +1 -0
- package/dist/models/SubmissionState.d.ts +16 -0
- package/dist/models/SubmissionState.js +19 -0
- package/dist/models/SubmissionState.js.map +1 -0
- package/dist/models/Template.d.ts +42 -65
- package/dist/models/Template.js +102 -223
- package/dist/models/Template.js.map +1 -1
- package/dist/models/TemplateActor.d.ts +25 -0
- package/dist/models/TemplateActor.js +47 -0
- package/dist/models/TemplateActor.js.map +1 -0
- package/dist/models/TemplateActorType.d.ts +6 -0
- package/dist/models/TemplateActorType.js +9 -0
- package/dist/models/TemplateActorType.js.map +1 -0
- package/dist/models/TemplateDefaults.d.ts +42 -0
- package/dist/models/TemplateDefaults.js +137 -0
- package/dist/models/TemplateDefaults.js.map +1 -0
- package/dist/models/TemplateDefaultsInput.d.ts +42 -0
- package/dist/models/TemplateDefaultsInput.js +137 -0
- package/dist/models/TemplateDefaultsInput.js.map +1 -0
- package/dist/models/TemplateDocument.d.ts +35 -0
- package/dist/models/TemplateDocument.js +89 -0
- package/dist/models/TemplateDocument.js.map +1 -0
- package/dist/models/TemplateDocumentState.d.ts +8 -0
- package/dist/models/TemplateDocumentState.js +11 -0
- package/dist/models/TemplateDocumentState.js.map +1 -0
- package/dist/models/TemplateFieldDependency.d.ts +27 -0
- package/dist/models/TemplateFieldDependency.js +47 -0
- package/dist/models/TemplateFieldDependency.js.map +1 -0
- package/dist/models/TemplateFieldDependencyAction.d.ts +6 -0
- package/dist/models/TemplateFieldDependencyAction.js +9 -0
- package/dist/models/TemplateFieldDependencyAction.js.map +1 -0
- package/dist/models/TemplateFieldDependencyCondition.d.ts +24 -0
- package/dist/models/TemplateFieldDependencyCondition.js +41 -0
- package/dist/models/TemplateFieldDependencyCondition.js.map +1 -0
- package/dist/models/TemplateFieldDependencyConditionInput.d.ts +12 -0
- package/dist/models/TemplateFieldDependencyConditionInput.js +23 -0
- package/dist/models/TemplateFieldDependencyConditionInput.js.map +1 -0
- package/dist/models/TemplateFieldDependencyInput.d.ts +27 -0
- package/dist/models/TemplateFieldDependencyInput.js +47 -0
- package/dist/models/TemplateFieldDependencyInput.js.map +1 -0
- package/dist/models/TemplateFieldDependencyMatch.d.ts +5 -0
- package/dist/models/TemplateFieldDependencyMatch.js +8 -0
- package/dist/models/TemplateFieldDependencyMatch.js.map +1 -0
- package/dist/models/TemplateFieldDependencyOperator.d.ts +13 -0
- package/dist/models/TemplateFieldDependencyOperator.js +16 -0
- package/dist/models/TemplateFieldDependencyOperator.js.map +1 -0
- package/dist/models/TemplateFieldLogicStatus.d.ts +8 -0
- package/dist/models/TemplateFieldLogicStatus.js +11 -0
- package/dist/models/TemplateFieldLogicStatus.js.map +1 -0
- package/dist/models/TemplateFormMode.d.ts +6 -0
- package/dist/models/TemplateFormMode.js +9 -0
- package/dist/models/TemplateFormMode.js.map +1 -0
- package/dist/models/TemplateModelCode.d.ts +23 -0
- package/dist/models/TemplateModelCode.js +35 -0
- package/dist/models/TemplateModelCode.js.map +1 -0
- package/dist/models/TemplatePageAiError.d.ts +7 -0
- package/dist/models/TemplatePageAiError.js +10 -0
- package/dist/models/TemplatePageAiError.js.map +1 -0
- package/dist/models/TemplatePageAiNamingStatus.d.ts +5 -0
- package/dist/models/TemplatePageAiNamingStatus.js +8 -0
- package/dist/models/TemplatePageAiNamingStatus.js.map +1 -0
- package/dist/models/TemplatePageFieldsStatus.d.ts +8 -0
- package/dist/models/TemplatePageFieldsStatus.js +11 -0
- package/dist/models/TemplatePageFieldsStatus.js.map +1 -0
- package/dist/models/TemplatePageImageStatus.d.ts +5 -0
- package/dist/models/TemplatePageImageStatus.js +8 -0
- package/dist/models/TemplatePageImageStatus.js.map +1 -0
- package/dist/models/TemplatePageProcessingStatus.d.ts +28 -0
- package/dist/models/TemplatePageProcessingStatus.js +47 -0
- package/dist/models/TemplatePageProcessingStatus.js.map +1 -0
- package/dist/models/TemplateSourcePdf.d.ts +23 -0
- package/dist/models/TemplateSourcePdf.js +41 -0
- package/dist/models/TemplateSourcePdf.js.map +1 -0
- package/dist/models/TemplateSummary.d.ts +62 -0
- package/dist/models/TemplateSummary.js +239 -0
- package/dist/models/TemplateSummary.js.map +1 -0
- package/dist/models/TemplateSummaryList.d.ts +22 -0
- package/dist/models/TemplateSummaryList.js +29 -0
- package/dist/models/TemplateSummaryList.js.map +1 -0
- package/dist/models/TemplateType.d.ts +5 -0
- package/dist/models/TemplateType.js +8 -0
- package/dist/models/TemplateType.js.map +1 -0
- package/dist/models/TemplateVersion.d.ts +24 -0
- package/dist/models/TemplateVersion.js +41 -0
- package/dist/models/TemplateVersion.js.map +1 -0
- package/dist/models/TemplateVersionType.d.ts +6 -0
- package/dist/models/TemplateVersionType.js +9 -0
- package/dist/models/TemplateVersionType.js.map +1 -0
- package/dist/models/TextAlignment.d.ts +7 -0
- package/dist/models/TextAlignment.js +10 -0
- package/dist/models/TextAlignment.js.map +1 -0
- package/dist/models/TextOverflow.d.ts +5 -0
- package/dist/models/TextOverflow.js +8 -0
- package/dist/models/TextOverflow.js.map +1 -0
- package/dist/models/TextVerticalAlignment.d.ts +6 -0
- package/dist/models/TextVerticalAlignment.js +9 -0
- package/dist/models/TextVerticalAlignment.js.map +1 -0
- package/dist/models/Typeface.d.ts +20 -0
- package/dist/models/Typeface.js +23 -0
- package/dist/models/Typeface.js.map +1 -0
- package/dist/models/UpdateSignatureRequestRequest.d.ts +32 -0
- package/dist/models/UpdateSignatureRequestRequest.js +71 -0
- package/dist/models/UpdateSignatureRequestRequest.js.map +1 -0
- package/dist/models/UpdateTemplateDocumentRequest.d.ts +22 -0
- package/dist/models/UpdateTemplateDocumentRequest.js +35 -0
- package/dist/models/UpdateTemplateDocumentRequest.js.map +1 -0
- package/dist/models/UpdateTemplateRequest.d.ts +57 -0
- package/dist/models/UpdateTemplateRequest.js +209 -0
- package/dist/models/UpdateTemplateRequest.js.map +1 -0
- package/dist/models/UpdateWebhookRequest.d.ts +34 -0
- package/dist/models/UpdateWebhookRequest.js +83 -0
- package/dist/models/UpdateWebhookRequest.js.map +1 -0
- package/dist/models/UploadMethod.d.ts +4 -0
- package/dist/models/UploadMethod.js +7 -0
- package/dist/models/UploadMethod.js.map +1 -0
- package/dist/models/{UploadPresignResponse.d.ts → UploadPresign.d.ts} +9 -7
- package/dist/models/UploadPresign.js +41 -0
- package/dist/models/UploadPresign.js.map +1 -0
- package/dist/models/{CreateFolderData.d.ts → UrlSourcePdf.d.ts} +3 -2
- package/dist/models/UrlSourcePdf.js +29 -0
- package/dist/models/UrlSourcePdf.js.map +1 -0
- package/dist/models/Webhook.d.ts +9 -11
- package/dist/models/Webhook.js +11 -16
- package/dist/models/Webhook.js.map +1 -1
- package/dist/models/WebhookEventType.d.ts +28 -0
- package/dist/models/WebhookEventType.js +31 -0
- package/dist/models/WebhookEventType.js.map +1 -0
- package/dist/models/WebhookList.d.ts +22 -0
- package/dist/models/WebhookList.js +29 -0
- package/dist/models/WebhookList.js.map +1 -0
- package/dist/models/WebhookMode.d.ts +5 -0
- package/dist/models/WebhookMode.js +8 -0
- package/dist/models/WebhookMode.js.map +1 -0
- package/dist/models/all.d.ts +120 -49
- package/dist/models/all.js +120 -49
- package/dist/models/all.js.map +1 -1
- package/dist/rxjsStub.js +5 -5
- package/dist/rxjsStub.js.map +1 -1
- package/dist/servers.d.ts +1 -0
- package/dist/servers.js +4 -3
- package/dist/servers.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +226 -201
- package/dist/types/ObjectParamAPI.js +136 -128
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +134 -127
- package/dist/types/ObservableAPI.js +243 -215
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +135 -127
- package/dist/types/PromiseAPI.js +182 -171
- package/dist/types/PromiseAPI.js.map +1 -1
- package/dist/util.js +2 -3
- package/dist/util.js.map +1 -1
- package/package.json +4 -3
- package/dist/models/AddFieldsData.js +0 -23
- package/dist/models/AddFieldsData.js.map +0 -1
- package/dist/models/BatchGeneratePdfs201Response.d.ts +0 -29
- package/dist/models/BatchGeneratePdfs201Response.js +0 -52
- package/dist/models/BatchGeneratePdfs201Response.js.map +0 -1
- package/dist/models/CombinePdfsData.js.map +0 -1
- package/dist/models/CombinedSubmission.d.ts +0 -39
- package/dist/models/CombinedSubmission.js +0 -107
- package/dist/models/CombinedSubmission.js.map +0 -1
- package/dist/models/CombinedSubmissionAction.d.ts +0 -42
- package/dist/models/CombinedSubmissionAction.js +0 -78
- package/dist/models/CombinedSubmissionAction.js.map +0 -1
- package/dist/models/CopyTemplateOptions.js.map +0 -1
- package/dist/models/CreateCombinedSubmissionResponse.js +0 -40
- package/dist/models/CreateCombinedSubmissionResponse.js.map +0 -1
- package/dist/models/CreateCustomFileData.js +0 -23
- package/dist/models/CreateCustomFileData.js.map +0 -1
- package/dist/models/CreateCustomFileResponse.d.ts +0 -27
- package/dist/models/CreateCustomFileResponse.js +0 -40
- package/dist/models/CreateCustomFileResponse.js.map +0 -1
- package/dist/models/CreateFolderData.js +0 -23
- package/dist/models/CreateFolderData.js.map +0 -1
- package/dist/models/CreateHtmlTemplate.js +0 -23
- package/dist/models/CreateHtmlTemplate.js.map +0 -1
- package/dist/models/CreatePdfSubmissionData.js.map +0 -1
- package/dist/models/CreatePdfTemplate.d.ts +0 -20
- package/dist/models/CreatePdfTemplate.js +0 -23
- package/dist/models/CreatePdfTemplate.js.map +0 -1
- package/dist/models/CreateSubmissionDataRequestData.d.ts +0 -50
- package/dist/models/CreateSubmissionDataRequestData.js +0 -120
- package/dist/models/CreateSubmissionDataRequestData.js.map +0 -1
- package/dist/models/CreateSubmissionDataRequestEventRequest.d.ts +0 -42
- package/dist/models/CreateSubmissionDataRequestEventRequest.js +0 -62
- package/dist/models/CreateSubmissionDataRequestEventRequest.js.map +0 -1
- package/dist/models/CreateSubmissionDataRequestEventResponse.d.ts +0 -27
- package/dist/models/CreateSubmissionDataRequestEventResponse.js +0 -40
- package/dist/models/CreateSubmissionDataRequestEventResponse.js.map +0 -1
- package/dist/models/CreateSubmissionDataRequestResponse.d.ts +0 -27
- package/dist/models/CreateSubmissionDataRequestResponse.js +0 -40
- package/dist/models/CreateSubmissionDataRequestResponse.js.map +0 -1
- package/dist/models/CreateSubmissionDataRequestTokenResponse.d.ts +0 -27
- package/dist/models/CreateSubmissionDataRequestTokenResponse.js +0 -40
- package/dist/models/CreateSubmissionDataRequestTokenResponse.js.map +0 -1
- package/dist/models/CreateSubmissionResponse.d.ts +0 -27
- package/dist/models/CreateSubmissionResponse.js +0 -40
- package/dist/models/CreateSubmissionResponse.js.map +0 -1
- package/dist/models/CreateWebhookData.d.ts +0 -20
- package/dist/models/CreateWebhookData.js +0 -23
- package/dist/models/CreateWebhookData.js.map +0 -1
- package/dist/models/ErrorOrMultipleErrorsResponse.d.ts +0 -25
- package/dist/models/ErrorOrMultipleErrorsResponse.js +0 -39
- package/dist/models/ErrorOrMultipleErrorsResponse.js.map +0 -1
- package/dist/models/JsonSchema.d.ts +0 -31
- package/dist/models/JsonSchema.js +0 -89
- package/dist/models/JsonSchema.js.map +0 -1
- package/dist/models/ListSubmissionsResponse.js +0 -35
- package/dist/models/ListSubmissionsResponse.js.map +0 -1
- package/dist/models/MoveFolderData.js +0 -23
- package/dist/models/MoveFolderData.js.map +0 -1
- package/dist/models/MoveTemplateData.js +0 -29
- package/dist/models/MoveTemplateData.js.map +0 -1
- package/dist/models/MultipleErrorsResponse.d.ts +0 -24
- package/dist/models/MultipleErrorsResponse.js +0 -33
- package/dist/models/MultipleErrorsResponse.js.map +0 -1
- package/dist/models/PublishVersionData.js +0 -29
- package/dist/models/PublishVersionData.js.map +0 -1
- package/dist/models/RenameFolderData.js +0 -23
- package/dist/models/RenameFolderData.js.map +0 -1
- package/dist/models/RestoreVersionData.js +0 -23
- package/dist/models/RestoreVersionData.js.map +0 -1
- package/dist/models/Submission422Response.d.ts +0 -27
- package/dist/models/Submission422Response.js +0 -45
- package/dist/models/Submission422Response.js.map +0 -1
- package/dist/models/SubmissionBatchData.js.map +0 -1
- package/dist/models/SubmissionBatchWithSubmissions.d.ts +0 -34
- package/dist/models/SubmissionBatchWithSubmissions.js +0 -77
- package/dist/models/SubmissionBatchWithSubmissions.js.map +0 -1
- package/dist/models/SubmissionDataRequest.d.ts +0 -63
- package/dist/models/SubmissionDataRequest.js.map +0 -1
- package/dist/models/SubmissionDataRequestEvent.d.ts +0 -45
- package/dist/models/SubmissionDataRequestEvent.js +0 -80
- package/dist/models/SubmissionDataRequestEvent.js.map +0 -1
- package/dist/models/SubmissionDataRequestShow.d.ts +0 -64
- package/dist/models/SubmissionDataRequestShow.js +0 -180
- package/dist/models/SubmissionDataRequestShow.js.map +0 -1
- package/dist/models/SubmissionDataRequestToken.js +0 -41
- package/dist/models/SubmissionDataRequestToken.js.map +0 -1
- package/dist/models/SubmissionPreview.d.ts +0 -63
- package/dist/models/SubmissionPreview.js +0 -181
- package/dist/models/SubmissionPreview.js.map +0 -1
- package/dist/models/SuccessErrorResponse.d.ts +0 -25
- package/dist/models/SuccessErrorResponse.js +0 -34
- package/dist/models/SuccessErrorResponse.js.map +0 -1
- package/dist/models/SuccessMultipleErrorsResponse.d.ts +0 -25
- package/dist/models/SuccessMultipleErrorsResponse.js +0 -34
- package/dist/models/SuccessMultipleErrorsResponse.js.map +0 -1
- package/dist/models/TemplateAddFieldsResponse.d.ts +0 -26
- package/dist/models/TemplateAddFieldsResponse.js +0 -40
- package/dist/models/TemplateAddFieldsResponse.js.map +0 -1
- package/dist/models/TemplateDeleteResponse.d.ts +0 -27
- package/dist/models/TemplateDeleteResponse.js +0 -46
- package/dist/models/TemplateDeleteResponse.js.map +0 -1
- package/dist/models/TemplateModelCodeResponse.d.ts +0 -33
- package/dist/models/TemplateModelCodeResponse.js +0 -47
- package/dist/models/TemplateModelCodeResponse.js.map +0 -1
- package/dist/models/TemplatePreview.d.ts +0 -85
- package/dist/models/TemplatePreview.js +0 -336
- package/dist/models/TemplatePreview.js.map +0 -1
- package/dist/models/TemplatePublishVersionResponse.d.ts +0 -26
- package/dist/models/TemplatePublishVersionResponse.js +0 -40
- package/dist/models/TemplatePublishVersionResponse.js.map +0 -1
- package/dist/models/UpdateHtmlTemplate.d.ts +0 -20
- package/dist/models/UpdateHtmlTemplate.js +0 -23
- package/dist/models/UpdateHtmlTemplate.js.map +0 -1
- package/dist/models/UpdatePdfTemplate.d.ts +0 -20
- package/dist/models/UpdatePdfTemplate.js +0 -23
- package/dist/models/UpdatePdfTemplate.js.map +0 -1
- package/dist/models/UpdateSubmissionDataRequestData.d.ts +0 -50
- package/dist/models/UpdateSubmissionDataRequestData.js +0 -115
- package/dist/models/UpdateSubmissionDataRequestData.js.map +0 -1
- package/dist/models/UpdateWebhookData.d.ts +0 -20
- package/dist/models/UpdateWebhookData.js +0 -23
- package/dist/models/UpdateWebhookData.js.map +0 -1
- package/dist/models/UploadPresignResponse.js +0 -45
- package/dist/models/UploadPresignResponse.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -1,33 +1,93 @@
|
|
|
1
1
|
# AGENTS.md
|
|
2
2
|
|
|
3
|
-
Notes for AI coding agents working with the DocSpring TypeScript SDK (`docspring-ts`)
|
|
4
|
-
|
|
3
|
+
Notes for AI coding agents working with the DocSpring TypeScript SDK (`docspring-ts`): integrating it into an
|
|
4
|
+
app, or working in this repository.
|
|
5
5
|
|
|
6
6
|
## This code is generated
|
|
7
7
|
|
|
8
8
|
Every file here is generated from DocSpring's OpenAPI spec by
|
|
9
9
|
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches), and each release replaces
|
|
10
|
-
all of it. Don't
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
all of it. Don't patch an installed copy: the next release overwrites the change. Issues and pull requests are welcome
|
|
11
|
+
at https://github.com/DocSpring/docspring-typescript (or email support@docspring.com), and DocSpring makes the fix in the generator so that every release
|
|
12
|
+
keeps it.
|
|
13
13
|
|
|
14
14
|
## Where to look
|
|
15
15
|
|
|
16
16
|
- [README.md](README.md): install, configuration, an example and how errors and API changes are handled.
|
|
17
|
-
- [Client.md](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md): every method, with its parameters and return type.
|
|
17
|
+
- [docs/Client.md](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md): every method, with its parameters and return type.
|
|
18
18
|
- [models/](https://github.com/DocSpring/docspring-typescript/tree/main/models): every model and its fields.
|
|
19
19
|
- https://docspring.com/docs/llms.txt: DocSpring's documentation for LLMs (`llms-small.txt`, `llms-full.txt`).
|
|
20
|
-
- https://docspring.com/docs/api/: the API reference, with TypeScript code
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
- https://docspring.com/docs/: the guides. https://docspring.com/docs/api/: the API reference, with TypeScript code
|
|
21
|
+
for every method.
|
|
22
|
+
- https://docspring.com/api-docs/v2/openapi.json: the OpenAPI spec this SDK is generated from.
|
|
23
|
+
|
|
24
|
+
## Set up
|
|
25
|
+
|
|
26
|
+
- Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET` (an API token from
|
|
27
|
+
https://app.docspring.com/api_tokens). Keep them in the environment or a secret store, never in code. An account in
|
|
28
|
+
the EU region also needs `DOCSPRING_REGION=EU`.
|
|
29
|
+
- Call DocSpring from your server. The token secret gives full access to the account, so it must never reach a browser
|
|
30
|
+
or a mobile app. Signers use signing links or the embedded signing form instead (see Signature requests).
|
|
31
|
+
- `testAuthentication` checks the credentials.
|
|
32
|
+
|
|
33
|
+
## Generate PDFs
|
|
34
|
+
|
|
35
|
+
- Read a template's data shape before writing the request: `getTemplateSchema` returns the
|
|
36
|
+
JSON Schema of its submission data (its field names and types), and `getTemplateModelCode`
|
|
37
|
+
generates typed code for it. The keys of `data` are the template's field names. Date fields take `YYYY-MM-DD`.
|
|
38
|
+
- Template IDs look like `tpl_...` and submission IDs like `sub_...`. Store the submission ID with your own record.
|
|
39
|
+
- Pass `test: true` while you build: test PDFs are free and watermarked. Live PDFs use credits.
|
|
40
|
+
- A submission uses the template's latest published version (its draft when nothing has been published yet). Pass
|
|
41
|
+
`version` (`draft`, `1.2.0`, or `1` for the latest 1.x.x) to use another one.
|
|
42
|
+
- `createSubmission` waits for the PDF, for up to 95 seconds, and returns the submission in
|
|
43
|
+
its final state: check its `state` (`processed`, or a failure state with an `error_message`). If the PDF takes longer,
|
|
44
|
+
the call fails with a 504 `polling_timeout` error that has the submission's ID. The submission exists and is still
|
|
45
|
+
being made, so don't send the request again (that makes a second one): get it with
|
|
46
|
+
`getSubmission` until its state isn't `pending`. For slow templates or many PDFs, set
|
|
47
|
+
`wait` to false and use webhooks (https://docspring.com/docs/api-guide/synchronous-requests/).
|
|
48
|
+
`createSubmissionBatch` sends up to 50 submissions in one request.
|
|
49
|
+
- `files.pdf.download_url` is a temporary link. Keep the submission ID (or `files.pdf.permanent_url`, which needs your
|
|
50
|
+
API token) and get a fresh link when someone downloads the PDF.
|
|
51
|
+
- Submission data is often personal data: don't log request or response bodies. `expires_in` deletes a submission's PDF
|
|
52
|
+
and data that many seconds after it's created, and `expireSubmission` deletes them now.
|
|
53
|
+
|
|
54
|
+
## Errors
|
|
55
|
+
|
|
56
|
+
- Methods return a promise that rejects with `DocSpring.ApiException` for an error response, with the HTTP status in `code` and the parsed body in `body`.
|
|
57
|
+
- Every error response has one body: `{"error": {"code", "message", "details", "request_id"}}`. Branch on `code`, not
|
|
58
|
+
on the message. Each detail has a `pointer` to the request body value it's about, or the query `parameter`.
|
|
59
|
+
- 422 `invalid_data`: the data doesn't match the template. The submission is saved anyway, as `invalid_data`, and the
|
|
60
|
+
error has its `submission_id`.
|
|
61
|
+
- 402 `insufficient_credits`: the submission is saved and is made automatically once the account has credits. Don't
|
|
62
|
+
send it again (https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
63
|
+
- 429 `rate_limited`: wait for the seconds in the `Retry-After` header, then retry.
|
|
64
|
+
- Requests are checked against the API's request schemas before they're sent. A request the API would reject fails with a `ValidationError` (exported by the package), whose `details` are objects with `code`, `message` and a `pointer` into the body (or a `parameter`). Turn the check off with the client option `validateRequests: false`.
|
|
65
|
+
|
|
66
|
+
## Webhooks
|
|
67
|
+
|
|
68
|
+
- Webhooks tell your server when a submission is processed or fails, instead of polling
|
|
69
|
+
(https://docspring.com/docs/webhooks/overview/). A webhook created with API v2 sends events in API v2's format
|
|
70
|
+
(version 4).
|
|
71
|
+
- Verify each request's `X-DocSpring-Signature` header before acting on it: an HMAC-SHA256 of `{t}.{raw body}` with the
|
|
72
|
+
webhook's signing secret, computed over the raw body exactly as received
|
|
73
|
+
(https://docspring.com/docs/webhooks/verifying-signatures/).
|
|
74
|
+
- No webhook is sent when a submission starts waiting for credits.
|
|
75
|
+
|
|
76
|
+
## Signature requests
|
|
77
|
+
|
|
78
|
+
- To have people fill in fields and sign before the PDF is made, create the submission with `signature_requests`. Each
|
|
79
|
+
one has the `fields` its signer fills in (a field belongs to one signature request), and their `name` and `email`.
|
|
80
|
+
The PDF is made when every signer has finished
|
|
81
|
+
(https://docspring.com/docs/api-guide/create-signature-requests/).
|
|
82
|
+
- Send a signer to the `signature_request_url` of a token from
|
|
83
|
+
`createSignatureRequestToken`. An `api` token's link opens the form for 24 hours and an
|
|
84
|
+
`email` token's for 7 days (`expires_at`), so create a new token when a signer comes back later.
|
|
85
|
+
- To show the signing form on your own site, use Signature Requests JS, and add the site's domain to the template's
|
|
86
|
+
Embed Domains (https://docspring.com/docs/guides/embedded-forms/embedded-signature-requests/).
|
|
87
|
+
|
|
88
|
+
## Responses
|
|
89
|
+
|
|
90
|
+
- List methods return `data` and `next_cursor`: pass `next_cursor` as `cursor` to get the next page.
|
|
91
|
+
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v2 without a new
|
|
92
|
+
version. The model leaves out a response field added to the API after this release. Enum values in responses are strings, so a
|
|
93
|
+
value added after this release comes back as it is: handle values you don't recognize.
|
package/README.md
CHANGED
|
@@ -6,7 +6,10 @@ templates with your data, generates PDFs from HTML templates, combines PDFs and
|
|
|
6
6
|
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
|
|
7
7
|
[npm](https://www.npmjs.com/package/docspring-ts) · [Changelog](https://github.com/DocSpring/docspring-typescript/blob/main/CHANGELOG.md)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
|
|
10
|
+
pull requests are welcome.
|
|
11
|
+
|
|
12
|
+
Version 4.0.0.
|
|
10
13
|
|
|
11
14
|
## Install and configure
|
|
12
15
|
|
|
@@ -61,112 +64,120 @@ Fill a template with data (use your template's ID in place of `tpl_1234567890abc
|
|
|
61
64
|
|
|
62
65
|
```ts
|
|
63
66
|
const templateId = 'tpl_1234567890abcdef01'
|
|
64
|
-
const
|
|
67
|
+
const body: DocSpring.CreateSubmissionRequest = {
|
|
65
68
|
data: {
|
|
66
69
|
first_name: 'John',
|
|
67
70
|
last_name: 'Smith',
|
|
68
71
|
phone_number: '+11234567890',
|
|
69
72
|
},
|
|
70
|
-
metadata: {
|
|
73
|
+
metadata: { user_id: 42 },
|
|
74
|
+
test: true,
|
|
71
75
|
}
|
|
72
76
|
|
|
73
|
-
const result = await apiInstance.
|
|
77
|
+
const result = await apiInstance.createSubmission(templateId, body)
|
|
74
78
|
|
|
75
79
|
console.log(result)
|
|
76
80
|
```
|
|
77
81
|
|
|
78
|
-
By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has
|
|
79
|
-
`download_url
|
|
82
|
+
By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has a link to
|
|
83
|
+
download it (`files.pdf.download_url`). Set `wait` to false to get a pending submission straight away.
|
|
80
84
|
[Sync vs. async processing](https://docspring.com/docs/api-guide/synchronous-requests/) covers the time limit, status
|
|
81
85
|
checks and webhooks.
|
|
82
86
|
|
|
83
87
|
## Methods
|
|
84
88
|
|
|
85
|
-
[Client.md](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md) has each method's parameters and return type, and
|
|
89
|
+
[docs/Client.md](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md) has each method's parameters and return type, and
|
|
86
90
|
[models/](https://github.com/DocSpring/docspring-typescript/tree/main/models) has the models. The [API reference](https://docspring.com/docs/api/) has
|
|
87
91
|
TypeScript code for every method.
|
|
88
92
|
|
|
89
93
|
| Method | Description |
|
|
90
94
|
| ------ | ----------- |
|
|
91
|
-
| [`
|
|
92
|
-
| [`
|
|
93
|
-
| [`
|
|
94
|
-
| [`
|
|
95
|
-
| [`
|
|
96
|
-
| [`
|
|
97
|
-
| [`
|
|
98
|
-
| [`
|
|
99
|
-
| [`
|
|
100
|
-
| [`
|
|
101
|
-
| [`
|
|
102
|
-
| [`
|
|
103
|
-
| [`
|
|
104
|
-
| [`
|
|
105
|
-
| [`
|
|
106
|
-
| [`
|
|
107
|
-
| [`
|
|
108
|
-
| [`
|
|
109
|
-
| [`
|
|
110
|
-
| [`
|
|
111
|
-
| [`
|
|
112
|
-
| [`
|
|
113
|
-
| [`
|
|
114
|
-
| [`
|
|
115
|
-
| [`
|
|
116
|
-
| [`
|
|
117
|
-
| [`
|
|
118
|
-
| [`
|
|
119
|
-
| [`
|
|
120
|
-
| [`
|
|
121
|
-
| [`listFolders`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listfolders) |
|
|
122
|
-
| [`listSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listsubmissions) | List
|
|
123
|
-
| [`listTemplates`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listtemplates) |
|
|
124
|
-
| [`listTemplateSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listtemplatesubmissions) | List
|
|
125
|
-
| [`listWebhooks`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listwebhooks) |
|
|
126
|
-
| [`
|
|
127
|
-
| [`
|
|
128
|
-
| [`publishTemplateVersion`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#publishtemplateversion) | Publish a template version |
|
|
129
|
-
| [`renameFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#renamefolder) | Rename a folder |
|
|
130
|
-
| [`restoreTemplateVersion`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#restoretemplateversion) | Restore a template version |
|
|
131
|
-
| [`testAuthentication`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#testauthentication) | Test authentication |
|
|
132
|
-
| [`
|
|
133
|
-
| [`updateTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatetemplate) | Update a
|
|
134
|
-
| [`updateTemplateDocument`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatetemplatedocument) |
|
|
135
|
-
| [`
|
|
136
|
-
| [`
|
|
95
|
+
| [`copyTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#copytemplate) | Copy a template |
|
|
96
|
+
| [`createCombinedPdf`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createcombinedpdf) | Combine PDFs |
|
|
97
|
+
| [`createCustomFileFromUpload`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createcustomfilefromupload) | Create a custom file from an upload |
|
|
98
|
+
| [`createFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createfolder) | Create a folder |
|
|
99
|
+
| [`createSignatureRequestEvent`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createsignaturerequestevent) | Record a signature request event |
|
|
100
|
+
| [`createSignatureRequestToken`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createsignaturerequesttoken) | Create a signature request token |
|
|
101
|
+
| [`createSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createsubmission) | Generate a PDF |
|
|
102
|
+
| [`createSubmissionBatch`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createsubmissionbatch) | Generate PDFs in a batch |
|
|
103
|
+
| [`createTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createtemplate) | Create a template |
|
|
104
|
+
| [`createWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#createwebhook) | Create a webhook |
|
|
105
|
+
| [`deleteCustomFile`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#deletecustomfile) | Delete a custom file |
|
|
106
|
+
| [`deleteFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#deletefolder) | Delete a folder |
|
|
107
|
+
| [`deleteTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#deletetemplate) | Delete a template |
|
|
108
|
+
| [`deleteWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#deletewebhook) | Delete a webhook |
|
|
109
|
+
| [`expireCombinedPdf`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#expirecombinedpdf) | Expire a combined PDF |
|
|
110
|
+
| [`expireSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#expiresubmission) | Expire a submission |
|
|
111
|
+
| [`generateSubmissionPreview`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#generatesubmissionpreview) | Generate a preview PDF |
|
|
112
|
+
| [`getCombinedPdf`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getcombinedpdf) | Get a combined PDF |
|
|
113
|
+
| [`getCustomFile`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getcustomfile) | Get a custom file |
|
|
114
|
+
| [`getFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getfolder) | Get a folder |
|
|
115
|
+
| [`getPresignUrl`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getpresignurl) | Get a presigned URL to upload a file |
|
|
116
|
+
| [`getSignatureRequest`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getsignaturerequest) | Get a signature request |
|
|
117
|
+
| [`getSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getsubmission) | Get a submission |
|
|
118
|
+
| [`getSubmissionBatch`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getsubmissionbatch) | Get a batch |
|
|
119
|
+
| [`getTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#gettemplate) | Get a template |
|
|
120
|
+
| [`getTemplateModelCode`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#gettemplatemodelcode) | Generate typed code for a template's submission data |
|
|
121
|
+
| [`getTemplateSchema`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#gettemplateschema) | Get the JSON Schema of a template's submission data |
|
|
122
|
+
| [`getWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#getwebhook) | Get a webhook |
|
|
123
|
+
| [`listCombinedPdfs`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listcombinedpdfs) | List combined PDFs |
|
|
124
|
+
| [`listCustomFiles`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listcustomfiles) | List custom files |
|
|
125
|
+
| [`listFolders`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listfolders) | List folders |
|
|
126
|
+
| [`listSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listsubmissions) | List submissions |
|
|
127
|
+
| [`listTemplates`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listtemplates) | List templates |
|
|
128
|
+
| [`listTemplateSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listtemplatesubmissions) | List a template's submissions |
|
|
129
|
+
| [`listWebhooks`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#listwebhooks) | List webhooks |
|
|
130
|
+
| [`moveFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#movefolder) | Move a folder |
|
|
131
|
+
| [`moveTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#movetemplate) | Move a template to a folder |
|
|
132
|
+
| [`publishTemplateVersion`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#publishtemplateversion) | Publish a template version |
|
|
133
|
+
| [`renameFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#renamefolder) | Rename a folder |
|
|
134
|
+
| [`restoreTemplateVersion`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#restoretemplateversion) | Restore a template version |
|
|
135
|
+
| [`testAuthentication`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#testauthentication) | Test authentication |
|
|
136
|
+
| [`updateSignatureRequest`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#updatesignaturerequest) | Update a signature request |
|
|
137
|
+
| [`updateTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#updatetemplate) | Update a template |
|
|
138
|
+
| [`updateTemplateDocument`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#updatetemplatedocument) | Replace a template's PDF |
|
|
139
|
+
| [`updateWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#updatewebhook) | Update a webhook |
|
|
140
|
+
| [`uploadTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#uploadtemplate) | Create a PDF template from an uploaded PDF |
|
|
141
|
+
| [`uploadTemplateDocument`](https://github.com/DocSpring/docspring-typescript/blob/main/docs/Client.md#uploadtemplatedocument) | Replace a template's PDF with an uploaded PDF |
|
|
137
142
|
|
|
138
143
|
## Errors
|
|
139
144
|
|
|
140
145
|
Methods return a promise that rejects with `DocSpring.ApiException` for an error response, with the HTTP status in `code` and the parsed body in `body`.
|
|
141
146
|
|
|
147
|
+
The client checks each request against the API's request schemas before sending it. A request the API would reject fails with a `ValidationError` (exported by the package), whose `details` are objects with `code`, `message` and a `pointer` into the body (or a `parameter`). Turn the check off with the client option `validateRequests: false`.
|
|
148
|
+
The details are the ones the API's 422 response would have, so you get them without a round trip.
|
|
149
|
+
|
|
142
150
|
## API changes
|
|
143
151
|
|
|
144
|
-
DocSpring adds fields and enum values to API
|
|
152
|
+
DocSpring adds fields and enum values to API v2 without releasing a new API version. Changes that would break
|
|
145
153
|
existing code, such as removing or renaming a field, go in a new API version
|
|
146
154
|
([API changes](https://docspring.com/docs/api-guide/openapi-schema/#api-changes)). So this SDK keeps working with
|
|
147
155
|
responses that are newer than it is:
|
|
148
156
|
|
|
149
157
|
- The model leaves out a response field added to the API after this release.
|
|
150
|
-
-
|
|
158
|
+
- Enum values in responses are strings, so a value added to the API after this release comes back as it is: handle values you don't recognize.
|
|
151
159
|
|
|
152
160
|
Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-typescript/blob/main/CHANGELOG.md) lists
|
|
153
161
|
what each release adds.
|
|
154
162
|
|
|
155
163
|
## About this SDK
|
|
156
164
|
|
|
157
|
-
This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/
|
|
158
|
-
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.
|
|
165
|
+
This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/v2/openapi.json) with
|
|
166
|
+
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.26.0.
|
|
159
167
|
The fork changes the TypeScript generator:
|
|
160
168
|
|
|
169
|
+
- Enum types are const objects with a union type of their values, and a response property is `SubmissionState | (string & {})`, so an enum value added to the API after this release type-checks.
|
|
161
170
|
- `nameMappings` apply to property names, so the JSON schema model's `$id` becomes `schema_id` instead of clashing with `id`.
|
|
162
171
|
|
|
163
172
|
On top of the generated code, we add:
|
|
164
173
|
|
|
165
174
|
- A client constructor that reads your credentials, region and host from the environment.
|
|
175
|
+
- `instanceof ApiException` and `instanceof RequiredError` are true for the errors the client throws. Stock OpenAPI Generator's classes lose their prototype when compiled to ES5, so both were false.
|
|
166
176
|
|
|
167
|
-
|
|
168
|
-
[open an issue](https://github.com/DocSpring/docspring-typescript/issues) or
|
|
169
|
-
we'll fix
|
|
177
|
+
Each release regenerates every file, so a change made only here would be lost in the next one. Issues and pull
|
|
178
|
+
requests are welcome all the same: [open an issue](https://github.com/DocSpring/docspring-typescript/issues) or a pull request, or email
|
|
179
|
+
[support@docspring.com](mailto:support@docspring.com), and we'll make the fix in the generator so that every release
|
|
180
|
+
keeps it. [AGENTS.md](https://github.com/DocSpring/docspring-typescript/blob/main/AGENTS.md) is a guide for AI coding agents that integrate this SDK.
|
|
170
181
|
|
|
171
182
|
## License
|
|
172
183
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const requestSchemas: any;
|