postgrid-node 0.3.0 → 0.4.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 (238) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/client.d.mts +8 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +8 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -1
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +60 -0
  11. package/core/pagination.d.mts.map +1 -0
  12. package/core/pagination.d.ts +60 -0
  13. package/core/pagination.d.ts.map +1 -0
  14. package/core/pagination.js +107 -0
  15. package/core/pagination.js.map +1 -0
  16. package/core/pagination.mjs +101 -0
  17. package/core/pagination.mjs.map +1 -0
  18. package/index.d.mts +1 -0
  19. package/index.d.mts.map +1 -1
  20. package/index.d.ts +1 -0
  21. package/index.d.ts.map +1 -1
  22. package/index.js +3 -1
  23. package/index.js.map +1 -1
  24. package/index.mjs +1 -0
  25. package/index.mjs.map +1 -1
  26. package/internal/tslib.js +17 -17
  27. package/package.json +11 -1
  28. package/pagination.d.mts +2 -0
  29. package/pagination.d.mts.map +1 -0
  30. package/pagination.d.ts +2 -0
  31. package/pagination.d.ts.map +1 -0
  32. package/pagination.js +6 -0
  33. package/pagination.js.map +1 -0
  34. package/pagination.mjs +2 -0
  35. package/pagination.mjs.map +1 -0
  36. package/resources/index.d.mts +1 -1
  37. package/resources/index.d.mts.map +1 -1
  38. package/resources/index.d.ts +1 -1
  39. package/resources/index.d.ts.map +1 -1
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +1 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/print-mail/bank-accounts.d.mts +9 -14
  44. package/resources/print-mail/bank-accounts.d.mts.map +1 -1
  45. package/resources/print-mail/bank-accounts.d.ts +9 -14
  46. package/resources/print-mail/bank-accounts.d.ts.map +1 -1
  47. package/resources/print-mail/bank-accounts.js +9 -3
  48. package/resources/print-mail/bank-accounts.js.map +1 -1
  49. package/resources/print-mail/bank-accounts.mjs +9 -3
  50. package/resources/print-mail/bank-accounts.mjs.map +1 -1
  51. package/resources/print-mail/boxes.d.mts +14 -566
  52. package/resources/print-mail/boxes.d.mts.map +1 -1
  53. package/resources/print-mail/boxes.d.ts +14 -566
  54. package/resources/print-mail/boxes.d.ts.map +1 -1
  55. package/resources/print-mail/boxes.js +6 -2
  56. package/resources/print-mail/boxes.js.map +1 -1
  57. package/resources/print-mail/boxes.mjs +6 -2
  58. package/resources/print-mail/boxes.mjs.map +1 -1
  59. package/resources/print-mail/campaigns.d.mts +9 -16
  60. package/resources/print-mail/campaigns.d.mts.map +1 -1
  61. package/resources/print-mail/campaigns.d.ts +9 -16
  62. package/resources/print-mail/campaigns.d.ts.map +1 -1
  63. package/resources/print-mail/campaigns.js +6 -2
  64. package/resources/print-mail/campaigns.js.map +1 -1
  65. package/resources/print-mail/campaigns.mjs +6 -2
  66. package/resources/print-mail/campaigns.mjs.map +1 -1
  67. package/resources/print-mail/cheques.d.mts +13 -426
  68. package/resources/print-mail/cheques.d.mts.map +1 -1
  69. package/resources/print-mail/cheques.d.ts +13 -426
  70. package/resources/print-mail/cheques.d.ts.map +1 -1
  71. package/resources/print-mail/cheques.js +6 -2
  72. package/resources/print-mail/cheques.js.map +1 -1
  73. package/resources/print-mail/cheques.mjs +6 -2
  74. package/resources/print-mail/cheques.mjs.map +1 -1
  75. package/resources/print-mail/contacts.d.mts +11 -152
  76. package/resources/print-mail/contacts.d.mts.map +1 -1
  77. package/resources/print-mail/contacts.d.ts +11 -152
  78. package/resources/print-mail/contacts.d.ts.map +1 -1
  79. package/resources/print-mail/contacts.js +6 -2
  80. package/resources/print-mail/contacts.js.map +1 -1
  81. package/resources/print-mail/contacts.mjs +6 -2
  82. package/resources/print-mail/contacts.mjs.map +1 -1
  83. package/resources/print-mail/index.d.mts +14 -14
  84. package/resources/print-mail/index.d.mts.map +1 -1
  85. package/resources/print-mail/index.d.ts +14 -14
  86. package/resources/print-mail/index.d.ts.map +1 -1
  87. package/resources/print-mail/index.js.map +1 -1
  88. package/resources/print-mail/index.mjs.map +1 -1
  89. package/resources/print-mail/letters.d.mts +14 -565
  90. package/resources/print-mail/letters.d.mts.map +1 -1
  91. package/resources/print-mail/letters.d.ts +14 -565
  92. package/resources/print-mail/letters.d.ts.map +1 -1
  93. package/resources/print-mail/letters.js +6 -2
  94. package/resources/print-mail/letters.js.map +1 -1
  95. package/resources/print-mail/letters.mjs +6 -2
  96. package/resources/print-mail/letters.mjs.map +1 -1
  97. package/resources/print-mail/mailing-list-imports.d.mts +9 -17
  98. package/resources/print-mail/mailing-list-imports.d.mts.map +1 -1
  99. package/resources/print-mail/mailing-list-imports.d.ts +9 -17
  100. package/resources/print-mail/mailing-list-imports.d.ts.map +1 -1
  101. package/resources/print-mail/mailing-list-imports.js +6 -3
  102. package/resources/print-mail/mailing-list-imports.js.map +1 -1
  103. package/resources/print-mail/mailing-list-imports.mjs +6 -3
  104. package/resources/print-mail/mailing-list-imports.mjs.map +1 -1
  105. package/resources/print-mail/mailing-lists.d.mts +9 -17
  106. package/resources/print-mail/mailing-lists.d.mts.map +1 -1
  107. package/resources/print-mail/mailing-lists.d.ts +9 -17
  108. package/resources/print-mail/mailing-lists.d.ts.map +1 -1
  109. package/resources/print-mail/mailing-lists.js +9 -3
  110. package/resources/print-mail/mailing-lists.js.map +1 -1
  111. package/resources/print-mail/mailing-lists.mjs +9 -3
  112. package/resources/print-mail/mailing-lists.mjs.map +1 -1
  113. package/resources/print-mail/order-profiles/cheques.d.mts +80 -90
  114. package/resources/print-mail/order-profiles/cheques.d.mts.map +1 -1
  115. package/resources/print-mail/order-profiles/cheques.d.ts +80 -90
  116. package/resources/print-mail/order-profiles/cheques.d.ts.map +1 -1
  117. package/resources/print-mail/order-profiles/cheques.js +9 -3
  118. package/resources/print-mail/order-profiles/cheques.js.map +1 -1
  119. package/resources/print-mail/order-profiles/cheques.mjs +9 -3
  120. package/resources/print-mail/order-profiles/cheques.mjs.map +1 -1
  121. package/resources/print-mail/order-profiles/index.d.mts +4 -4
  122. package/resources/print-mail/order-profiles/index.d.mts.map +1 -1
  123. package/resources/print-mail/order-profiles/index.d.ts +4 -4
  124. package/resources/print-mail/order-profiles/index.d.ts.map +1 -1
  125. package/resources/print-mail/order-profiles/index.js.map +1 -1
  126. package/resources/print-mail/order-profiles/index.mjs.map +1 -1
  127. package/resources/print-mail/order-profiles/letters.d.mts +9 -17
  128. package/resources/print-mail/order-profiles/letters.d.mts.map +1 -1
  129. package/resources/print-mail/order-profiles/letters.d.ts +9 -17
  130. package/resources/print-mail/order-profiles/letters.d.ts.map +1 -1
  131. package/resources/print-mail/order-profiles/letters.js +9 -3
  132. package/resources/print-mail/order-profiles/letters.js.map +1 -1
  133. package/resources/print-mail/order-profiles/letters.mjs +9 -3
  134. package/resources/print-mail/order-profiles/letters.mjs.map +1 -1
  135. package/resources/print-mail/order-profiles/order-profiles.d.mts +8 -8
  136. package/resources/print-mail/order-profiles/order-profiles.d.mts.map +1 -1
  137. package/resources/print-mail/order-profiles/order-profiles.d.ts +8 -8
  138. package/resources/print-mail/order-profiles/order-profiles.d.ts.map +1 -1
  139. package/resources/print-mail/order-profiles/order-profiles.js.map +1 -1
  140. package/resources/print-mail/order-profiles/order-profiles.mjs.map +1 -1
  141. package/resources/print-mail/order-profiles/postcards.d.mts +9 -17
  142. package/resources/print-mail/order-profiles/postcards.d.mts.map +1 -1
  143. package/resources/print-mail/order-profiles/postcards.d.ts +9 -17
  144. package/resources/print-mail/order-profiles/postcards.d.ts.map +1 -1
  145. package/resources/print-mail/order-profiles/postcards.js +9 -3
  146. package/resources/print-mail/order-profiles/postcards.js.map +1 -1
  147. package/resources/print-mail/order-profiles/postcards.mjs +9 -3
  148. package/resources/print-mail/order-profiles/postcards.mjs.map +1 -1
  149. package/resources/print-mail/order-profiles/self-mailers.d.mts +9 -17
  150. package/resources/print-mail/order-profiles/self-mailers.d.mts.map +1 -1
  151. package/resources/print-mail/order-profiles/self-mailers.d.ts +9 -17
  152. package/resources/print-mail/order-profiles/self-mailers.d.ts.map +1 -1
  153. package/resources/print-mail/order-profiles/self-mailers.js +6 -3
  154. package/resources/print-mail/order-profiles/self-mailers.js.map +1 -1
  155. package/resources/print-mail/order-profiles/self-mailers.mjs +6 -3
  156. package/resources/print-mail/order-profiles/self-mailers.mjs.map +1 -1
  157. package/resources/print-mail/postcards.d.mts +16 -841
  158. package/resources/print-mail/postcards.d.mts.map +1 -1
  159. package/resources/print-mail/postcards.d.ts +16 -841
  160. package/resources/print-mail/postcards.d.ts.map +1 -1
  161. package/resources/print-mail/postcards.js +6 -2
  162. package/resources/print-mail/postcards.js.map +1 -1
  163. package/resources/print-mail/postcards.mjs +6 -2
  164. package/resources/print-mail/postcards.mjs.map +1 -1
  165. package/resources/print-mail/print-mail.d.mts +163 -26
  166. package/resources/print-mail/print-mail.d.mts.map +1 -1
  167. package/resources/print-mail/print-mail.d.ts +163 -26
  168. package/resources/print-mail/print-mail.d.ts.map +1 -1
  169. package/resources/print-mail/print-mail.js.map +1 -1
  170. package/resources/print-mail/print-mail.mjs.map +1 -1
  171. package/resources/print-mail/reports/index.d.mts +1 -1
  172. package/resources/print-mail/reports/index.d.mts.map +1 -1
  173. package/resources/print-mail/reports/index.d.ts +1 -1
  174. package/resources/print-mail/reports/index.d.ts.map +1 -1
  175. package/resources/print-mail/reports/reports.d.mts +9 -16
  176. package/resources/print-mail/reports/reports.d.mts.map +1 -1
  177. package/resources/print-mail/reports/reports.d.ts +9 -16
  178. package/resources/print-mail/reports/reports.d.ts.map +1 -1
  179. package/resources/print-mail/reports/reports.js +6 -2
  180. package/resources/print-mail/reports/reports.js.map +1 -1
  181. package/resources/print-mail/reports/reports.mjs +6 -2
  182. package/resources/print-mail/reports/reports.mjs.map +1 -1
  183. package/resources/print-mail/self-mailers.d.mts +16 -842
  184. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  185. package/resources/print-mail/self-mailers.d.ts +16 -842
  186. package/resources/print-mail/self-mailers.d.ts.map +1 -1
  187. package/resources/print-mail/self-mailers.js +9 -3
  188. package/resources/print-mail/self-mailers.js.map +1 -1
  189. package/resources/print-mail/self-mailers.mjs +9 -3
  190. package/resources/print-mail/self-mailers.mjs.map +1 -1
  191. package/resources/print-mail/sub-organizations.d.mts +9 -14
  192. package/resources/print-mail/sub-organizations.d.mts.map +1 -1
  193. package/resources/print-mail/sub-organizations.d.ts +9 -14
  194. package/resources/print-mail/sub-organizations.d.ts.map +1 -1
  195. package/resources/print-mail/sub-organizations.js +9 -3
  196. package/resources/print-mail/sub-organizations.js.map +1 -1
  197. package/resources/print-mail/sub-organizations.mjs +9 -3
  198. package/resources/print-mail/sub-organizations.mjs.map +1 -1
  199. package/resources/print-mail/templates.d.mts +9 -13
  200. package/resources/print-mail/templates.d.mts.map +1 -1
  201. package/resources/print-mail/templates.d.ts +9 -13
  202. package/resources/print-mail/templates.d.ts.map +1 -1
  203. package/resources/print-mail/templates.js +6 -2
  204. package/resources/print-mail/templates.js.map +1 -1
  205. package/resources/print-mail/templates.mjs +6 -2
  206. package/resources/print-mail/templates.mjs.map +1 -1
  207. package/src/client.ts +34 -2
  208. package/src/core/pagination.ts +171 -0
  209. package/src/index.ts +1 -0
  210. package/src/pagination.ts +2 -0
  211. package/src/resources/index.ts +5 -1
  212. package/src/resources/print-mail/bank-accounts.ts +14 -22
  213. package/src/resources/print-mail/boxes.ts +19 -686
  214. package/src/resources/print-mail/campaigns.ts +11 -24
  215. package/src/resources/print-mail/cheques.ts +15 -527
  216. package/src/resources/print-mail/contacts.ts +14 -189
  217. package/src/resources/print-mail/index.ts +14 -14
  218. package/src/resources/print-mail/letters.ts +16 -697
  219. package/src/resources/print-mail/mailing-list-imports.ts +15 -25
  220. package/src/resources/print-mail/mailing-lists.ts +14 -25
  221. package/src/resources/print-mail/order-profiles/cheques.ts +91 -103
  222. package/src/resources/print-mail/order-profiles/index.ts +4 -3
  223. package/src/resources/print-mail/order-profiles/letters.ts +14 -25
  224. package/src/resources/print-mail/order-profiles/order-profiles.ts +8 -6
  225. package/src/resources/print-mail/order-profiles/postcards.ts +14 -25
  226. package/src/resources/print-mail/order-profiles/self-mailers.ts +15 -25
  227. package/src/resources/print-mail/postcards.ts +18 -1035
  228. package/src/resources/print-mail/print-mail.ts +195 -26
  229. package/src/resources/print-mail/reports/index.ts +1 -1
  230. package/src/resources/print-mail/reports/reports.ts +11 -24
  231. package/src/resources/print-mail/self-mailers.ts +21 -1036
  232. package/src/resources/print-mail/sub-organizations.ts +14 -22
  233. package/src/resources/print-mail/templates.ts +11 -21
  234. package/src/version.ts +1 -1
  235. package/version.d.mts +1 -1
  236. package/version.d.ts +1 -1
  237. package/version.js +1 -1
  238. package/version.mjs +1 -1
@@ -3,7 +3,9 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as BoxesAPI from './boxes';
5
5
  import * as ContactsAPI from './contacts';
6
+ import * as PrintMailAPI from './print-mail';
6
7
  import { APIPromise } from '../../core/api-promise';
8
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
7
9
  import { RequestOptions } from '../../internal/request-options';
8
10
  import { path } from '../../internal/utils/path';
9
11
 
@@ -48,14 +50,17 @@ export class Letters extends APIResource {
48
50
  *
49
51
  * @example
50
52
  * ```ts
51
- * const letters = await client.printMail.letters.list();
53
+ * // Automatically fetches more pages as needed.
54
+ * for await (const letter of client.printMail.letters.list()) {
55
+ * // ...
56
+ * }
52
57
  * ```
53
58
  */
54
59
  list(
55
60
  query: LetterListParams | null | undefined = {},
56
61
  options?: RequestOptions,
57
- ): APIPromise<LetterListResponse> {
58
- return this._client.get('/print-mail/v1/letters', { query, ...options });
62
+ ): PagePromise<LettersSkipLimit, Letter> {
63
+ return this._client.getAPIList('/print-mail/v1/letters', SkipLimit<Letter>, { query, ...options });
59
64
  }
60
65
 
61
66
  /**
@@ -90,6 +95,8 @@ export class Letters extends APIResource {
90
95
  }
91
96
  }
92
97
 
98
+ export type LettersSkipLimit = SkipLimit<Letter>;
99
+
93
100
  /**
94
101
  * Enum representing the placement of the address on the letter.
95
102
  */
@@ -376,18 +383,6 @@ export namespace PlasticCard {
376
383
  }
377
384
  }
378
385
 
379
- export interface LetterListResponse {
380
- data: Array<Letter>;
381
-
382
- limit: number;
383
-
384
- object: 'list';
385
-
386
- skip: number;
387
-
388
- totalCount: number;
389
- }
390
-
391
386
  export interface LetterRetrieveURLResponse {
392
387
  /**
393
388
  * A unique ID prefixed with letter\_
@@ -414,10 +409,7 @@ export declare namespace LetterCreateParams {
414
409
  * The contact information of the sender. You can pass contact information inline
415
410
  * here just like you can for the `to`.
416
411
  */
417
- from:
418
- | LetterCreateWithHTML.ContactCreateWithFirstName
419
- | LetterCreateWithHTML.ContactCreateWithCompanyName
420
- | string;
412
+ from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
421
413
 
422
414
  /**
423
415
  * The HTML content for the letter. You can supply _either_ this or `template` but
@@ -431,10 +423,7 @@ export declare namespace LetterCreateParams {
431
423
  * contacts regardless of whether you provide the information inline here or call
432
424
  * the contact creation endpoint.
433
425
  */
434
- to:
435
- | LetterCreateWithHTML.ContactCreateWithFirstName
436
- | LetterCreateWithHTML.ContactCreateWithCompanyName
437
- | string;
426
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
438
427
 
439
428
  /**
440
429
  * Enum representing the placement of the address on the letter.
@@ -515,336 +504,6 @@ export declare namespace LetterCreateParams {
515
504
  size?: LetterSize;
516
505
  }
517
506
 
518
- export namespace LetterCreateWithHTML {
519
- export interface ContactCreateWithFirstName {
520
- /**
521
- * The first line of the contact's address.
522
- */
523
- addressLine1: string;
524
-
525
- /**
526
- * The ISO 3611-1 country code of the contact's address.
527
- */
528
- countryCode: string;
529
-
530
- firstName: string;
531
-
532
- /**
533
- * Second line of the contact's address, if applicable.
534
- */
535
- addressLine2?: string;
536
-
537
- /**
538
- * The city of the contact's address.
539
- */
540
- city?: string;
541
-
542
- /**
543
- * Company name of the contact.
544
- */
545
- companyName?: string;
546
-
547
- /**
548
- * An optional string describing this resource. Will be visible in the API and the
549
- * dashboard.
550
- */
551
- description?: string;
552
-
553
- /**
554
- * Email of the contact.
555
- */
556
- email?: string;
557
-
558
- /**
559
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
560
- * `verified` even if our address verification system says otherwise.
561
- */
562
- forceVerifiedStatus?: boolean;
563
-
564
- /**
565
- * Job title of the contact.
566
- */
567
- jobTitle?: string;
568
-
569
- /**
570
- * Last name of the contact.
571
- */
572
- lastName?: string;
573
-
574
- /**
575
- * See the section on Metadata.
576
- */
577
- metadata?: { [key: string]: unknown };
578
-
579
- /**
580
- * Phone number of the contact.
581
- */
582
- phoneNumber?: string;
583
-
584
- /**
585
- * The postal or ZIP code of the contact's address.
586
- */
587
- postalOrZip?: string;
588
-
589
- /**
590
- * Province or state of the contact's address.
591
- */
592
- provinceOrState?: string;
593
-
594
- /**
595
- * If `true`, PostGrid will skip running this contact's address through our address
596
- * verification system.
597
- */
598
- skipVerification?: boolean;
599
- }
600
-
601
- export interface ContactCreateWithCompanyName {
602
- /**
603
- * The first line of the contact's address.
604
- */
605
- addressLine1: string;
606
-
607
- companyName: string;
608
-
609
- /**
610
- * The ISO 3611-1 country code of the contact's address.
611
- */
612
- countryCode: string;
613
-
614
- /**
615
- * Second line of the contact's address, if applicable.
616
- */
617
- addressLine2?: string;
618
-
619
- /**
620
- * The city of the contact's address.
621
- */
622
- city?: string;
623
-
624
- /**
625
- * An optional string describing this resource. Will be visible in the API and the
626
- * dashboard.
627
- */
628
- description?: string;
629
-
630
- /**
631
- * Email of the contact.
632
- */
633
- email?: string;
634
-
635
- /**
636
- * First name of the contact.
637
- */
638
- firstName?: string;
639
-
640
- /**
641
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
642
- * `verified` even if our address verification system says otherwise.
643
- */
644
- forceVerifiedStatus?: boolean;
645
-
646
- /**
647
- * Job title of the contact.
648
- */
649
- jobTitle?: string;
650
-
651
- /**
652
- * Last name of the contact.
653
- */
654
- lastName?: string;
655
-
656
- /**
657
- * See the section on Metadata.
658
- */
659
- metadata?: { [key: string]: unknown };
660
-
661
- /**
662
- * Phone number of the contact.
663
- */
664
- phoneNumber?: string;
665
-
666
- /**
667
- * The postal or ZIP code of the contact's address.
668
- */
669
- postalOrZip?: string;
670
-
671
- /**
672
- * Province or state of the contact's address.
673
- */
674
- provinceOrState?: string;
675
-
676
- /**
677
- * If `true`, PostGrid will skip running this contact's address through our address
678
- * verification system.
679
- */
680
- skipVerification?: boolean;
681
- }
682
-
683
- export interface ContactCreateWithFirstName {
684
- /**
685
- * The first line of the contact's address.
686
- */
687
- addressLine1: string;
688
-
689
- /**
690
- * The ISO 3611-1 country code of the contact's address.
691
- */
692
- countryCode: string;
693
-
694
- firstName: string;
695
-
696
- /**
697
- * Second line of the contact's address, if applicable.
698
- */
699
- addressLine2?: string;
700
-
701
- /**
702
- * The city of the contact's address.
703
- */
704
- city?: string;
705
-
706
- /**
707
- * Company name of the contact.
708
- */
709
- companyName?: string;
710
-
711
- /**
712
- * An optional string describing this resource. Will be visible in the API and the
713
- * dashboard.
714
- */
715
- description?: string;
716
-
717
- /**
718
- * Email of the contact.
719
- */
720
- email?: string;
721
-
722
- /**
723
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
724
- * `verified` even if our address verification system says otherwise.
725
- */
726
- forceVerifiedStatus?: boolean;
727
-
728
- /**
729
- * Job title of the contact.
730
- */
731
- jobTitle?: string;
732
-
733
- /**
734
- * Last name of the contact.
735
- */
736
- lastName?: string;
737
-
738
- /**
739
- * See the section on Metadata.
740
- */
741
- metadata?: { [key: string]: unknown };
742
-
743
- /**
744
- * Phone number of the contact.
745
- */
746
- phoneNumber?: string;
747
-
748
- /**
749
- * The postal or ZIP code of the contact's address.
750
- */
751
- postalOrZip?: string;
752
-
753
- /**
754
- * Province or state of the contact's address.
755
- */
756
- provinceOrState?: string;
757
-
758
- /**
759
- * If `true`, PostGrid will skip running this contact's address through our address
760
- * verification system.
761
- */
762
- skipVerification?: boolean;
763
- }
764
-
765
- export interface ContactCreateWithCompanyName {
766
- /**
767
- * The first line of the contact's address.
768
- */
769
- addressLine1: string;
770
-
771
- companyName: string;
772
-
773
- /**
774
- * The ISO 3611-1 country code of the contact's address.
775
- */
776
- countryCode: string;
777
-
778
- /**
779
- * Second line of the contact's address, if applicable.
780
- */
781
- addressLine2?: string;
782
-
783
- /**
784
- * The city of the contact's address.
785
- */
786
- city?: string;
787
-
788
- /**
789
- * An optional string describing this resource. Will be visible in the API and the
790
- * dashboard.
791
- */
792
- description?: string;
793
-
794
- /**
795
- * Email of the contact.
796
- */
797
- email?: string;
798
-
799
- /**
800
- * First name of the contact.
801
- */
802
- firstName?: string;
803
-
804
- /**
805
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
806
- * `verified` even if our address verification system says otherwise.
807
- */
808
- forceVerifiedStatus?: boolean;
809
-
810
- /**
811
- * Job title of the contact.
812
- */
813
- jobTitle?: string;
814
-
815
- /**
816
- * Last name of the contact.
817
- */
818
- lastName?: string;
819
-
820
- /**
821
- * See the section on Metadata.
822
- */
823
- metadata?: { [key: string]: unknown };
824
-
825
- /**
826
- * Phone number of the contact.
827
- */
828
- phoneNumber?: string;
829
-
830
- /**
831
- * The postal or ZIP code of the contact's address.
832
- */
833
- postalOrZip?: string;
834
-
835
- /**
836
- * Province or state of the contact's address.
837
- */
838
- provinceOrState?: string;
839
-
840
- /**
841
- * If `true`, PostGrid will skip running this contact's address through our address
842
- * verification system.
843
- */
844
- skipVerification?: boolean;
845
- }
846
- }
847
-
848
507
  export interface LetterCreateWithTemplate {
849
508
  /**
850
509
  * The template ID for the letter. You can supply _either_ this or `html` but not
@@ -858,10 +517,7 @@ export declare namespace LetterCreateParams {
858
517
  * The contact information of the sender. You can pass contact information inline
859
518
  * here just like you can for the `to`.
860
519
  */
861
- from:
862
- | LetterCreateWithPdf.ContactCreateWithFirstName
863
- | LetterCreateWithPdf.ContactCreateWithCompanyName
864
- | string;
520
+ from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
865
521
 
866
522
  /**
867
523
  * A URL pointing to a PDF file for the letter or the PDF file itself.
@@ -874,10 +530,7 @@ export declare namespace LetterCreateParams {
874
530
  * contacts regardless of whether you provide the information inline here or call
875
531
  * the contact creation endpoint.
876
532
  */
877
- to:
878
- | LetterCreateWithPdf.ContactCreateWithFirstName
879
- | LetterCreateWithPdf.ContactCreateWithCompanyName
880
- | string;
533
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
881
534
 
882
535
  /**
883
536
  * Enum representing the placement of the address on the letter.
@@ -957,341 +610,9 @@ export declare namespace LetterCreateParams {
957
610
  */
958
611
  size?: LetterSize;
959
612
  }
960
-
961
- export namespace LetterCreateWithPdf {
962
- export interface ContactCreateWithFirstName {
963
- /**
964
- * The first line of the contact's address.
965
- */
966
- addressLine1: string;
967
-
968
- /**
969
- * The ISO 3611-1 country code of the contact's address.
970
- */
971
- countryCode: string;
972
-
973
- firstName: string;
974
-
975
- /**
976
- * Second line of the contact's address, if applicable.
977
- */
978
- addressLine2?: string;
979
-
980
- /**
981
- * The city of the contact's address.
982
- */
983
- city?: string;
984
-
985
- /**
986
- * Company name of the contact.
987
- */
988
- companyName?: string;
989
-
990
- /**
991
- * An optional string describing this resource. Will be visible in the API and the
992
- * dashboard.
993
- */
994
- description?: string;
995
-
996
- /**
997
- * Email of the contact.
998
- */
999
- email?: string;
1000
-
1001
- /**
1002
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1003
- * `verified` even if our address verification system says otherwise.
1004
- */
1005
- forceVerifiedStatus?: boolean;
1006
-
1007
- /**
1008
- * Job title of the contact.
1009
- */
1010
- jobTitle?: string;
1011
-
1012
- /**
1013
- * Last name of the contact.
1014
- */
1015
- lastName?: string;
1016
-
1017
- /**
1018
- * See the section on Metadata.
1019
- */
1020
- metadata?: { [key: string]: unknown };
1021
-
1022
- /**
1023
- * Phone number of the contact.
1024
- */
1025
- phoneNumber?: string;
1026
-
1027
- /**
1028
- * The postal or ZIP code of the contact's address.
1029
- */
1030
- postalOrZip?: string;
1031
-
1032
- /**
1033
- * Province or state of the contact's address.
1034
- */
1035
- provinceOrState?: string;
1036
-
1037
- /**
1038
- * If `true`, PostGrid will skip running this contact's address through our address
1039
- * verification system.
1040
- */
1041
- skipVerification?: boolean;
1042
- }
1043
-
1044
- export interface ContactCreateWithCompanyName {
1045
- /**
1046
- * The first line of the contact's address.
1047
- */
1048
- addressLine1: string;
1049
-
1050
- companyName: string;
1051
-
1052
- /**
1053
- * The ISO 3611-1 country code of the contact's address.
1054
- */
1055
- countryCode: string;
1056
-
1057
- /**
1058
- * Second line of the contact's address, if applicable.
1059
- */
1060
- addressLine2?: string;
1061
-
1062
- /**
1063
- * The city of the contact's address.
1064
- */
1065
- city?: string;
1066
-
1067
- /**
1068
- * An optional string describing this resource. Will be visible in the API and the
1069
- * dashboard.
1070
- */
1071
- description?: string;
1072
-
1073
- /**
1074
- * Email of the contact.
1075
- */
1076
- email?: string;
1077
-
1078
- /**
1079
- * First name of the contact.
1080
- */
1081
- firstName?: string;
1082
-
1083
- /**
1084
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1085
- * `verified` even if our address verification system says otherwise.
1086
- */
1087
- forceVerifiedStatus?: boolean;
1088
-
1089
- /**
1090
- * Job title of the contact.
1091
- */
1092
- jobTitle?: string;
1093
-
1094
- /**
1095
- * Last name of the contact.
1096
- */
1097
- lastName?: string;
1098
-
1099
- /**
1100
- * See the section on Metadata.
1101
- */
1102
- metadata?: { [key: string]: unknown };
1103
-
1104
- /**
1105
- * Phone number of the contact.
1106
- */
1107
- phoneNumber?: string;
1108
-
1109
- /**
1110
- * The postal or ZIP code of the contact's address.
1111
- */
1112
- postalOrZip?: string;
1113
-
1114
- /**
1115
- * Province or state of the contact's address.
1116
- */
1117
- provinceOrState?: string;
1118
-
1119
- /**
1120
- * If `true`, PostGrid will skip running this contact's address through our address
1121
- * verification system.
1122
- */
1123
- skipVerification?: boolean;
1124
- }
1125
-
1126
- export interface ContactCreateWithFirstName {
1127
- /**
1128
- * The first line of the contact's address.
1129
- */
1130
- addressLine1: string;
1131
-
1132
- /**
1133
- * The ISO 3611-1 country code of the contact's address.
1134
- */
1135
- countryCode: string;
1136
-
1137
- firstName: string;
1138
-
1139
- /**
1140
- * Second line of the contact's address, if applicable.
1141
- */
1142
- addressLine2?: string;
1143
-
1144
- /**
1145
- * The city of the contact's address.
1146
- */
1147
- city?: string;
1148
-
1149
- /**
1150
- * Company name of the contact.
1151
- */
1152
- companyName?: string;
1153
-
1154
- /**
1155
- * An optional string describing this resource. Will be visible in the API and the
1156
- * dashboard.
1157
- */
1158
- description?: string;
1159
-
1160
- /**
1161
- * Email of the contact.
1162
- */
1163
- email?: string;
1164
-
1165
- /**
1166
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1167
- * `verified` even if our address verification system says otherwise.
1168
- */
1169
- forceVerifiedStatus?: boolean;
1170
-
1171
- /**
1172
- * Job title of the contact.
1173
- */
1174
- jobTitle?: string;
1175
-
1176
- /**
1177
- * Last name of the contact.
1178
- */
1179
- lastName?: string;
1180
-
1181
- /**
1182
- * See the section on Metadata.
1183
- */
1184
- metadata?: { [key: string]: unknown };
1185
-
1186
- /**
1187
- * Phone number of the contact.
1188
- */
1189
- phoneNumber?: string;
1190
-
1191
- /**
1192
- * The postal or ZIP code of the contact's address.
1193
- */
1194
- postalOrZip?: string;
1195
-
1196
- /**
1197
- * Province or state of the contact's address.
1198
- */
1199
- provinceOrState?: string;
1200
-
1201
- /**
1202
- * If `true`, PostGrid will skip running this contact's address through our address
1203
- * verification system.
1204
- */
1205
- skipVerification?: boolean;
1206
- }
1207
-
1208
- export interface ContactCreateWithCompanyName {
1209
- /**
1210
- * The first line of the contact's address.
1211
- */
1212
- addressLine1: string;
1213
-
1214
- companyName: string;
1215
-
1216
- /**
1217
- * The ISO 3611-1 country code of the contact's address.
1218
- */
1219
- countryCode: string;
1220
-
1221
- /**
1222
- * Second line of the contact's address, if applicable.
1223
- */
1224
- addressLine2?: string;
1225
-
1226
- /**
1227
- * The city of the contact's address.
1228
- */
1229
- city?: string;
1230
-
1231
- /**
1232
- * An optional string describing this resource. Will be visible in the API and the
1233
- * dashboard.
1234
- */
1235
- description?: string;
1236
-
1237
- /**
1238
- * Email of the contact.
1239
- */
1240
- email?: string;
1241
-
1242
- /**
1243
- * First name of the contact.
1244
- */
1245
- firstName?: string;
1246
-
1247
- /**
1248
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1249
- * `verified` even if our address verification system says otherwise.
1250
- */
1251
- forceVerifiedStatus?: boolean;
1252
-
1253
- /**
1254
- * Job title of the contact.
1255
- */
1256
- jobTitle?: string;
1257
-
1258
- /**
1259
- * Last name of the contact.
1260
- */
1261
- lastName?: string;
1262
-
1263
- /**
1264
- * See the section on Metadata.
1265
- */
1266
- metadata?: { [key: string]: unknown };
1267
-
1268
- /**
1269
- * Phone number of the contact.
1270
- */
1271
- phoneNumber?: string;
1272
-
1273
- /**
1274
- * The postal or ZIP code of the contact's address.
1275
- */
1276
- postalOrZip?: string;
1277
-
1278
- /**
1279
- * Province or state of the contact's address.
1280
- */
1281
- provinceOrState?: string;
1282
-
1283
- /**
1284
- * If `true`, PostGrid will skip running this contact's address through our address
1285
- * verification system.
1286
- */
1287
- skipVerification?: boolean;
1288
- }
1289
- }
1290
613
  }
1291
614
 
1292
- export interface LetterListParams {
1293
- limit?: number;
1294
-
615
+ export interface LetterListParams extends SkipLimitParams {
1295
616
  /**
1296
617
  * You can supply any string to help narrow down the list of resources. For
1297
618
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -1300,8 +621,6 @@ export interface LetterListParams {
1300
621
  * more details.
1301
622
  */
1302
623
  search?: string;
1303
-
1304
- skip?: number;
1305
624
  }
1306
625
 
1307
626
  export declare namespace Letters {
@@ -1311,8 +630,8 @@ export declare namespace Letters {
1311
630
  type Letter as Letter,
1312
631
  type LetterSize as LetterSize,
1313
632
  type PlasticCard as PlasticCard,
1314
- type LetterListResponse as LetterListResponse,
1315
633
  type LetterRetrieveURLResponse as LetterRetrieveURLResponse,
634
+ type LettersSkipLimit as LettersSkipLimit,
1316
635
  type LetterCreateParams as LetterCreateParams,
1317
636
  type LetterListParams as LetterListParams,
1318
637
  };