@anvilco/types 0.2.2 → 0.2.3
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/dist/index.d.cts +117 -1
- package/dist/index.d.ts +117 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -64,6 +64,31 @@ interface paths {
|
|
|
64
64
|
patch?: never;
|
|
65
65
|
trace?: never;
|
|
66
66
|
};
|
|
67
|
+
'/api/v1/fill/{integrationType}/{castEid}.pdf': {
|
|
68
|
+
parameters: {
|
|
69
|
+
query?: never;
|
|
70
|
+
header?: never;
|
|
71
|
+
path?: never;
|
|
72
|
+
cookie?: never;
|
|
73
|
+
};
|
|
74
|
+
get?: never;
|
|
75
|
+
put?: never;
|
|
76
|
+
/**
|
|
77
|
+
* Fill a PDF template from integration records
|
|
78
|
+
* @description Fills a PDF template (Cast) built from an integration with values read
|
|
79
|
+
* from that integration's records, and returns the same PDF or signed URL
|
|
80
|
+
* as `/api/v1/fill/{castEid}.pdf`. Accepts every option that endpoint does
|
|
81
|
+
* except `data`.
|
|
82
|
+
*
|
|
83
|
+
* Only `hubspot` is supported, and one record per object type.
|
|
84
|
+
*/
|
|
85
|
+
post: operations['fillPdfFromIntegration'];
|
|
86
|
+
delete?: never;
|
|
87
|
+
options?: never;
|
|
88
|
+
head?: never;
|
|
89
|
+
patch?: never;
|
|
90
|
+
trace?: never;
|
|
91
|
+
};
|
|
67
92
|
'/api/v1/generate-pdf': {
|
|
68
93
|
parameters: {
|
|
69
94
|
query?: never;
|
|
@@ -287,6 +312,22 @@ interface components {
|
|
|
287
312
|
*/
|
|
288
313
|
outputFormat: 'pdf' | 'url';
|
|
289
314
|
};
|
|
315
|
+
FillPdfFromIntegrationRequest: {
|
|
316
|
+
/**
|
|
317
|
+
* @description Record IDs keyed by the template's object types, e.g.
|
|
318
|
+
* `{ "contacts": "111", "companies": "999" }`. Each type takes one ID
|
|
319
|
+
* as a numeric string, or a list holding one.
|
|
320
|
+
*/
|
|
321
|
+
records: {
|
|
322
|
+
[key: string]: string | string[];
|
|
323
|
+
};
|
|
324
|
+
title?: string;
|
|
325
|
+
/**
|
|
326
|
+
* @default pdf
|
|
327
|
+
* @enum {string}
|
|
328
|
+
*/
|
|
329
|
+
outputFormat: 'pdf' | 'url';
|
|
330
|
+
};
|
|
290
331
|
/** @description Custom page dimensions and margins for the generated PDF. */
|
|
291
332
|
PageOptions: {
|
|
292
333
|
/** @description Page width with unit (e.g. `8.5in`, `210mm`). */
|
|
@@ -473,7 +514,7 @@ interface operations {
|
|
|
473
514
|
};
|
|
474
515
|
content?: never;
|
|
475
516
|
};
|
|
476
|
-
/** @description
|
|
517
|
+
/** @description Not found. No document group exists with the given EID, the authenticated user lacks access to it, or its zip is missing from storage. */
|
|
477
518
|
404: {
|
|
478
519
|
headers: {
|
|
479
520
|
[name: string]: unknown;
|
|
@@ -552,6 +593,81 @@ interface operations {
|
|
|
552
593
|
};
|
|
553
594
|
};
|
|
554
595
|
};
|
|
596
|
+
fillPdfFromIntegration: {
|
|
597
|
+
parameters: {
|
|
598
|
+
query?: {
|
|
599
|
+
/** @description The version number of the template to use. Defaults to the latest published version. */
|
|
600
|
+
versionNumber?: number;
|
|
601
|
+
};
|
|
602
|
+
header?: never;
|
|
603
|
+
path: {
|
|
604
|
+
/** @description The integration the template was built from. */
|
|
605
|
+
integrationType: 'hubspot';
|
|
606
|
+
/** @description The EID of the PDF template (Cast) to fill. */
|
|
607
|
+
castEid: string;
|
|
608
|
+
};
|
|
609
|
+
cookie?: never;
|
|
610
|
+
};
|
|
611
|
+
requestBody: {
|
|
612
|
+
content: {
|
|
613
|
+
'application/json': components['schemas']['FillPdfFromIntegrationRequest'];
|
|
614
|
+
'multipart/form-data': components['schemas']['FillPdfFromIntegrationRequest'];
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
responses: {
|
|
618
|
+
/** @description The filled PDF document. */
|
|
619
|
+
200: {
|
|
620
|
+
headers: {
|
|
621
|
+
[name: string]: unknown;
|
|
622
|
+
};
|
|
623
|
+
content: {
|
|
624
|
+
'application/pdf': string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
/** @description Validation error, the template wasn't built from this integration, or the integration has no record with a given ID. */
|
|
628
|
+
400: {
|
|
629
|
+
headers: {
|
|
630
|
+
[name: string]: unknown;
|
|
631
|
+
};
|
|
632
|
+
content?: never;
|
|
633
|
+
};
|
|
634
|
+
/** @description Authentication required. */
|
|
635
|
+
401: {
|
|
636
|
+
headers: {
|
|
637
|
+
[name: string]: unknown;
|
|
638
|
+
};
|
|
639
|
+
content?: never;
|
|
640
|
+
};
|
|
641
|
+
/** @description No edit access to the template. */
|
|
642
|
+
403: {
|
|
643
|
+
headers: {
|
|
644
|
+
[name: string]: unknown;
|
|
645
|
+
};
|
|
646
|
+
content?: never;
|
|
647
|
+
};
|
|
648
|
+
/** @description Template not found. */
|
|
649
|
+
404: {
|
|
650
|
+
headers: {
|
|
651
|
+
[name: string]: unknown;
|
|
652
|
+
};
|
|
653
|
+
content?: never;
|
|
654
|
+
};
|
|
655
|
+
/** @description Unsupported media type. */
|
|
656
|
+
415: {
|
|
657
|
+
headers: {
|
|
658
|
+
[name: string]: unknown;
|
|
659
|
+
};
|
|
660
|
+
content?: never;
|
|
661
|
+
};
|
|
662
|
+
/** @description Concurrency limit exceeded. */
|
|
663
|
+
429: {
|
|
664
|
+
headers: {
|
|
665
|
+
[name: string]: unknown;
|
|
666
|
+
};
|
|
667
|
+
content?: never;
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
};
|
|
555
671
|
generatePdf: {
|
|
556
672
|
parameters: {
|
|
557
673
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,31 @@ interface paths {
|
|
|
64
64
|
patch?: never;
|
|
65
65
|
trace?: never;
|
|
66
66
|
};
|
|
67
|
+
'/api/v1/fill/{integrationType}/{castEid}.pdf': {
|
|
68
|
+
parameters: {
|
|
69
|
+
query?: never;
|
|
70
|
+
header?: never;
|
|
71
|
+
path?: never;
|
|
72
|
+
cookie?: never;
|
|
73
|
+
};
|
|
74
|
+
get?: never;
|
|
75
|
+
put?: never;
|
|
76
|
+
/**
|
|
77
|
+
* Fill a PDF template from integration records
|
|
78
|
+
* @description Fills a PDF template (Cast) built from an integration with values read
|
|
79
|
+
* from that integration's records, and returns the same PDF or signed URL
|
|
80
|
+
* as `/api/v1/fill/{castEid}.pdf`. Accepts every option that endpoint does
|
|
81
|
+
* except `data`.
|
|
82
|
+
*
|
|
83
|
+
* Only `hubspot` is supported, and one record per object type.
|
|
84
|
+
*/
|
|
85
|
+
post: operations['fillPdfFromIntegration'];
|
|
86
|
+
delete?: never;
|
|
87
|
+
options?: never;
|
|
88
|
+
head?: never;
|
|
89
|
+
patch?: never;
|
|
90
|
+
trace?: never;
|
|
91
|
+
};
|
|
67
92
|
'/api/v1/generate-pdf': {
|
|
68
93
|
parameters: {
|
|
69
94
|
query?: never;
|
|
@@ -287,6 +312,22 @@ interface components {
|
|
|
287
312
|
*/
|
|
288
313
|
outputFormat: 'pdf' | 'url';
|
|
289
314
|
};
|
|
315
|
+
FillPdfFromIntegrationRequest: {
|
|
316
|
+
/**
|
|
317
|
+
* @description Record IDs keyed by the template's object types, e.g.
|
|
318
|
+
* `{ "contacts": "111", "companies": "999" }`. Each type takes one ID
|
|
319
|
+
* as a numeric string, or a list holding one.
|
|
320
|
+
*/
|
|
321
|
+
records: {
|
|
322
|
+
[key: string]: string | string[];
|
|
323
|
+
};
|
|
324
|
+
title?: string;
|
|
325
|
+
/**
|
|
326
|
+
* @default pdf
|
|
327
|
+
* @enum {string}
|
|
328
|
+
*/
|
|
329
|
+
outputFormat: 'pdf' | 'url';
|
|
330
|
+
};
|
|
290
331
|
/** @description Custom page dimensions and margins for the generated PDF. */
|
|
291
332
|
PageOptions: {
|
|
292
333
|
/** @description Page width with unit (e.g. `8.5in`, `210mm`). */
|
|
@@ -473,7 +514,7 @@ interface operations {
|
|
|
473
514
|
};
|
|
474
515
|
content?: never;
|
|
475
516
|
};
|
|
476
|
-
/** @description
|
|
517
|
+
/** @description Not found. No document group exists with the given EID, the authenticated user lacks access to it, or its zip is missing from storage. */
|
|
477
518
|
404: {
|
|
478
519
|
headers: {
|
|
479
520
|
[name: string]: unknown;
|
|
@@ -552,6 +593,81 @@ interface operations {
|
|
|
552
593
|
};
|
|
553
594
|
};
|
|
554
595
|
};
|
|
596
|
+
fillPdfFromIntegration: {
|
|
597
|
+
parameters: {
|
|
598
|
+
query?: {
|
|
599
|
+
/** @description The version number of the template to use. Defaults to the latest published version. */
|
|
600
|
+
versionNumber?: number;
|
|
601
|
+
};
|
|
602
|
+
header?: never;
|
|
603
|
+
path: {
|
|
604
|
+
/** @description The integration the template was built from. */
|
|
605
|
+
integrationType: 'hubspot';
|
|
606
|
+
/** @description The EID of the PDF template (Cast) to fill. */
|
|
607
|
+
castEid: string;
|
|
608
|
+
};
|
|
609
|
+
cookie?: never;
|
|
610
|
+
};
|
|
611
|
+
requestBody: {
|
|
612
|
+
content: {
|
|
613
|
+
'application/json': components['schemas']['FillPdfFromIntegrationRequest'];
|
|
614
|
+
'multipart/form-data': components['schemas']['FillPdfFromIntegrationRequest'];
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
responses: {
|
|
618
|
+
/** @description The filled PDF document. */
|
|
619
|
+
200: {
|
|
620
|
+
headers: {
|
|
621
|
+
[name: string]: unknown;
|
|
622
|
+
};
|
|
623
|
+
content: {
|
|
624
|
+
'application/pdf': string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
/** @description Validation error, the template wasn't built from this integration, or the integration has no record with a given ID. */
|
|
628
|
+
400: {
|
|
629
|
+
headers: {
|
|
630
|
+
[name: string]: unknown;
|
|
631
|
+
};
|
|
632
|
+
content?: never;
|
|
633
|
+
};
|
|
634
|
+
/** @description Authentication required. */
|
|
635
|
+
401: {
|
|
636
|
+
headers: {
|
|
637
|
+
[name: string]: unknown;
|
|
638
|
+
};
|
|
639
|
+
content?: never;
|
|
640
|
+
};
|
|
641
|
+
/** @description No edit access to the template. */
|
|
642
|
+
403: {
|
|
643
|
+
headers: {
|
|
644
|
+
[name: string]: unknown;
|
|
645
|
+
};
|
|
646
|
+
content?: never;
|
|
647
|
+
};
|
|
648
|
+
/** @description Template not found. */
|
|
649
|
+
404: {
|
|
650
|
+
headers: {
|
|
651
|
+
[name: string]: unknown;
|
|
652
|
+
};
|
|
653
|
+
content?: never;
|
|
654
|
+
};
|
|
655
|
+
/** @description Unsupported media type. */
|
|
656
|
+
415: {
|
|
657
|
+
headers: {
|
|
658
|
+
[name: string]: unknown;
|
|
659
|
+
};
|
|
660
|
+
content?: never;
|
|
661
|
+
};
|
|
662
|
+
/** @description Concurrency limit exceeded. */
|
|
663
|
+
429: {
|
|
664
|
+
headers: {
|
|
665
|
+
[name: string]: unknown;
|
|
666
|
+
};
|
|
667
|
+
content?: never;
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
};
|
|
555
671
|
generatePdf: {
|
|
556
672
|
parameters: {
|
|
557
673
|
query?: never;
|