postgrid-node 0.2.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 (239) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +18 -26
  3. package/client.d.mts +8 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +8 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js +8 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -1
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +60 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +60 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +107 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +101 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/tslib.js +17 -17
  28. package/package.json +11 -1
  29. package/pagination.d.mts +2 -0
  30. package/pagination.d.mts.map +1 -0
  31. package/pagination.d.ts +2 -0
  32. package/pagination.d.ts.map +1 -0
  33. package/pagination.js +6 -0
  34. package/pagination.js.map +1 -0
  35. package/pagination.mjs +2 -0
  36. package/pagination.mjs.map +1 -0
  37. package/resources/index.d.mts +1 -1
  38. package/resources/index.d.mts.map +1 -1
  39. package/resources/index.d.ts +1 -1
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/index.js.map +1 -1
  42. package/resources/index.mjs +1 -1
  43. package/resources/index.mjs.map +1 -1
  44. package/resources/print-mail/bank-accounts.d.mts +9 -14
  45. package/resources/print-mail/bank-accounts.d.mts.map +1 -1
  46. package/resources/print-mail/bank-accounts.d.ts +9 -14
  47. package/resources/print-mail/bank-accounts.d.ts.map +1 -1
  48. package/resources/print-mail/bank-accounts.js +9 -3
  49. package/resources/print-mail/bank-accounts.js.map +1 -1
  50. package/resources/print-mail/bank-accounts.mjs +9 -3
  51. package/resources/print-mail/bank-accounts.mjs.map +1 -1
  52. package/resources/print-mail/boxes.d.mts +14 -566
  53. package/resources/print-mail/boxes.d.mts.map +1 -1
  54. package/resources/print-mail/boxes.d.ts +14 -566
  55. package/resources/print-mail/boxes.d.ts.map +1 -1
  56. package/resources/print-mail/boxes.js +6 -2
  57. package/resources/print-mail/boxes.js.map +1 -1
  58. package/resources/print-mail/boxes.mjs +6 -2
  59. package/resources/print-mail/boxes.mjs.map +1 -1
  60. package/resources/print-mail/campaigns.d.mts +9 -16
  61. package/resources/print-mail/campaigns.d.mts.map +1 -1
  62. package/resources/print-mail/campaigns.d.ts +9 -16
  63. package/resources/print-mail/campaigns.d.ts.map +1 -1
  64. package/resources/print-mail/campaigns.js +6 -2
  65. package/resources/print-mail/campaigns.js.map +1 -1
  66. package/resources/print-mail/campaigns.mjs +6 -2
  67. package/resources/print-mail/campaigns.mjs.map +1 -1
  68. package/resources/print-mail/cheques.d.mts +13 -426
  69. package/resources/print-mail/cheques.d.mts.map +1 -1
  70. package/resources/print-mail/cheques.d.ts +13 -426
  71. package/resources/print-mail/cheques.d.ts.map +1 -1
  72. package/resources/print-mail/cheques.js +6 -2
  73. package/resources/print-mail/cheques.js.map +1 -1
  74. package/resources/print-mail/cheques.mjs +6 -2
  75. package/resources/print-mail/cheques.mjs.map +1 -1
  76. package/resources/print-mail/contacts.d.mts +11 -152
  77. package/resources/print-mail/contacts.d.mts.map +1 -1
  78. package/resources/print-mail/contacts.d.ts +11 -152
  79. package/resources/print-mail/contacts.d.ts.map +1 -1
  80. package/resources/print-mail/contacts.js +6 -2
  81. package/resources/print-mail/contacts.js.map +1 -1
  82. package/resources/print-mail/contacts.mjs +6 -2
  83. package/resources/print-mail/contacts.mjs.map +1 -1
  84. package/resources/print-mail/index.d.mts +14 -14
  85. package/resources/print-mail/index.d.mts.map +1 -1
  86. package/resources/print-mail/index.d.ts +14 -14
  87. package/resources/print-mail/index.d.ts.map +1 -1
  88. package/resources/print-mail/index.js.map +1 -1
  89. package/resources/print-mail/index.mjs.map +1 -1
  90. package/resources/print-mail/letters.d.mts +14 -565
  91. package/resources/print-mail/letters.d.mts.map +1 -1
  92. package/resources/print-mail/letters.d.ts +14 -565
  93. package/resources/print-mail/letters.d.ts.map +1 -1
  94. package/resources/print-mail/letters.js +6 -2
  95. package/resources/print-mail/letters.js.map +1 -1
  96. package/resources/print-mail/letters.mjs +6 -2
  97. package/resources/print-mail/letters.mjs.map +1 -1
  98. package/resources/print-mail/mailing-list-imports.d.mts +9 -17
  99. package/resources/print-mail/mailing-list-imports.d.mts.map +1 -1
  100. package/resources/print-mail/mailing-list-imports.d.ts +9 -17
  101. package/resources/print-mail/mailing-list-imports.d.ts.map +1 -1
  102. package/resources/print-mail/mailing-list-imports.js +6 -3
  103. package/resources/print-mail/mailing-list-imports.js.map +1 -1
  104. package/resources/print-mail/mailing-list-imports.mjs +6 -3
  105. package/resources/print-mail/mailing-list-imports.mjs.map +1 -1
  106. package/resources/print-mail/mailing-lists.d.mts +9 -17
  107. package/resources/print-mail/mailing-lists.d.mts.map +1 -1
  108. package/resources/print-mail/mailing-lists.d.ts +9 -17
  109. package/resources/print-mail/mailing-lists.d.ts.map +1 -1
  110. package/resources/print-mail/mailing-lists.js +9 -3
  111. package/resources/print-mail/mailing-lists.js.map +1 -1
  112. package/resources/print-mail/mailing-lists.mjs +9 -3
  113. package/resources/print-mail/mailing-lists.mjs.map +1 -1
  114. package/resources/print-mail/order-profiles/cheques.d.mts +80 -90
  115. package/resources/print-mail/order-profiles/cheques.d.mts.map +1 -1
  116. package/resources/print-mail/order-profiles/cheques.d.ts +80 -90
  117. package/resources/print-mail/order-profiles/cheques.d.ts.map +1 -1
  118. package/resources/print-mail/order-profiles/cheques.js +9 -3
  119. package/resources/print-mail/order-profiles/cheques.js.map +1 -1
  120. package/resources/print-mail/order-profiles/cheques.mjs +9 -3
  121. package/resources/print-mail/order-profiles/cheques.mjs.map +1 -1
  122. package/resources/print-mail/order-profiles/index.d.mts +4 -4
  123. package/resources/print-mail/order-profiles/index.d.mts.map +1 -1
  124. package/resources/print-mail/order-profiles/index.d.ts +4 -4
  125. package/resources/print-mail/order-profiles/index.d.ts.map +1 -1
  126. package/resources/print-mail/order-profiles/index.js.map +1 -1
  127. package/resources/print-mail/order-profiles/index.mjs.map +1 -1
  128. package/resources/print-mail/order-profiles/letters.d.mts +9 -17
  129. package/resources/print-mail/order-profiles/letters.d.mts.map +1 -1
  130. package/resources/print-mail/order-profiles/letters.d.ts +9 -17
  131. package/resources/print-mail/order-profiles/letters.d.ts.map +1 -1
  132. package/resources/print-mail/order-profiles/letters.js +9 -3
  133. package/resources/print-mail/order-profiles/letters.js.map +1 -1
  134. package/resources/print-mail/order-profiles/letters.mjs +9 -3
  135. package/resources/print-mail/order-profiles/letters.mjs.map +1 -1
  136. package/resources/print-mail/order-profiles/order-profiles.d.mts +8 -8
  137. package/resources/print-mail/order-profiles/order-profiles.d.mts.map +1 -1
  138. package/resources/print-mail/order-profiles/order-profiles.d.ts +8 -8
  139. package/resources/print-mail/order-profiles/order-profiles.d.ts.map +1 -1
  140. package/resources/print-mail/order-profiles/order-profiles.js.map +1 -1
  141. package/resources/print-mail/order-profiles/order-profiles.mjs.map +1 -1
  142. package/resources/print-mail/order-profiles/postcards.d.mts +9 -17
  143. package/resources/print-mail/order-profiles/postcards.d.mts.map +1 -1
  144. package/resources/print-mail/order-profiles/postcards.d.ts +9 -17
  145. package/resources/print-mail/order-profiles/postcards.d.ts.map +1 -1
  146. package/resources/print-mail/order-profiles/postcards.js +9 -3
  147. package/resources/print-mail/order-profiles/postcards.js.map +1 -1
  148. package/resources/print-mail/order-profiles/postcards.mjs +9 -3
  149. package/resources/print-mail/order-profiles/postcards.mjs.map +1 -1
  150. package/resources/print-mail/order-profiles/self-mailers.d.mts +9 -17
  151. package/resources/print-mail/order-profiles/self-mailers.d.mts.map +1 -1
  152. package/resources/print-mail/order-profiles/self-mailers.d.ts +9 -17
  153. package/resources/print-mail/order-profiles/self-mailers.d.ts.map +1 -1
  154. package/resources/print-mail/order-profiles/self-mailers.js +6 -3
  155. package/resources/print-mail/order-profiles/self-mailers.js.map +1 -1
  156. package/resources/print-mail/order-profiles/self-mailers.mjs +6 -3
  157. package/resources/print-mail/order-profiles/self-mailers.mjs.map +1 -1
  158. package/resources/print-mail/postcards.d.mts +16 -841
  159. package/resources/print-mail/postcards.d.mts.map +1 -1
  160. package/resources/print-mail/postcards.d.ts +16 -841
  161. package/resources/print-mail/postcards.d.ts.map +1 -1
  162. package/resources/print-mail/postcards.js +6 -2
  163. package/resources/print-mail/postcards.js.map +1 -1
  164. package/resources/print-mail/postcards.mjs +6 -2
  165. package/resources/print-mail/postcards.mjs.map +1 -1
  166. package/resources/print-mail/print-mail.d.mts +163 -26
  167. package/resources/print-mail/print-mail.d.mts.map +1 -1
  168. package/resources/print-mail/print-mail.d.ts +163 -26
  169. package/resources/print-mail/print-mail.d.ts.map +1 -1
  170. package/resources/print-mail/print-mail.js.map +1 -1
  171. package/resources/print-mail/print-mail.mjs.map +1 -1
  172. package/resources/print-mail/reports/index.d.mts +1 -1
  173. package/resources/print-mail/reports/index.d.mts.map +1 -1
  174. package/resources/print-mail/reports/index.d.ts +1 -1
  175. package/resources/print-mail/reports/index.d.ts.map +1 -1
  176. package/resources/print-mail/reports/reports.d.mts +9 -16
  177. package/resources/print-mail/reports/reports.d.mts.map +1 -1
  178. package/resources/print-mail/reports/reports.d.ts +9 -16
  179. package/resources/print-mail/reports/reports.d.ts.map +1 -1
  180. package/resources/print-mail/reports/reports.js +6 -2
  181. package/resources/print-mail/reports/reports.js.map +1 -1
  182. package/resources/print-mail/reports/reports.mjs +6 -2
  183. package/resources/print-mail/reports/reports.mjs.map +1 -1
  184. package/resources/print-mail/self-mailers.d.mts +16 -842
  185. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  186. package/resources/print-mail/self-mailers.d.ts +16 -842
  187. package/resources/print-mail/self-mailers.d.ts.map +1 -1
  188. package/resources/print-mail/self-mailers.js +9 -3
  189. package/resources/print-mail/self-mailers.js.map +1 -1
  190. package/resources/print-mail/self-mailers.mjs +9 -3
  191. package/resources/print-mail/self-mailers.mjs.map +1 -1
  192. package/resources/print-mail/sub-organizations.d.mts +9 -14
  193. package/resources/print-mail/sub-organizations.d.mts.map +1 -1
  194. package/resources/print-mail/sub-organizations.d.ts +9 -14
  195. package/resources/print-mail/sub-organizations.d.ts.map +1 -1
  196. package/resources/print-mail/sub-organizations.js +9 -3
  197. package/resources/print-mail/sub-organizations.js.map +1 -1
  198. package/resources/print-mail/sub-organizations.mjs +9 -3
  199. package/resources/print-mail/sub-organizations.mjs.map +1 -1
  200. package/resources/print-mail/templates.d.mts +9 -13
  201. package/resources/print-mail/templates.d.mts.map +1 -1
  202. package/resources/print-mail/templates.d.ts +9 -13
  203. package/resources/print-mail/templates.d.ts.map +1 -1
  204. package/resources/print-mail/templates.js +6 -2
  205. package/resources/print-mail/templates.js.map +1 -1
  206. package/resources/print-mail/templates.mjs +6 -2
  207. package/resources/print-mail/templates.mjs.map +1 -1
  208. package/src/client.ts +34 -2
  209. package/src/core/pagination.ts +171 -0
  210. package/src/index.ts +1 -0
  211. package/src/pagination.ts +2 -0
  212. package/src/resources/index.ts +5 -1
  213. package/src/resources/print-mail/bank-accounts.ts +14 -22
  214. package/src/resources/print-mail/boxes.ts +19 -686
  215. package/src/resources/print-mail/campaigns.ts +11 -24
  216. package/src/resources/print-mail/cheques.ts +15 -527
  217. package/src/resources/print-mail/contacts.ts +14 -189
  218. package/src/resources/print-mail/index.ts +14 -14
  219. package/src/resources/print-mail/letters.ts +16 -697
  220. package/src/resources/print-mail/mailing-list-imports.ts +15 -25
  221. package/src/resources/print-mail/mailing-lists.ts +14 -25
  222. package/src/resources/print-mail/order-profiles/cheques.ts +91 -103
  223. package/src/resources/print-mail/order-profiles/index.ts +4 -3
  224. package/src/resources/print-mail/order-profiles/letters.ts +14 -25
  225. package/src/resources/print-mail/order-profiles/order-profiles.ts +8 -6
  226. package/src/resources/print-mail/order-profiles/postcards.ts +14 -25
  227. package/src/resources/print-mail/order-profiles/self-mailers.ts +15 -25
  228. package/src/resources/print-mail/postcards.ts +18 -1035
  229. package/src/resources/print-mail/print-mail.ts +195 -26
  230. package/src/resources/print-mail/reports/index.ts +1 -1
  231. package/src/resources/print-mail/reports/reports.ts +11 -24
  232. package/src/resources/print-mail/self-mailers.ts +21 -1036
  233. package/src/resources/print-mail/sub-organizations.ts +14 -22
  234. package/src/resources/print-mail/templates.ts +11 -21
  235. package/src/version.ts +1 -1
  236. package/version.d.mts +1 -1
  237. package/version.d.ts +1 -1
  238. package/version.js +1 -1
  239. package/version.mjs +1 -1
@@ -3,8 +3,10 @@
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 * as OrderProfilesSelfMailersAPI from './order-profiles/self-mailers';
7
8
  import { APIPromise } from '../../core/api-promise';
9
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
8
10
  import { RequestOptions } from '../../internal/request-options';
9
11
  import { path } from '../../internal/utils/path';
10
12
 
@@ -52,15 +54,20 @@ export class SelfMailers extends APIResource {
52
54
  *
53
55
  * @example
54
56
  * ```ts
55
- * const selfMailers =
56
- * await client.printMail.selfMailers.list();
57
+ * // Automatically fetches more pages as needed.
58
+ * for await (const selfMailer of client.printMail.selfMailers.list()) {
59
+ * // ...
60
+ * }
57
61
  * ```
58
62
  */
59
63
  list(
60
64
  query: SelfMailerListParams | null | undefined = {},
61
65
  options?: RequestOptions,
62
- ): APIPromise<SelfMailerListResponse> {
63
- return this._client.get('/print-mail/v1/self_mailers', { query, ...options });
66
+ ): PagePromise<SelfMailersSkipLimit, SelfMailer> {
67
+ return this._client.getAPIList('/print-mail/v1/self_mailers', SkipLimit<SelfMailer>, {
68
+ query,
69
+ ...options,
70
+ });
64
71
  }
65
72
 
66
73
  /**
@@ -95,6 +102,8 @@ export class SelfMailers extends APIResource {
95
102
  }
96
103
  }
97
104
 
105
+ export type SelfMailersSkipLimit = SkipLimit<SelfMailer>;
106
+
98
107
  export interface SelfMailer {
99
108
  /**
100
109
  * A unique ID prefixed with self*mailer*
@@ -217,18 +226,6 @@ export interface SelfMailer {
217
226
  url?: string;
218
227
  }
219
228
 
220
- export interface SelfMailerListResponse {
221
- data: Array<SelfMailer>;
222
-
223
- limit: number;
224
-
225
- object: 'list';
226
-
227
- skip: number;
228
-
229
- totalCount: number;
230
- }
231
-
232
229
  export interface SelfMailerRetrieveURLResponse {
233
230
  /**
234
231
  * A unique ID prefixed with self*mailer*
@@ -256,10 +253,7 @@ export declare namespace SelfMailerCreateParams {
256
253
  * The contact information of the sender. You can pass contact information inline
257
254
  * here just like you can for the `to`.
258
255
  */
259
- from:
260
- | SelfMailerCreateWithHTML.ContactCreateWithFirstName
261
- | SelfMailerCreateWithHTML.ContactCreateWithCompanyName
262
- | string;
256
+ from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
263
257
 
264
258
  /**
265
259
  * The HTML content for the inside of the self-mailer. You can supply _either_ this
@@ -284,10 +278,7 @@ export declare namespace SelfMailerCreateParams {
284
278
  * contacts regardless of whether you provide the information inline here or call
285
279
  * the contact creation endpoint.
286
280
  */
287
- to:
288
- | SelfMailerCreateWithHTML.ContactCreateWithFirstName
289
- | SelfMailerCreateWithHTML.ContactCreateWithCompanyName
290
- | string;
281
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
291
282
 
292
283
  /**
293
284
  * An optional string describing this resource. Will be visible in the API and the
@@ -321,336 +312,6 @@ export declare namespace SelfMailerCreateParams {
321
312
  sendDate?: string;
322
313
  }
323
314
 
324
- export namespace SelfMailerCreateWithHTML {
325
- export interface ContactCreateWithFirstName {
326
- /**
327
- * The first line of the contact's address.
328
- */
329
- addressLine1: string;
330
-
331
- /**
332
- * The ISO 3611-1 country code of the contact's address.
333
- */
334
- countryCode: string;
335
-
336
- firstName: string;
337
-
338
- /**
339
- * Second line of the contact's address, if applicable.
340
- */
341
- addressLine2?: string;
342
-
343
- /**
344
- * The city of the contact's address.
345
- */
346
- city?: string;
347
-
348
- /**
349
- * Company name of the contact.
350
- */
351
- companyName?: string;
352
-
353
- /**
354
- * An optional string describing this resource. Will be visible in the API and the
355
- * dashboard.
356
- */
357
- description?: string;
358
-
359
- /**
360
- * Email of the contact.
361
- */
362
- email?: string;
363
-
364
- /**
365
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
366
- * `verified` even if our address verification system says otherwise.
367
- */
368
- forceVerifiedStatus?: boolean;
369
-
370
- /**
371
- * Job title of the contact.
372
- */
373
- jobTitle?: string;
374
-
375
- /**
376
- * Last name of the contact.
377
- */
378
- lastName?: string;
379
-
380
- /**
381
- * See the section on Metadata.
382
- */
383
- metadata?: { [key: string]: unknown };
384
-
385
- /**
386
- * Phone number of the contact.
387
- */
388
- phoneNumber?: string;
389
-
390
- /**
391
- * The postal or ZIP code of the contact's address.
392
- */
393
- postalOrZip?: string;
394
-
395
- /**
396
- * Province or state of the contact's address.
397
- */
398
- provinceOrState?: string;
399
-
400
- /**
401
- * If `true`, PostGrid will skip running this contact's address through our address
402
- * verification system.
403
- */
404
- skipVerification?: boolean;
405
- }
406
-
407
- export interface ContactCreateWithCompanyName {
408
- /**
409
- * The first line of the contact's address.
410
- */
411
- addressLine1: string;
412
-
413
- companyName: string;
414
-
415
- /**
416
- * The ISO 3611-1 country code of the contact's address.
417
- */
418
- countryCode: string;
419
-
420
- /**
421
- * Second line of the contact's address, if applicable.
422
- */
423
- addressLine2?: string;
424
-
425
- /**
426
- * The city of the contact's address.
427
- */
428
- city?: string;
429
-
430
- /**
431
- * An optional string describing this resource. Will be visible in the API and the
432
- * dashboard.
433
- */
434
- description?: string;
435
-
436
- /**
437
- * Email of the contact.
438
- */
439
- email?: string;
440
-
441
- /**
442
- * First name of the contact.
443
- */
444
- firstName?: string;
445
-
446
- /**
447
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
448
- * `verified` even if our address verification system says otherwise.
449
- */
450
- forceVerifiedStatus?: boolean;
451
-
452
- /**
453
- * Job title of the contact.
454
- */
455
- jobTitle?: string;
456
-
457
- /**
458
- * Last name of the contact.
459
- */
460
- lastName?: string;
461
-
462
- /**
463
- * See the section on Metadata.
464
- */
465
- metadata?: { [key: string]: unknown };
466
-
467
- /**
468
- * Phone number of the contact.
469
- */
470
- phoneNumber?: string;
471
-
472
- /**
473
- * The postal or ZIP code of the contact's address.
474
- */
475
- postalOrZip?: string;
476
-
477
- /**
478
- * Province or state of the contact's address.
479
- */
480
- provinceOrState?: string;
481
-
482
- /**
483
- * If `true`, PostGrid will skip running this contact's address through our address
484
- * verification system.
485
- */
486
- skipVerification?: boolean;
487
- }
488
-
489
- export interface ContactCreateWithFirstName {
490
- /**
491
- * The first line of the contact's address.
492
- */
493
- addressLine1: string;
494
-
495
- /**
496
- * The ISO 3611-1 country code of the contact's address.
497
- */
498
- countryCode: string;
499
-
500
- firstName: string;
501
-
502
- /**
503
- * Second line of the contact's address, if applicable.
504
- */
505
- addressLine2?: string;
506
-
507
- /**
508
- * The city of the contact's address.
509
- */
510
- city?: string;
511
-
512
- /**
513
- * Company name of the contact.
514
- */
515
- companyName?: string;
516
-
517
- /**
518
- * An optional string describing this resource. Will be visible in the API and the
519
- * dashboard.
520
- */
521
- description?: string;
522
-
523
- /**
524
- * Email of the contact.
525
- */
526
- email?: string;
527
-
528
- /**
529
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
530
- * `verified` even if our address verification system says otherwise.
531
- */
532
- forceVerifiedStatus?: boolean;
533
-
534
- /**
535
- * Job title of the contact.
536
- */
537
- jobTitle?: string;
538
-
539
- /**
540
- * Last name of the contact.
541
- */
542
- lastName?: string;
543
-
544
- /**
545
- * See the section on Metadata.
546
- */
547
- metadata?: { [key: string]: unknown };
548
-
549
- /**
550
- * Phone number of the contact.
551
- */
552
- phoneNumber?: string;
553
-
554
- /**
555
- * The postal or ZIP code of the contact's address.
556
- */
557
- postalOrZip?: string;
558
-
559
- /**
560
- * Province or state of the contact's address.
561
- */
562
- provinceOrState?: string;
563
-
564
- /**
565
- * If `true`, PostGrid will skip running this contact's address through our address
566
- * verification system.
567
- */
568
- skipVerification?: boolean;
569
- }
570
-
571
- export interface ContactCreateWithCompanyName {
572
- /**
573
- * The first line of the contact's address.
574
- */
575
- addressLine1: string;
576
-
577
- companyName: string;
578
-
579
- /**
580
- * The ISO 3611-1 country code of the contact's address.
581
- */
582
- countryCode: string;
583
-
584
- /**
585
- * Second line of the contact's address, if applicable.
586
- */
587
- addressLine2?: string;
588
-
589
- /**
590
- * The city of the contact's address.
591
- */
592
- city?: string;
593
-
594
- /**
595
- * An optional string describing this resource. Will be visible in the API and the
596
- * dashboard.
597
- */
598
- description?: string;
599
-
600
- /**
601
- * Email of the contact.
602
- */
603
- email?: string;
604
-
605
- /**
606
- * First name of the contact.
607
- */
608
- firstName?: string;
609
-
610
- /**
611
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
612
- * `verified` even if our address verification system says otherwise.
613
- */
614
- forceVerifiedStatus?: boolean;
615
-
616
- /**
617
- * Job title of the contact.
618
- */
619
- jobTitle?: string;
620
-
621
- /**
622
- * Last name of the contact.
623
- */
624
- lastName?: string;
625
-
626
- /**
627
- * See the section on Metadata.
628
- */
629
- metadata?: { [key: string]: unknown };
630
-
631
- /**
632
- * Phone number of the contact.
633
- */
634
- phoneNumber?: string;
635
-
636
- /**
637
- * The postal or ZIP code of the contact's address.
638
- */
639
- postalOrZip?: string;
640
-
641
- /**
642
- * Province or state of the contact's address.
643
- */
644
- provinceOrState?: string;
645
-
646
- /**
647
- * If `true`, PostGrid will skip running this contact's address through our address
648
- * verification system.
649
- */
650
- skipVerification?: boolean;
651
- }
652
- }
653
-
654
315
  export interface SelfMailerCreateWithTemplate {
655
316
  /**
656
317
  * The template ID for the inside of the self-mailer. You can supply _either_ this
@@ -670,10 +331,7 @@ export declare namespace SelfMailerCreateParams {
670
331
  * The contact information of the sender. You can pass contact information inline
671
332
  * here just like you can for the `to`.
672
333
  */
673
- from:
674
- | SelfMailerCreateWithPdfurl.ContactCreateWithFirstName
675
- | SelfMailerCreateWithPdfurl.ContactCreateWithCompanyName
676
- | string;
334
+ from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
677
335
 
678
336
  /**
679
337
  * A URL pointing to a 2 page PDF file. The first page is the inside of the
@@ -693,10 +351,7 @@ export declare namespace SelfMailerCreateParams {
693
351
  * contacts regardless of whether you provide the information inline here or call
694
352
  * the contact creation endpoint.
695
353
  */
696
- to:
697
- | SelfMailerCreateWithPdfurl.ContactCreateWithFirstName
698
- | SelfMailerCreateWithPdfurl.ContactCreateWithCompanyName
699
- | string;
354
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
700
355
 
701
356
  /**
702
357
  * An optional string describing this resource. Will be visible in the API and the
@@ -730,345 +385,12 @@ export declare namespace SelfMailerCreateParams {
730
385
  sendDate?: string;
731
386
  }
732
387
 
733
- export namespace SelfMailerCreateWithPdfurl {
734
- export interface ContactCreateWithFirstName {
735
- /**
736
- * The first line of the contact's address.
737
- */
738
- addressLine1: string;
739
-
740
- /**
741
- * The ISO 3611-1 country code of the contact's address.
742
- */
743
- countryCode: string;
744
-
745
- firstName: string;
746
-
747
- /**
748
- * Second line of the contact's address, if applicable.
749
- */
750
- addressLine2?: string;
751
-
752
- /**
753
- * The city of the contact's address.
754
- */
755
- city?: string;
756
-
757
- /**
758
- * Company name of the contact.
759
- */
760
- companyName?: string;
761
-
762
- /**
763
- * An optional string describing this resource. Will be visible in the API and the
764
- * dashboard.
765
- */
766
- description?: string;
767
-
768
- /**
769
- * Email of the contact.
770
- */
771
- email?: string;
772
-
773
- /**
774
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
775
- * `verified` even if our address verification system says otherwise.
776
- */
777
- forceVerifiedStatus?: boolean;
778
-
779
- /**
780
- * Job title of the contact.
781
- */
782
- jobTitle?: string;
783
-
784
- /**
785
- * Last name of the contact.
786
- */
787
- lastName?: string;
788
-
789
- /**
790
- * See the section on Metadata.
791
- */
792
- metadata?: { [key: string]: unknown };
793
-
794
- /**
795
- * Phone number of the contact.
796
- */
797
- phoneNumber?: string;
798
-
799
- /**
800
- * The postal or ZIP code of the contact's address.
801
- */
802
- postalOrZip?: string;
803
-
804
- /**
805
- * Province or state of the contact's address.
806
- */
807
- provinceOrState?: string;
808
-
809
- /**
810
- * If `true`, PostGrid will skip running this contact's address through our address
811
- * verification system.
812
- */
813
- skipVerification?: boolean;
814
- }
815
-
816
- export interface ContactCreateWithCompanyName {
817
- /**
818
- * The first line of the contact's address.
819
- */
820
- addressLine1: string;
821
-
822
- companyName: string;
823
-
824
- /**
825
- * The ISO 3611-1 country code of the contact's address.
826
- */
827
- countryCode: string;
828
-
829
- /**
830
- * Second line of the contact's address, if applicable.
831
- */
832
- addressLine2?: string;
833
-
834
- /**
835
- * The city of the contact's address.
836
- */
837
- city?: string;
838
-
839
- /**
840
- * An optional string describing this resource. Will be visible in the API and the
841
- * dashboard.
842
- */
843
- description?: string;
844
-
845
- /**
846
- * Email of the contact.
847
- */
848
- email?: string;
849
-
850
- /**
851
- * First name of the contact.
852
- */
853
- firstName?: string;
854
-
855
- /**
856
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
857
- * `verified` even if our address verification system says otherwise.
858
- */
859
- forceVerifiedStatus?: boolean;
860
-
861
- /**
862
- * Job title of the contact.
863
- */
864
- jobTitle?: string;
865
-
866
- /**
867
- * Last name of the contact.
868
- */
869
- lastName?: string;
870
-
871
- /**
872
- * See the section on Metadata.
873
- */
874
- metadata?: { [key: string]: unknown };
875
-
876
- /**
877
- * Phone number of the contact.
878
- */
879
- phoneNumber?: string;
880
-
881
- /**
882
- * The postal or ZIP code of the contact's address.
883
- */
884
- postalOrZip?: string;
885
-
886
- /**
887
- * Province or state of the contact's address.
888
- */
889
- provinceOrState?: string;
890
-
891
- /**
892
- * If `true`, PostGrid will skip running this contact's address through our address
893
- * verification system.
894
- */
895
- skipVerification?: boolean;
896
- }
897
-
898
- export interface ContactCreateWithFirstName {
899
- /**
900
- * The first line of the contact's address.
901
- */
902
- addressLine1: string;
903
-
904
- /**
905
- * The ISO 3611-1 country code of the contact's address.
906
- */
907
- countryCode: string;
908
-
909
- firstName: string;
910
-
911
- /**
912
- * Second line of the contact's address, if applicable.
913
- */
914
- addressLine2?: string;
915
-
916
- /**
917
- * The city of the contact's address.
918
- */
919
- city?: string;
920
-
921
- /**
922
- * Company name of the contact.
923
- */
924
- companyName?: string;
925
-
926
- /**
927
- * An optional string describing this resource. Will be visible in the API and the
928
- * dashboard.
929
- */
930
- description?: string;
931
-
932
- /**
933
- * Email of the contact.
934
- */
935
- email?: string;
936
-
937
- /**
938
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
939
- * `verified` even if our address verification system says otherwise.
940
- */
941
- forceVerifiedStatus?: boolean;
942
-
943
- /**
944
- * Job title of the contact.
945
- */
946
- jobTitle?: string;
947
-
948
- /**
949
- * Last name of the contact.
950
- */
951
- lastName?: string;
952
-
953
- /**
954
- * See the section on Metadata.
955
- */
956
- metadata?: { [key: string]: unknown };
957
-
958
- /**
959
- * Phone number of the contact.
960
- */
961
- phoneNumber?: string;
962
-
963
- /**
964
- * The postal or ZIP code of the contact's address.
965
- */
966
- postalOrZip?: string;
967
-
968
- /**
969
- * Province or state of the contact's address.
970
- */
971
- provinceOrState?: string;
972
-
973
- /**
974
- * If `true`, PostGrid will skip running this contact's address through our address
975
- * verification system.
976
- */
977
- skipVerification?: boolean;
978
- }
979
-
980
- export interface ContactCreateWithCompanyName {
981
- /**
982
- * The first line of the contact's address.
983
- */
984
- addressLine1: string;
985
-
986
- companyName: string;
987
-
988
- /**
989
- * The ISO 3611-1 country code of the contact's address.
990
- */
991
- countryCode: string;
992
-
993
- /**
994
- * Second line of the contact's address, if applicable.
995
- */
996
- addressLine2?: string;
997
-
998
- /**
999
- * The city of the contact's address.
1000
- */
1001
- city?: string;
1002
-
1003
- /**
1004
- * An optional string describing this resource. Will be visible in the API and the
1005
- * dashboard.
1006
- */
1007
- description?: string;
1008
-
1009
- /**
1010
- * Email of the contact.
1011
- */
1012
- email?: string;
1013
-
1014
- /**
1015
- * First name of the contact.
1016
- */
1017
- firstName?: string;
1018
-
1019
- /**
1020
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1021
- * `verified` even if our address verification system says otherwise.
1022
- */
1023
- forceVerifiedStatus?: boolean;
1024
-
1025
- /**
1026
- * Job title of the contact.
1027
- */
1028
- jobTitle?: string;
1029
-
1030
- /**
1031
- * Last name of the contact.
1032
- */
1033
- lastName?: string;
1034
-
1035
- /**
1036
- * See the section on Metadata.
1037
- */
1038
- metadata?: { [key: string]: unknown };
1039
-
1040
- /**
1041
- * Phone number of the contact.
1042
- */
1043
- phoneNumber?: string;
1044
-
1045
- /**
1046
- * The postal or ZIP code of the contact's address.
1047
- */
1048
- postalOrZip?: string;
1049
-
1050
- /**
1051
- * Province or state of the contact's address.
1052
- */
1053
- provinceOrState?: string;
1054
-
1055
- /**
1056
- * If `true`, PostGrid will skip running this contact's address through our address
1057
- * verification system.
1058
- */
1059
- skipVerification?: boolean;
1060
- }
1061
- }
1062
-
1063
388
  export interface SelfMailerCreateWithPdfFile {
1064
389
  /**
1065
390
  * The contact information of the sender. You can pass contact information inline
1066
391
  * here just like you can for the `to`.
1067
392
  */
1068
- from:
1069
- | SelfMailerCreateWithPdfFile.ContactCreateWithFirstName
1070
- | SelfMailerCreateWithPdfFile.ContactCreateWithCompanyName
1071
- | string;
393
+ from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
1072
394
 
1073
395
  /**
1074
396
  * A 2 page PDF file. The first page is the inside of the self-mailer and the
@@ -1087,10 +409,7 @@ export declare namespace SelfMailerCreateParams {
1087
409
  * contacts regardless of whether you provide the information inline here or call
1088
410
  * the contact creation endpoint.
1089
411
  */
1090
- to:
1091
- | SelfMailerCreateWithPdfFile.ContactCreateWithFirstName
1092
- | SelfMailerCreateWithPdfFile.ContactCreateWithCompanyName
1093
- | string;
412
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
1094
413
 
1095
414
  /**
1096
415
  * An optional string describing this resource. Will be visible in the API and the
@@ -1123,341 +442,9 @@ export declare namespace SelfMailerCreateParams {
1123
442
  */
1124
443
  sendDate?: string;
1125
444
  }
1126
-
1127
- export namespace SelfMailerCreateWithPdfFile {
1128
- export interface ContactCreateWithFirstName {
1129
- /**
1130
- * The first line of the contact's address.
1131
- */
1132
- addressLine1: string;
1133
-
1134
- /**
1135
- * The ISO 3611-1 country code of the contact's address.
1136
- */
1137
- countryCode: string;
1138
-
1139
- firstName: string;
1140
-
1141
- /**
1142
- * Second line of the contact's address, if applicable.
1143
- */
1144
- addressLine2?: string;
1145
-
1146
- /**
1147
- * The city of the contact's address.
1148
- */
1149
- city?: string;
1150
-
1151
- /**
1152
- * Company name of the contact.
1153
- */
1154
- companyName?: string;
1155
-
1156
- /**
1157
- * An optional string describing this resource. Will be visible in the API and the
1158
- * dashboard.
1159
- */
1160
- description?: string;
1161
-
1162
- /**
1163
- * Email of the contact.
1164
- */
1165
- email?: string;
1166
-
1167
- /**
1168
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1169
- * `verified` even if our address verification system says otherwise.
1170
- */
1171
- forceVerifiedStatus?: boolean;
1172
-
1173
- /**
1174
- * Job title of the contact.
1175
- */
1176
- jobTitle?: string;
1177
-
1178
- /**
1179
- * Last name of the contact.
1180
- */
1181
- lastName?: string;
1182
-
1183
- /**
1184
- * See the section on Metadata.
1185
- */
1186
- metadata?: { [key: string]: unknown };
1187
-
1188
- /**
1189
- * Phone number of the contact.
1190
- */
1191
- phoneNumber?: string;
1192
-
1193
- /**
1194
- * The postal or ZIP code of the contact's address.
1195
- */
1196
- postalOrZip?: string;
1197
-
1198
- /**
1199
- * Province or state of the contact's address.
1200
- */
1201
- provinceOrState?: string;
1202
-
1203
- /**
1204
- * If `true`, PostGrid will skip running this contact's address through our address
1205
- * verification system.
1206
- */
1207
- skipVerification?: boolean;
1208
- }
1209
-
1210
- export interface ContactCreateWithCompanyName {
1211
- /**
1212
- * The first line of the contact's address.
1213
- */
1214
- addressLine1: string;
1215
-
1216
- companyName: string;
1217
-
1218
- /**
1219
- * The ISO 3611-1 country code of the contact's address.
1220
- */
1221
- countryCode: string;
1222
-
1223
- /**
1224
- * Second line of the contact's address, if applicable.
1225
- */
1226
- addressLine2?: string;
1227
-
1228
- /**
1229
- * The city of the contact's address.
1230
- */
1231
- city?: string;
1232
-
1233
- /**
1234
- * An optional string describing this resource. Will be visible in the API and the
1235
- * dashboard.
1236
- */
1237
- description?: string;
1238
-
1239
- /**
1240
- * Email of the contact.
1241
- */
1242
- email?: string;
1243
-
1244
- /**
1245
- * First name of the contact.
1246
- */
1247
- firstName?: string;
1248
-
1249
- /**
1250
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1251
- * `verified` even if our address verification system says otherwise.
1252
- */
1253
- forceVerifiedStatus?: boolean;
1254
-
1255
- /**
1256
- * Job title of the contact.
1257
- */
1258
- jobTitle?: string;
1259
-
1260
- /**
1261
- * Last name of the contact.
1262
- */
1263
- lastName?: string;
1264
-
1265
- /**
1266
- * See the section on Metadata.
1267
- */
1268
- metadata?: { [key: string]: unknown };
1269
-
1270
- /**
1271
- * Phone number of the contact.
1272
- */
1273
- phoneNumber?: string;
1274
-
1275
- /**
1276
- * The postal or ZIP code of the contact's address.
1277
- */
1278
- postalOrZip?: string;
1279
-
1280
- /**
1281
- * Province or state of the contact's address.
1282
- */
1283
- provinceOrState?: string;
1284
-
1285
- /**
1286
- * If `true`, PostGrid will skip running this contact's address through our address
1287
- * verification system.
1288
- */
1289
- skipVerification?: boolean;
1290
- }
1291
-
1292
- export interface ContactCreateWithFirstName {
1293
- /**
1294
- * The first line of the contact's address.
1295
- */
1296
- addressLine1: string;
1297
-
1298
- /**
1299
- * The ISO 3611-1 country code of the contact's address.
1300
- */
1301
- countryCode: string;
1302
-
1303
- firstName: string;
1304
-
1305
- /**
1306
- * Second line of the contact's address, if applicable.
1307
- */
1308
- addressLine2?: string;
1309
-
1310
- /**
1311
- * The city of the contact's address.
1312
- */
1313
- city?: string;
1314
-
1315
- /**
1316
- * Company name of the contact.
1317
- */
1318
- companyName?: string;
1319
-
1320
- /**
1321
- * An optional string describing this resource. Will be visible in the API and the
1322
- * dashboard.
1323
- */
1324
- description?: string;
1325
-
1326
- /**
1327
- * Email of the contact.
1328
- */
1329
- email?: string;
1330
-
1331
- /**
1332
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1333
- * `verified` even if our address verification system says otherwise.
1334
- */
1335
- forceVerifiedStatus?: boolean;
1336
-
1337
- /**
1338
- * Job title of the contact.
1339
- */
1340
- jobTitle?: string;
1341
-
1342
- /**
1343
- * Last name of the contact.
1344
- */
1345
- lastName?: string;
1346
-
1347
- /**
1348
- * See the section on Metadata.
1349
- */
1350
- metadata?: { [key: string]: unknown };
1351
-
1352
- /**
1353
- * Phone number of the contact.
1354
- */
1355
- phoneNumber?: string;
1356
-
1357
- /**
1358
- * The postal or ZIP code of the contact's address.
1359
- */
1360
- postalOrZip?: string;
1361
-
1362
- /**
1363
- * Province or state of the contact's address.
1364
- */
1365
- provinceOrState?: string;
1366
-
1367
- /**
1368
- * If `true`, PostGrid will skip running this contact's address through our address
1369
- * verification system.
1370
- */
1371
- skipVerification?: boolean;
1372
- }
1373
-
1374
- export interface ContactCreateWithCompanyName {
1375
- /**
1376
- * The first line of the contact's address.
1377
- */
1378
- addressLine1: string;
1379
-
1380
- companyName: string;
1381
-
1382
- /**
1383
- * The ISO 3611-1 country code of the contact's address.
1384
- */
1385
- countryCode: string;
1386
-
1387
- /**
1388
- * Second line of the contact's address, if applicable.
1389
- */
1390
- addressLine2?: string;
1391
-
1392
- /**
1393
- * The city of the contact's address.
1394
- */
1395
- city?: string;
1396
-
1397
- /**
1398
- * An optional string describing this resource. Will be visible in the API and the
1399
- * dashboard.
1400
- */
1401
- description?: string;
1402
-
1403
- /**
1404
- * Email of the contact.
1405
- */
1406
- email?: string;
1407
-
1408
- /**
1409
- * First name of the contact.
1410
- */
1411
- firstName?: string;
1412
-
1413
- /**
1414
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1415
- * `verified` even if our address verification system says otherwise.
1416
- */
1417
- forceVerifiedStatus?: boolean;
1418
-
1419
- /**
1420
- * Job title of the contact.
1421
- */
1422
- jobTitle?: string;
1423
-
1424
- /**
1425
- * Last name of the contact.
1426
- */
1427
- lastName?: string;
1428
-
1429
- /**
1430
- * See the section on Metadata.
1431
- */
1432
- metadata?: { [key: string]: unknown };
1433
-
1434
- /**
1435
- * Phone number of the contact.
1436
- */
1437
- phoneNumber?: string;
1438
-
1439
- /**
1440
- * The postal or ZIP code of the contact's address.
1441
- */
1442
- postalOrZip?: string;
1443
-
1444
- /**
1445
- * Province or state of the contact's address.
1446
- */
1447
- provinceOrState?: string;
1448
-
1449
- /**
1450
- * If `true`, PostGrid will skip running this contact's address through our address
1451
- * verification system.
1452
- */
1453
- skipVerification?: boolean;
1454
- }
1455
- }
1456
445
  }
1457
446
 
1458
- export interface SelfMailerListParams {
1459
- limit?: number;
1460
-
447
+ export interface SelfMailerListParams extends SkipLimitParams {
1461
448
  /**
1462
449
  * You can supply any string to help narrow down the list of resources. For
1463
450
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -1466,15 +453,13 @@ export interface SelfMailerListParams {
1466
453
  * more details.
1467
454
  */
1468
455
  search?: string;
1469
-
1470
- skip?: number;
1471
456
  }
1472
457
 
1473
458
  export declare namespace SelfMailers {
1474
459
  export {
1475
460
  type SelfMailer as SelfMailer,
1476
- type SelfMailerListResponse as SelfMailerListResponse,
1477
461
  type SelfMailerRetrieveURLResponse as SelfMailerRetrieveURLResponse,
462
+ type SelfMailersSkipLimit as SelfMailersSkipLimit,
1478
463
  type SelfMailerCreateParams as SelfMailerCreateParams,
1479
464
  type SelfMailerListParams as SelfMailerListParams,
1480
465
  };