docspring-ts 3.0.0 → 3.2.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 (69) hide show
  1. package/AGENTS.md +33 -0
  2. package/README.md +148 -55
  3. package/dist/apis/Client.d.ts +16 -0
  4. package/dist/apis/Client.js +599 -40
  5. package/dist/apis/Client.js.map +1 -1
  6. package/dist/http/isomorphic-fetch.js +1 -1
  7. package/dist/models/CombinePdfsData.js.map +1 -1
  8. package/dist/models/CombinedSubmissionAction.d.ts +1 -0
  9. package/dist/models/CombinedSubmissionAction.js +6 -0
  10. package/dist/models/CombinedSubmissionAction.js.map +1 -1
  11. package/dist/models/CopyTemplateOptions.d.ts +2 -1
  12. package/dist/models/CopyTemplateOptions.js +6 -0
  13. package/dist/models/CopyTemplateOptions.js.map +1 -1
  14. package/dist/models/CreateWebhookData.d.ts +20 -0
  15. package/dist/models/CreateWebhookData.js +23 -0
  16. package/dist/models/CreateWebhookData.js.map +1 -0
  17. package/dist/models/JsonSchema.d.ts +3 -0
  18. package/dist/models/JsonSchema.js +18 -0
  19. package/dist/models/JsonSchema.js.map +1 -1
  20. package/dist/models/MoveFolderData.d.ts +1 -1
  21. package/dist/models/MoveTemplateData.d.ts +2 -1
  22. package/dist/models/MoveTemplateData.js +6 -0
  23. package/dist/models/MoveTemplateData.js.map +1 -1
  24. package/dist/models/ObjectSerializer.d.ts +4 -0
  25. package/dist/models/ObjectSerializer.js +14 -0
  26. package/dist/models/ObjectSerializer.js.map +1 -1
  27. package/dist/models/Submission.d.ts +6 -4
  28. package/dist/models/Submission.js +7 -0
  29. package/dist/models/Submission.js.map +1 -1
  30. package/dist/models/SubmissionAction.d.ts +1 -0
  31. package/dist/models/SubmissionAction.js +6 -0
  32. package/dist/models/SubmissionAction.js.map +1 -1
  33. package/dist/models/SubmissionDataRequest.d.ts +3 -1
  34. package/dist/models/SubmissionDataRequest.js +7 -0
  35. package/dist/models/SubmissionDataRequest.js.map +1 -1
  36. package/dist/models/SubmissionDataRequestShow.d.ts +3 -1
  37. package/dist/models/SubmissionDataRequestShow.js +7 -0
  38. package/dist/models/SubmissionDataRequestShow.js.map +1 -1
  39. package/dist/models/SubmissionPreview.d.ts +3 -1
  40. package/dist/models/SubmissionPreview.js +7 -0
  41. package/dist/models/SubmissionPreview.js.map +1 -1
  42. package/dist/models/Template.d.ts +13 -2
  43. package/dist/models/Template.js +61 -0
  44. package/dist/models/Template.js.map +1 -1
  45. package/dist/models/TemplateModelCodeResponse.d.ts +33 -0
  46. package/dist/models/TemplateModelCodeResponse.js +47 -0
  47. package/dist/models/TemplateModelCodeResponse.js.map +1 -0
  48. package/dist/models/TemplatePreview.d.ts +11 -2
  49. package/dist/models/TemplatePreview.js +49 -0
  50. package/dist/models/TemplatePreview.js.map +1 -1
  51. package/dist/models/UpdateWebhookData.d.ts +20 -0
  52. package/dist/models/UpdateWebhookData.js +23 -0
  53. package/dist/models/UpdateWebhookData.js.map +1 -0
  54. package/dist/models/Webhook.d.ts +45 -0
  55. package/dist/models/Webhook.js +142 -0
  56. package/dist/models/Webhook.js.map +1 -0
  57. package/dist/models/all.d.ts +4 -0
  58. package/dist/models/all.js +4 -0
  59. package/dist/models/all.js.map +1 -1
  60. package/dist/types/ObjectParamAPI.d.ts +42 -0
  61. package/dist/types/ObjectParamAPI.js +38 -0
  62. package/dist/types/ObjectParamAPI.js.map +1 -1
  63. package/dist/types/ObservableAPI.d.ts +16 -0
  64. package/dist/types/ObservableAPI.js +282 -114
  65. package/dist/types/ObservableAPI.js.map +1 -1
  66. package/dist/types/PromiseAPI.d.ts +18 -0
  67. package/dist/types/PromiseAPI.js +86 -4
  68. package/dist/types/PromiseAPI.js.map +1 -1
  69. package/package.json +11 -6
package/AGENTS.md ADDED
@@ -0,0 +1,33 @@
1
+ # AGENTS.md
2
+
3
+ Notes for AI coding agents working with the DocSpring TypeScript SDK (`docspring-ts`), in this repository or
4
+ as a dependency of an app.
5
+
6
+ ## This code is generated
7
+
8
+ Every file here is generated from DocSpring's OpenAPI spec by
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 edit it or open pull requests that change it, and don't patch an installed copy: the next release
11
+ overwrites the change. Report bugs at https://github.com/DocSpring/docspring-typescript/issues or to support@docspring.com, and DocSpring fixes them in
12
+ the generator.
13
+
14
+ ## Where to look
15
+
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.
18
+ - [models/](https://github.com/DocSpring/docspring-typescript/tree/main/models): every model and its fields.
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 for every method.
21
+ - https://docspring.com/api-docs/v1/openapi.json: the OpenAPI spec this SDK is generated from.
22
+
23
+ ## Using it in an app
24
+
25
+ - Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET`. Keep them in the environment or a secret
26
+ store, never in code. Accounts in the EU region also need `DOCSPRING_REGION=EU`.
27
+ - Template IDs look like `tpl_...` and submission IDs like `sub_...`.
28
+ - Pass `test: true` when you generate PDFs during development: test PDFs are free and watermarked.
29
+ - Generating a PDF waits for it, for up to 95 seconds. For many PDFs or slow templates, set `wait` to false and use
30
+ webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/).
31
+ - Errors: 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`.
32
+ - Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v1 without a new
33
+ version. The model leaves out a response field added to the API after this release. An enum value added to the API after this release comes back as a string, even though the type lists only the values this release knows, so handle values you don't recognize.
package/README.md CHANGED
@@ -1,80 +1,173 @@
1
- ## docspring-ts@3.0.0
1
+ # DocSpring TypeScript SDK
2
2
 
3
- This generator creates TypeScript/JavaScript client that utilizes fetch-api.
3
+ The official TypeScript client for the [DocSpring API](https://docspring.com/docs/api/). DocSpring fills PDF
4
+ templates with your data, generates PDFs from HTML templates, combines PDFs and collects e-signatures.
4
5
 
5
- ### Building
6
+ [Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
7
+ [npm](https://www.npmjs.com/package/docspring-ts) · [Changelog](https://github.com/DocSpring/docspring-typescript/blob/main/CHANGELOG.md)
6
8
 
7
- To build and compile the typescript sources to javascript use:
8
- ```
9
- npm install
10
- npm run build
11
- ```
9
+ Version 3.2.0.
12
10
 
13
- ### Publishing
11
+ ## Install and configure
14
12
 
15
- First build the package then run ```npm publish```
13
+ Add docspring-ts to your package.json:
16
14
 
17
- ### Consuming
18
-
19
- Navigate to the folder of your consuming project and run one of the following commands.
15
+ ```bash
16
+ npm install docspring-ts --save
17
+ ```
20
18
 
21
- _published:_
19
+ Or with Yarn:
22
20
 
23
- ```
24
- npm install docspring-ts@3.0.0 --save
21
+ ```bash
22
+ yarn add docspring-ts
25
23
  ```
26
24
 
27
- _unPublished (not recommended):_
25
+ Configure authentication via environment variables:
28
26
 
29
- ```
30
- npm install PATH_TO_GENERATED_PACKAGE --save
27
+ ```bash
28
+ export DOCSPRING_TOKEN_ID="API_TOKEN_ID"
29
+ export DOCSPRING_TOKEN_SECRET="API_TOKEN_SECRET"
31
30
  ```
32
31
 
33
- ### Usage
32
+ You can also configure the region or host. The host takes priority over the region:
34
33
 
35
- Below code snippet shows exemplary usage of the configuration and the API based
36
- on the typical `PetStore` example used for OpenAPI.
34
+ ```bash
35
+ export DOCSPRING_REGION="US" # US or EU (defaults to US)
36
+ export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
37
+ ```
37
38
 
39
+ Initialize the DocSpring client with no arguments:
40
+
41
+ ```ts
42
+ import * as DocSpring from "docspring-ts";
43
+ const apiInstance = new DocSpring.Client();
38
44
  ```
39
- import * as your_api from 'your_api_package'
40
45
 
41
- // Covers all auth methods included in your OpenAPI yaml definition
42
- const authConfig: your_api.AuthMethodsConfiguration = {
43
- "api_key": "YOUR_API_KEY"
44
- }
46
+ Or provide credentials (and optionally a region or host) directly. A host (including `DOCSPRING_HOST`) is used before
47
+ a region:
45
48
 
46
- // Implements a simple middleware to modify requests before (`pre`) they are sent
47
- // and after (`post`) they have been received
48
- class Test implements your_api.Middleware {
49
- pre(context: your_api.RequestContext): Promise<your_api.RequestContext> {
50
- // Modify context here and return
51
- return Promise.resolve(context);
52
- }
49
+ ```ts
50
+ import * as DocSpring from "docspring-ts";
51
+ const apiInstance = new DocSpring.Client({
52
+ apiTokenId: "API_TOKEN_ID",
53
+ apiTokenSecret: "API_TOKEN_SECRET",
54
+ region: "EU",
55
+ });
56
+ ```
53
57
 
54
- post(context: your_api.ResponseContext): Promise<your_api.ResponseContext> {
55
- return Promise.resolve(context);
56
- }
58
+ ## Generate a PDF
57
59
 
58
- }
60
+ Fill a template with data (use your template's ID in place of `tpl_1234567890abcdef01`):
59
61
 
60
- // Create configuration parameter object
61
- const configurationParameters = {
62
- httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine
63
- baseServer: your_api.servers[0], // First server is default
64
- authMethods: authConfig, // No auth is default
65
- promiseMiddleware: [new Test()],
62
+ ```ts
63
+ const templateId = 'tpl_1234567890abcdef01'
64
+ const submission = {
65
+ data: {
66
+ first_name: 'John',
67
+ last_name: 'Smith',
68
+ phone_number: '+11234567890',
69
+ },
70
+ metadata: { foo: 123, bar: 'baz' },
66
71
  }
67
72
 
68
- // Convert to actual configuration
69
- const config = your_api.createConfiguration(configurationParameters);
70
-
71
- // Use configuration with your_api
72
- const api = new your_api.PetApi(config);
73
- your_api.Pet p = new your_api.Pet();
74
- p.name = "My new pet";
75
- p.photoUrls = [];
76
- p.tags = [];
77
- p.status = "available";
78
- Promise<your_api.Pet> createdPet = api.addPet(p);
73
+ const result = await apiInstance.generatePdf(templateId, submission)
79
74
 
75
+ console.log(result)
80
76
  ```
77
+
78
+ By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has its
79
+ `download_url`. Set `wait` to false to get a pending submission straight away.
80
+ [Sync vs. async processing](https://docspring.com/docs/api-guide/synchronous-requests/) covers the time limit, status
81
+ checks and webhooks.
82
+
83
+ ## Methods
84
+
85
+ [Client.md](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md) has each method's parameters and return type, and
86
+ [models/](https://github.com/DocSpring/docspring-typescript/tree/main/models) has the models. The [API reference](https://docspring.com/docs/api/) has
87
+ TypeScript code for every method.
88
+
89
+ | Method | Description |
90
+ | ------ | ----------- |
91
+ | [`addFieldsToTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#addfieldstotemplate) | Add new fields to a Template |
92
+ | [`batchGeneratePdfs`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#batchgeneratepdfs) | Generate multiple PDFs |
93
+ | [`combinePdfs`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#combinepdfs) | Merge submission PDFs, template PDFs, or custom files |
94
+ | [`copyTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#copytemplate) | Copy a template |
95
+ | [`createCustomFileFromUpload`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createcustomfilefromupload) | Create a new custom file from a cached S3 upload |
96
+ | [`createDataRequestEvent`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createdatarequestevent) | Create a new event for emailing a signee a request for signature |
97
+ | [`createDataRequestToken`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createdatarequesttoken) | Create a new data request token for form authentication |
98
+ | [`createFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createfolder) | Create a folder |
99
+ | [`createHtmlTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createhtmltemplate) | Create a new HTML template |
100
+ | [`createPdfTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createpdftemplate) | Create a new PDF template with a form POST file upload |
101
+ | [`createPdfTemplateFromUpload`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createpdftemplatefromupload) | Create a new PDF template from a cached S3 file upload |
102
+ | [`createWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#createwebhook) | Create a webhook |
103
+ | [`deleteFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#deletefolder) | Delete a folder |
104
+ | [`deleteTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#deletetemplate) | Delete a template |
105
+ | [`deleteWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#deletewebhook) | Delete a webhook |
106
+ | [`expireCombinedSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#expirecombinedsubmission) | Expire a combined submission |
107
+ | [`expireSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#expiresubmission) | Expire a PDF submission |
108
+ | [`generatePdf`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#generatepdf) | Generate a PDF |
109
+ | [`generatePreview`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#generatepreview) | Generate a preview PDF for partially completed data requests |
110
+ | [`getCombinedSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getcombinedsubmission) | Check the status of a combined submission (merged PDFs) |
111
+ | [`getDataRequest`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getdatarequest) | Look up a submission data request |
112
+ | [`getFullTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getfulltemplate) | Fetch the full attributes for a PDF template |
113
+ | [`getPresignUrl`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getpresignurl) | Get a presigned S3 URL for direct file upload |
114
+ | [`getSubmission`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getsubmission) | Check the status of a PDF |
115
+ | [`getSubmissionBatch`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getsubmissionbatch) | Check the status of a submission batch job |
116
+ | [`getTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#gettemplate) | Check the status of an uploaded template |
117
+ | [`getTemplateModelCode`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#gettemplatemodelcode) | Generate typed model code for a template |
118
+ | [`getTemplateSchema`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#gettemplateschema) | Fetch the JSON schema for a template |
119
+ | [`getWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#getwebhook) | Get a webhook |
120
+ | [`listCombinedSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listcombinedsubmissions) | Get a list of all combined submissions |
121
+ | [`listFolders`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listfolders) | Get a list of all folders |
122
+ | [`listSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listsubmissions) | List all submissions |
123
+ | [`listTemplates`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listtemplates) | Get a list of all templates |
124
+ | [`listTemplateSubmissions`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listtemplatesubmissions) | List all submissions for a given template |
125
+ | [`listWebhooks`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#listwebhooks) | Get a list of all webhooks |
126
+ | [`moveFolderToFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#movefoldertofolder) | Move a folder |
127
+ | [`moveTemplateToFolder`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#movetemplatetofolder) | Move Template to folder |
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
+ | [`updateDataRequest`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatedatarequest) | Update a submission data request |
133
+ | [`updateTemplate`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatetemplate) | Update a Template |
134
+ | [`updateTemplateDocument`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatetemplatedocument) | Update a template's document with a form POST file upload |
135
+ | [`updateTemplateDocumentFromUpload`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatetemplatedocumentfromupload) | Update a template's document with a cached S3 file upload |
136
+ | [`updateWebhook`](https://github.com/DocSpring/docspring-typescript/blob/main/Client.md#updatewebhook) | Update a webhook |
137
+
138
+ ## Errors
139
+
140
+ 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
+
142
+ ## API changes
143
+
144
+ DocSpring adds fields and enum values to API v1 without releasing a new API version. Changes that would break
145
+ existing code, such as removing or renaming a field, go in a new API version
146
+ ([API changes](https://docspring.com/docs/api-guide/openapi-schema/#api-changes)). So this SDK keeps working with
147
+ responses that are newer than it is:
148
+
149
+ - The model leaves out a response field added to the API after this release.
150
+ - An enum value added to the API after this release comes back as a string, even though the type lists only the values this release knows, so handle values you don't recognize.
151
+
152
+ Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-typescript/blob/main/CHANGELOG.md) lists
153
+ what each release adds.
154
+
155
+ ## About this SDK
156
+
157
+ This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/v1/openapi.json) with
158
+ [DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.16.0.
159
+ The fork changes the TypeScript generator:
160
+
161
+ - `nameMappings` apply to property names, so the JSON schema model's `$id` becomes `schema_id` instead of clashing with `id`.
162
+
163
+ On top of the generated code, we add:
164
+
165
+ - A client constructor that reads your credentials, region and host from the environment.
166
+
167
+ Because the code is generated, we can't merge pull requests that change it. Please
168
+ [open an issue](https://github.com/DocSpring/docspring-typescript/issues) or email [support@docspring.com](mailto:support@docspring.com) instead, and
169
+ we'll fix it in the generator. [AGENTS.md](https://github.com/DocSpring/docspring-typescript/blob/main/AGENTS.md) is a short guide for AI coding agents.
170
+
171
+ ## License
172
+
173
+ MIT. See [LICENSE](https://github.com/DocSpring/docspring-typescript/blob/main/LICENSE).
@@ -18,6 +18,7 @@ import { CreateSubmissionDataRequestEventResponse } from '../models/CreateSubmis
18
18
  import { CreateSubmissionDataRequestResponse } from '../models/CreateSubmissionDataRequestResponse';
19
19
  import { CreateSubmissionDataRequestTokenResponse } from '../models/CreateSubmissionDataRequestTokenResponse';
20
20
  import { CreateSubmissionResponse } from '../models/CreateSubmissionResponse';
21
+ import { CreateWebhookData } from '../models/CreateWebhookData';
21
22
  import { Folder } from '../models/Folder';
22
23
  import { JsonSchema } from '../models/JsonSchema';
23
24
  import { ListSubmissionsResponse } from '../models/ListSubmissionsResponse';
@@ -36,12 +37,15 @@ import { SuccessMultipleErrorsResponse } from '../models/SuccessMultipleErrorsRe
36
37
  import { Template } from '../models/Template';
37
38
  import { TemplateAddFieldsResponse } from '../models/TemplateAddFieldsResponse';
38
39
  import { TemplateDeleteResponse } from '../models/TemplateDeleteResponse';
40
+ import { TemplateModelCodeResponse } from '../models/TemplateModelCodeResponse';
39
41
  import { TemplatePreview } from '../models/TemplatePreview';
40
42
  import { TemplatePublishVersionResponse } from '../models/TemplatePublishVersionResponse';
41
43
  import { UpdateHtmlTemplate } from '../models/UpdateHtmlTemplate';
42
44
  import { UpdatePdfTemplate } from '../models/UpdatePdfTemplate';
43
45
  import { UpdateSubmissionDataRequestData } from '../models/UpdateSubmissionDataRequestData';
46
+ import { UpdateWebhookData } from '../models/UpdateWebhookData';
44
47
  import { UploadPresignResponse } from '../models/UploadPresignResponse';
48
+ import { Webhook } from '../models/Webhook';
45
49
  export declare class ClientRequestFactory extends BaseAPIRequestFactory {
46
50
  addFieldsToTemplate(templateId: string, data: AddFieldsData, _options?: Configuration): Promise<RequestContext>;
47
51
  batchGeneratePdfs(data: SubmissionBatchData, wait?: boolean, _options?: Configuration): Promise<RequestContext>;
@@ -54,8 +58,10 @@ export declare class ClientRequestFactory extends BaseAPIRequestFactory {
54
58
  createHtmlTemplate(data: CreateHtmlTemplate, _options?: Configuration): Promise<RequestContext>;
55
59
  createPdfTemplate(templateDocument: HttpFile, templateName: string, wait?: boolean, templateDescription?: string, templateParentFolderId?: string, _options?: Configuration): Promise<RequestContext>;
56
60
  createPdfTemplateFromUpload(data: CreatePdfTemplate, _options?: Configuration): Promise<RequestContext>;
61
+ createWebhook(data: CreateWebhookData, _options?: Configuration): Promise<RequestContext>;
57
62
  deleteFolder(folderId: string, _options?: Configuration): Promise<RequestContext>;
58
63
  deleteTemplate(templateId: string, version?: string, _options?: Configuration): Promise<RequestContext>;
64
+ deleteWebhook(webhookId: string, _options?: Configuration): Promise<RequestContext>;
59
65
  expireCombinedSubmission(combinedSubmissionId: string, _options?: Configuration): Promise<RequestContext>;
60
66
  expireSubmission(submissionId: string, _options?: Configuration): Promise<RequestContext>;
61
67
  generatePdf(templateId: string, submission: CreatePdfSubmissionData, wait?: boolean, _options?: Configuration): Promise<RequestContext>;
@@ -67,12 +73,15 @@ export declare class ClientRequestFactory extends BaseAPIRequestFactory {
67
73
  getSubmission(submissionId: string, includeData?: boolean, _options?: Configuration): Promise<RequestContext>;
68
74
  getSubmissionBatch(submissionBatchId: string, includeSubmissions?: boolean, _options?: Configuration): Promise<RequestContext>;
69
75
  getTemplate(templateId: string, _options?: Configuration): Promise<RequestContext>;
76
+ getTemplateModelCode(templateId: string, lang: 'typescript' | 'javascript' | 'ruby' | 'python' | 'php' | 'java' | 'csharp' | 'elixir' | 'go', _options?: Configuration): Promise<RequestContext>;
70
77
  getTemplateSchema(templateId: string, _options?: Configuration): Promise<RequestContext>;
78
+ getWebhook(webhookId: string, _options?: Configuration): Promise<RequestContext>;
71
79
  listCombinedSubmissions(page?: number, perPage?: number, _options?: Configuration): Promise<RequestContext>;
72
80
  listFolders(parentFolderId?: string, _options?: Configuration): Promise<RequestContext>;
73
81
  listSubmissions(cursor?: string, limit?: number, createdAfter?: string, createdBefore?: string, type?: string, includeData?: boolean, _options?: Configuration): Promise<RequestContext>;
74
82
  listTemplateSubmissions(templateId: string, cursor?: string, limit?: number, createdAfter?: string, createdBefore?: string, type?: string, includeData?: boolean, _options?: Configuration): Promise<RequestContext>;
75
83
  listTemplates(query?: string, parentFolderId?: string, page?: number, perPage?: number, _options?: Configuration): Promise<RequestContext>;
84
+ listWebhooks(page?: number, perPage?: number, eventType?: string, mode?: string, templateId?: string, folderId?: string, apiTokenId?: string, _options?: Configuration): Promise<RequestContext>;
76
85
  moveFolderToFolder(folderId: string, data: MoveFolderData, _options?: Configuration): Promise<RequestContext>;
77
86
  moveTemplateToFolder(templateId: string, data: MoveTemplateData, _options?: Configuration): Promise<RequestContext>;
78
87
  publishTemplateVersion(templateId: string, data: PublishVersionData, _options?: Configuration): Promise<RequestContext>;
@@ -83,6 +92,7 @@ export declare class ClientRequestFactory extends BaseAPIRequestFactory {
83
92
  updateTemplate(templateId: string, data: UpdateHtmlTemplate, _options?: Configuration): Promise<RequestContext>;
84
93
  updateTemplateDocument(templateId: string, templateDocument: HttpFile, templateName?: string, _options?: Configuration): Promise<RequestContext>;
85
94
  updateTemplateDocumentFromUpload(templateId: string, data: UpdatePdfTemplate, _options?: Configuration): Promise<RequestContext>;
95
+ updateWebhook(webhookId: string, data: UpdateWebhookData, _options?: Configuration): Promise<RequestContext>;
86
96
  }
87
97
  export declare class ClientResponseProcessor {
88
98
  addFieldsToTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplateAddFieldsResponse>>;
@@ -96,8 +106,10 @@ export declare class ClientResponseProcessor {
96
106
  createHtmlTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
97
107
  createPdfTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
98
108
  createPdfTemplateFromUploadWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
109
+ createWebhookWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Webhook>>;
99
110
  deleteFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Folder>>;
100
111
  deleteTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplateDeleteResponse>>;
112
+ deleteWebhookWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Webhook>>;
101
113
  expireCombinedSubmissionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CombinedSubmission>>;
102
114
  expireSubmissionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SubmissionPreview>>;
103
115
  generatePdfWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateSubmissionResponse>>;
@@ -109,12 +121,15 @@ export declare class ClientResponseProcessor {
109
121
  getSubmissionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Submission>>;
110
122
  getSubmissionBatchWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SubmissionBatchWithSubmissions>>;
111
123
  getTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
124
+ getTemplateModelCodeWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplateModelCodeResponse>>;
112
125
  getTemplateSchemaWithHttpInfo(response: ResponseContext): Promise<HttpInfo<JsonSchema>>;
126
+ getWebhookWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Webhook>>;
113
127
  listCombinedSubmissionsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<CombinedSubmission>>>;
114
128
  listFoldersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<Folder>>>;
115
129
  listSubmissionsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListSubmissionsResponse>>;
116
130
  listTemplateSubmissionsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListSubmissionsResponse>>;
117
131
  listTemplatesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<TemplatePreview>>>;
132
+ listWebhooksWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<Webhook>>>;
118
133
  moveFolderToFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Folder>>;
119
134
  moveTemplateToFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
120
135
  publishTemplateVersionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePublishVersionResponse>>;
@@ -125,4 +140,5 @@ export declare class ClientResponseProcessor {
125
140
  updateTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SuccessMultipleErrorsResponse>>;
126
141
  updateTemplateDocumentWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SuccessMultipleErrorsResponse>>;
127
142
  updateTemplateDocumentFromUploadWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SuccessMultipleErrorsResponse>>;
143
+ updateWebhookWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Webhook>>;
128
144
  }