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,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 OrderProfilesPostcardsAPI from './order-profiles/postcards';
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,14 +54,17 @@ export class Postcards extends APIResource {
52
54
  *
53
55
  * @example
54
56
  * ```ts
55
- * const postcards = await client.printMail.postcards.list();
57
+ * // Automatically fetches more pages as needed.
58
+ * for await (const postcard of client.printMail.postcards.list()) {
59
+ * // ...
60
+ * }
56
61
  * ```
57
62
  */
58
63
  list(
59
64
  query: PostcardListParams | null | undefined = {},
60
65
  options?: RequestOptions,
61
- ): APIPromise<PostcardListResponse> {
62
- return this._client.get('/print-mail/v1/postcards', { query, ...options });
66
+ ): PagePromise<PostcardsSkipLimit, Postcard> {
67
+ return this._client.getAPIList('/print-mail/v1/postcards', SkipLimit<Postcard>, { query, ...options });
63
68
  }
64
69
 
65
70
  /**
@@ -95,6 +100,8 @@ export class Postcards extends APIResource {
95
100
  }
96
101
  }
97
102
 
103
+ export type PostcardsSkipLimit = SkipLimit<Postcard>;
104
+
98
105
  export interface Postcard {
99
106
  /**
100
107
  * A unique ID prefixed with postcard\_
@@ -217,18 +224,6 @@ export interface Postcard {
217
224
  url?: string;
218
225
  }
219
226
 
220
- export interface PostcardListResponse {
221
- data: Array<Postcard>;
222
-
223
- limit: number;
224
-
225
- object: 'list';
226
-
227
- skip: number;
228
-
229
- totalCount: number;
230
- }
231
-
232
227
  export interface PostcardRetrieveURLResponse {
233
228
  /**
234
229
  * A unique ID prefixed with postcard\_
@@ -275,10 +270,7 @@ export declare namespace PostcardCreateParams {
275
270
  * contacts regardless of whether you provide the information inline here or call
276
271
  * the contact creation endpoint.
277
272
  */
278
- to:
279
- | PostcardCreateWithHTML.ContactCreateWithFirstName
280
- | PostcardCreateWithHTML.ContactCreateWithCompanyName
281
- | string;
273
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
282
274
 
283
275
  /**
284
276
  * An optional string describing this resource. Will be visible in the API and the
@@ -291,10 +283,7 @@ export declare namespace PostcardCreateParams {
291
283
  * here just like you can for the `to`. Unlike other order types, the sender
292
284
  * address is optional for postcards.
293
285
  */
294
- from?:
295
- | PostcardCreateWithHTML.ContactCreateWithFirstName
296
- | PostcardCreateWithHTML.ContactCreateWithCompanyName
297
- | string;
286
+ from?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
298
287
 
299
288
  /**
300
289
  * The mailing class of this order. If not provided, automatically set to
@@ -322,336 +311,6 @@ export declare namespace PostcardCreateParams {
322
311
  sendDate?: string;
323
312
  }
324
313
 
325
- export namespace PostcardCreateWithHTML {
326
- export interface ContactCreateWithFirstName {
327
- /**
328
- * The first line of the contact's address.
329
- */
330
- addressLine1: string;
331
-
332
- /**
333
- * The ISO 3611-1 country code of the contact's address.
334
- */
335
- countryCode: string;
336
-
337
- firstName: string;
338
-
339
- /**
340
- * Second line of the contact's address, if applicable.
341
- */
342
- addressLine2?: string;
343
-
344
- /**
345
- * The city of the contact's address.
346
- */
347
- city?: string;
348
-
349
- /**
350
- * Company name of the contact.
351
- */
352
- companyName?: string;
353
-
354
- /**
355
- * An optional string describing this resource. Will be visible in the API and the
356
- * dashboard.
357
- */
358
- description?: string;
359
-
360
- /**
361
- * Email of the contact.
362
- */
363
- email?: string;
364
-
365
- /**
366
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
367
- * `verified` even if our address verification system says otherwise.
368
- */
369
- forceVerifiedStatus?: boolean;
370
-
371
- /**
372
- * Job title of the contact.
373
- */
374
- jobTitle?: string;
375
-
376
- /**
377
- * Last name of the contact.
378
- */
379
- lastName?: string;
380
-
381
- /**
382
- * See the section on Metadata.
383
- */
384
- metadata?: { [key: string]: unknown };
385
-
386
- /**
387
- * Phone number of the contact.
388
- */
389
- phoneNumber?: string;
390
-
391
- /**
392
- * The postal or ZIP code of the contact's address.
393
- */
394
- postalOrZip?: string;
395
-
396
- /**
397
- * Province or state of the contact's address.
398
- */
399
- provinceOrState?: string;
400
-
401
- /**
402
- * If `true`, PostGrid will skip running this contact's address through our address
403
- * verification system.
404
- */
405
- skipVerification?: boolean;
406
- }
407
-
408
- export interface ContactCreateWithCompanyName {
409
- /**
410
- * The first line of the contact's address.
411
- */
412
- addressLine1: string;
413
-
414
- companyName: string;
415
-
416
- /**
417
- * The ISO 3611-1 country code of the contact's address.
418
- */
419
- countryCode: string;
420
-
421
- /**
422
- * Second line of the contact's address, if applicable.
423
- */
424
- addressLine2?: string;
425
-
426
- /**
427
- * The city of the contact's address.
428
- */
429
- city?: string;
430
-
431
- /**
432
- * An optional string describing this resource. Will be visible in the API and the
433
- * dashboard.
434
- */
435
- description?: string;
436
-
437
- /**
438
- * Email of the contact.
439
- */
440
- email?: string;
441
-
442
- /**
443
- * First name of the contact.
444
- */
445
- firstName?: string;
446
-
447
- /**
448
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
449
- * `verified` even if our address verification system says otherwise.
450
- */
451
- forceVerifiedStatus?: boolean;
452
-
453
- /**
454
- * Job title of the contact.
455
- */
456
- jobTitle?: string;
457
-
458
- /**
459
- * Last name of the contact.
460
- */
461
- lastName?: string;
462
-
463
- /**
464
- * See the section on Metadata.
465
- */
466
- metadata?: { [key: string]: unknown };
467
-
468
- /**
469
- * Phone number of the contact.
470
- */
471
- phoneNumber?: string;
472
-
473
- /**
474
- * The postal or ZIP code of the contact's address.
475
- */
476
- postalOrZip?: string;
477
-
478
- /**
479
- * Province or state of the contact's address.
480
- */
481
- provinceOrState?: string;
482
-
483
- /**
484
- * If `true`, PostGrid will skip running this contact's address through our address
485
- * verification system.
486
- */
487
- skipVerification?: boolean;
488
- }
489
-
490
- export interface ContactCreateWithFirstName {
491
- /**
492
- * The first line of the contact's address.
493
- */
494
- addressLine1: string;
495
-
496
- /**
497
- * The ISO 3611-1 country code of the contact's address.
498
- */
499
- countryCode: string;
500
-
501
- firstName: string;
502
-
503
- /**
504
- * Second line of the contact's address, if applicable.
505
- */
506
- addressLine2?: string;
507
-
508
- /**
509
- * The city of the contact's address.
510
- */
511
- city?: string;
512
-
513
- /**
514
- * Company name of the contact.
515
- */
516
- companyName?: string;
517
-
518
- /**
519
- * An optional string describing this resource. Will be visible in the API and the
520
- * dashboard.
521
- */
522
- description?: string;
523
-
524
- /**
525
- * Email of the contact.
526
- */
527
- email?: string;
528
-
529
- /**
530
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
531
- * `verified` even if our address verification system says otherwise.
532
- */
533
- forceVerifiedStatus?: boolean;
534
-
535
- /**
536
- * Job title of the contact.
537
- */
538
- jobTitle?: string;
539
-
540
- /**
541
- * Last name of the contact.
542
- */
543
- lastName?: string;
544
-
545
- /**
546
- * See the section on Metadata.
547
- */
548
- metadata?: { [key: string]: unknown };
549
-
550
- /**
551
- * Phone number of the contact.
552
- */
553
- phoneNumber?: string;
554
-
555
- /**
556
- * The postal or ZIP code of the contact's address.
557
- */
558
- postalOrZip?: string;
559
-
560
- /**
561
- * Province or state of the contact's address.
562
- */
563
- provinceOrState?: string;
564
-
565
- /**
566
- * If `true`, PostGrid will skip running this contact's address through our address
567
- * verification system.
568
- */
569
- skipVerification?: boolean;
570
- }
571
-
572
- export interface ContactCreateWithCompanyName {
573
- /**
574
- * The first line of the contact's address.
575
- */
576
- addressLine1: string;
577
-
578
- companyName: string;
579
-
580
- /**
581
- * The ISO 3611-1 country code of the contact's address.
582
- */
583
- countryCode: string;
584
-
585
- /**
586
- * Second line of the contact's address, if applicable.
587
- */
588
- addressLine2?: string;
589
-
590
- /**
591
- * The city of the contact's address.
592
- */
593
- city?: string;
594
-
595
- /**
596
- * An optional string describing this resource. Will be visible in the API and the
597
- * dashboard.
598
- */
599
- description?: string;
600
-
601
- /**
602
- * Email of the contact.
603
- */
604
- email?: string;
605
-
606
- /**
607
- * First name of the contact.
608
- */
609
- firstName?: string;
610
-
611
- /**
612
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
613
- * `verified` even if our address verification system says otherwise.
614
- */
615
- forceVerifiedStatus?: boolean;
616
-
617
- /**
618
- * Job title of the contact.
619
- */
620
- jobTitle?: string;
621
-
622
- /**
623
- * Last name of the contact.
624
- */
625
- lastName?: string;
626
-
627
- /**
628
- * See the section on Metadata.
629
- */
630
- metadata?: { [key: string]: unknown };
631
-
632
- /**
633
- * Phone number of the contact.
634
- */
635
- phoneNumber?: string;
636
-
637
- /**
638
- * The postal or ZIP code of the contact's address.
639
- */
640
- postalOrZip?: string;
641
-
642
- /**
643
- * Province or state of the contact's address.
644
- */
645
- provinceOrState?: string;
646
-
647
- /**
648
- * If `true`, PostGrid will skip running this contact's address through our address
649
- * verification system.
650
- */
651
- skipVerification?: boolean;
652
- }
653
- }
654
-
655
314
  export interface PostcardCreateWithTemplate {
656
315
  /**
657
316
  * The template ID for the back of the postcard. You can supply _either_ this or
@@ -684,10 +343,7 @@ export declare namespace PostcardCreateParams {
684
343
  * contacts regardless of whether you provide the information inline here or call
685
344
  * the contact creation endpoint.
686
345
  */
687
- to:
688
- | PostcardCreateWithPdfurl.ContactCreateWithFirstName
689
- | PostcardCreateWithPdfurl.ContactCreateWithCompanyName
690
- | string;
346
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
691
347
 
692
348
  /**
693
349
  * An optional string describing this resource. Will be visible in the API and the
@@ -700,10 +356,7 @@ export declare namespace PostcardCreateParams {
700
356
  * here just like you can for the `to`. Unlike other order types, the sender
701
357
  * address is optional for postcards.
702
358
  */
703
- from?:
704
- | PostcardCreateWithPdfurl.ContactCreateWithFirstName
705
- | PostcardCreateWithPdfurl.ContactCreateWithCompanyName
706
- | string;
359
+ from?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
707
360
 
708
361
  /**
709
362
  * The mailing class of this order. If not provided, automatically set to
@@ -731,336 +384,6 @@ export declare namespace PostcardCreateParams {
731
384
  sendDate?: string;
732
385
  }
733
386
 
734
- export namespace PostcardCreateWithPdfurl {
735
- export interface ContactCreateWithFirstName {
736
- /**
737
- * The first line of the contact's address.
738
- */
739
- addressLine1: string;
740
-
741
- /**
742
- * The ISO 3611-1 country code of the contact's address.
743
- */
744
- countryCode: string;
745
-
746
- firstName: string;
747
-
748
- /**
749
- * Second line of the contact's address, if applicable.
750
- */
751
- addressLine2?: string;
752
-
753
- /**
754
- * The city of the contact's address.
755
- */
756
- city?: string;
757
-
758
- /**
759
- * Company name of the contact.
760
- */
761
- companyName?: string;
762
-
763
- /**
764
- * An optional string describing this resource. Will be visible in the API and the
765
- * dashboard.
766
- */
767
- description?: string;
768
-
769
- /**
770
- * Email of the contact.
771
- */
772
- email?: string;
773
-
774
- /**
775
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
776
- * `verified` even if our address verification system says otherwise.
777
- */
778
- forceVerifiedStatus?: boolean;
779
-
780
- /**
781
- * Job title of the contact.
782
- */
783
- jobTitle?: string;
784
-
785
- /**
786
- * Last name of the contact.
787
- */
788
- lastName?: string;
789
-
790
- /**
791
- * See the section on Metadata.
792
- */
793
- metadata?: { [key: string]: unknown };
794
-
795
- /**
796
- * Phone number of the contact.
797
- */
798
- phoneNumber?: string;
799
-
800
- /**
801
- * The postal or ZIP code of the contact's address.
802
- */
803
- postalOrZip?: string;
804
-
805
- /**
806
- * Province or state of the contact's address.
807
- */
808
- provinceOrState?: string;
809
-
810
- /**
811
- * If `true`, PostGrid will skip running this contact's address through our address
812
- * verification system.
813
- */
814
- skipVerification?: boolean;
815
- }
816
-
817
- export interface ContactCreateWithCompanyName {
818
- /**
819
- * The first line of the contact's address.
820
- */
821
- addressLine1: string;
822
-
823
- companyName: string;
824
-
825
- /**
826
- * The ISO 3611-1 country code of the contact's address.
827
- */
828
- countryCode: string;
829
-
830
- /**
831
- * Second line of the contact's address, if applicable.
832
- */
833
- addressLine2?: string;
834
-
835
- /**
836
- * The city of the contact's address.
837
- */
838
- city?: string;
839
-
840
- /**
841
- * An optional string describing this resource. Will be visible in the API and the
842
- * dashboard.
843
- */
844
- description?: string;
845
-
846
- /**
847
- * Email of the contact.
848
- */
849
- email?: string;
850
-
851
- /**
852
- * First name of the contact.
853
- */
854
- firstName?: string;
855
-
856
- /**
857
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
858
- * `verified` even if our address verification system says otherwise.
859
- */
860
- forceVerifiedStatus?: boolean;
861
-
862
- /**
863
- * Job title of the contact.
864
- */
865
- jobTitle?: string;
866
-
867
- /**
868
- * Last name of the contact.
869
- */
870
- lastName?: string;
871
-
872
- /**
873
- * See the section on Metadata.
874
- */
875
- metadata?: { [key: string]: unknown };
876
-
877
- /**
878
- * Phone number of the contact.
879
- */
880
- phoneNumber?: string;
881
-
882
- /**
883
- * The postal or ZIP code of the contact's address.
884
- */
885
- postalOrZip?: string;
886
-
887
- /**
888
- * Province or state of the contact's address.
889
- */
890
- provinceOrState?: string;
891
-
892
- /**
893
- * If `true`, PostGrid will skip running this contact's address through our address
894
- * verification system.
895
- */
896
- skipVerification?: boolean;
897
- }
898
-
899
- export interface ContactCreateWithFirstName {
900
- /**
901
- * The first line of the contact's address.
902
- */
903
- addressLine1: string;
904
-
905
- /**
906
- * The ISO 3611-1 country code of the contact's address.
907
- */
908
- countryCode: string;
909
-
910
- firstName: string;
911
-
912
- /**
913
- * Second line of the contact's address, if applicable.
914
- */
915
- addressLine2?: string;
916
-
917
- /**
918
- * The city of the contact's address.
919
- */
920
- city?: string;
921
-
922
- /**
923
- * Company name of the contact.
924
- */
925
- companyName?: string;
926
-
927
- /**
928
- * An optional string describing this resource. Will be visible in the API and the
929
- * dashboard.
930
- */
931
- description?: string;
932
-
933
- /**
934
- * Email of the contact.
935
- */
936
- email?: string;
937
-
938
- /**
939
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
940
- * `verified` even if our address verification system says otherwise.
941
- */
942
- forceVerifiedStatus?: boolean;
943
-
944
- /**
945
- * Job title of the contact.
946
- */
947
- jobTitle?: string;
948
-
949
- /**
950
- * Last name of the contact.
951
- */
952
- lastName?: string;
953
-
954
- /**
955
- * See the section on Metadata.
956
- */
957
- metadata?: { [key: string]: unknown };
958
-
959
- /**
960
- * Phone number of the contact.
961
- */
962
- phoneNumber?: string;
963
-
964
- /**
965
- * The postal or ZIP code of the contact's address.
966
- */
967
- postalOrZip?: string;
968
-
969
- /**
970
- * Province or state of the contact's address.
971
- */
972
- provinceOrState?: string;
973
-
974
- /**
975
- * If `true`, PostGrid will skip running this contact's address through our address
976
- * verification system.
977
- */
978
- skipVerification?: boolean;
979
- }
980
-
981
- export interface ContactCreateWithCompanyName {
982
- /**
983
- * The first line of the contact's address.
984
- */
985
- addressLine1: string;
986
-
987
- companyName: string;
988
-
989
- /**
990
- * The ISO 3611-1 country code of the contact's address.
991
- */
992
- countryCode: string;
993
-
994
- /**
995
- * Second line of the contact's address, if applicable.
996
- */
997
- addressLine2?: string;
998
-
999
- /**
1000
- * The city of the contact's address.
1001
- */
1002
- city?: string;
1003
-
1004
- /**
1005
- * An optional string describing this resource. Will be visible in the API and the
1006
- * dashboard.
1007
- */
1008
- description?: string;
1009
-
1010
- /**
1011
- * Email of the contact.
1012
- */
1013
- email?: string;
1014
-
1015
- /**
1016
- * First name of the contact.
1017
- */
1018
- firstName?: string;
1019
-
1020
- /**
1021
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1022
- * `verified` even if our address verification system says otherwise.
1023
- */
1024
- forceVerifiedStatus?: boolean;
1025
-
1026
- /**
1027
- * Job title of the contact.
1028
- */
1029
- jobTitle?: string;
1030
-
1031
- /**
1032
- * Last name of the contact.
1033
- */
1034
- lastName?: string;
1035
-
1036
- /**
1037
- * See the section on Metadata.
1038
- */
1039
- metadata?: { [key: string]: unknown };
1040
-
1041
- /**
1042
- * Phone number of the contact.
1043
- */
1044
- phoneNumber?: string;
1045
-
1046
- /**
1047
- * The postal or ZIP code of the contact's address.
1048
- */
1049
- postalOrZip?: string;
1050
-
1051
- /**
1052
- * Province or state of the contact's address.
1053
- */
1054
- provinceOrState?: string;
1055
-
1056
- /**
1057
- * If `true`, PostGrid will skip running this contact's address through our address
1058
- * verification system.
1059
- */
1060
- skipVerification?: boolean;
1061
- }
1062
- }
1063
-
1064
387
  export interface PostcardCreateWithPdfFile {
1065
388
  /**
1066
389
  * A 2 page PDF file. The first page is the front of the postcard and the second
@@ -1079,10 +402,7 @@ export declare namespace PostcardCreateParams {
1079
402
  * contacts regardless of whether you provide the information inline here or call
1080
403
  * the contact creation endpoint.
1081
404
  */
1082
- to:
1083
- | PostcardCreateWithPdfFile.ContactCreateWithFirstName
1084
- | PostcardCreateWithPdfFile.ContactCreateWithCompanyName
1085
- | string;
405
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
1086
406
 
1087
407
  /**
1088
408
  * An optional string describing this resource. Will be visible in the API and the
@@ -1095,10 +415,7 @@ export declare namespace PostcardCreateParams {
1095
415
  * here just like you can for the `to`. Unlike other order types, the sender
1096
416
  * address is optional for postcards.
1097
417
  */
1098
- from?:
1099
- | PostcardCreateWithPdfFile.ContactCreateWithFirstName
1100
- | PostcardCreateWithPdfFile.ContactCreateWithCompanyName
1101
- | string;
418
+ from?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
1102
419
 
1103
420
  /**
1104
421
  * The mailing class of this order. If not provided, automatically set to
@@ -1125,341 +442,9 @@ export declare namespace PostcardCreateParams {
1125
442
  */
1126
443
  sendDate?: string;
1127
444
  }
1128
-
1129
- export namespace PostcardCreateWithPdfFile {
1130
- export interface ContactCreateWithFirstName {
1131
- /**
1132
- * The first line of the contact's address.
1133
- */
1134
- addressLine1: string;
1135
-
1136
- /**
1137
- * The ISO 3611-1 country code of the contact's address.
1138
- */
1139
- countryCode: string;
1140
-
1141
- firstName: string;
1142
-
1143
- /**
1144
- * Second line of the contact's address, if applicable.
1145
- */
1146
- addressLine2?: string;
1147
-
1148
- /**
1149
- * The city of the contact's address.
1150
- */
1151
- city?: string;
1152
-
1153
- /**
1154
- * Company name of the contact.
1155
- */
1156
- companyName?: string;
1157
-
1158
- /**
1159
- * An optional string describing this resource. Will be visible in the API and the
1160
- * dashboard.
1161
- */
1162
- description?: string;
1163
-
1164
- /**
1165
- * Email of the contact.
1166
- */
1167
- email?: string;
1168
-
1169
- /**
1170
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1171
- * `verified` even if our address verification system says otherwise.
1172
- */
1173
- forceVerifiedStatus?: boolean;
1174
-
1175
- /**
1176
- * Job title of the contact.
1177
- */
1178
- jobTitle?: string;
1179
-
1180
- /**
1181
- * Last name of the contact.
1182
- */
1183
- lastName?: string;
1184
-
1185
- /**
1186
- * See the section on Metadata.
1187
- */
1188
- metadata?: { [key: string]: unknown };
1189
-
1190
- /**
1191
- * Phone number of the contact.
1192
- */
1193
- phoneNumber?: string;
1194
-
1195
- /**
1196
- * The postal or ZIP code of the contact's address.
1197
- */
1198
- postalOrZip?: string;
1199
-
1200
- /**
1201
- * Province or state of the contact's address.
1202
- */
1203
- provinceOrState?: string;
1204
-
1205
- /**
1206
- * If `true`, PostGrid will skip running this contact's address through our address
1207
- * verification system.
1208
- */
1209
- skipVerification?: boolean;
1210
- }
1211
-
1212
- export interface ContactCreateWithCompanyName {
1213
- /**
1214
- * The first line of the contact's address.
1215
- */
1216
- addressLine1: string;
1217
-
1218
- companyName: string;
1219
-
1220
- /**
1221
- * The ISO 3611-1 country code of the contact's address.
1222
- */
1223
- countryCode: string;
1224
-
1225
- /**
1226
- * Second line of the contact's address, if applicable.
1227
- */
1228
- addressLine2?: string;
1229
-
1230
- /**
1231
- * The city of the contact's address.
1232
- */
1233
- city?: string;
1234
-
1235
- /**
1236
- * An optional string describing this resource. Will be visible in the API and the
1237
- * dashboard.
1238
- */
1239
- description?: string;
1240
-
1241
- /**
1242
- * Email of the contact.
1243
- */
1244
- email?: string;
1245
-
1246
- /**
1247
- * First name of the contact.
1248
- */
1249
- firstName?: string;
1250
-
1251
- /**
1252
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1253
- * `verified` even if our address verification system says otherwise.
1254
- */
1255
- forceVerifiedStatus?: boolean;
1256
-
1257
- /**
1258
- * Job title of the contact.
1259
- */
1260
- jobTitle?: string;
1261
-
1262
- /**
1263
- * Last name of the contact.
1264
- */
1265
- lastName?: string;
1266
-
1267
- /**
1268
- * See the section on Metadata.
1269
- */
1270
- metadata?: { [key: string]: unknown };
1271
-
1272
- /**
1273
- * Phone number of the contact.
1274
- */
1275
- phoneNumber?: string;
1276
-
1277
- /**
1278
- * The postal or ZIP code of the contact's address.
1279
- */
1280
- postalOrZip?: string;
1281
-
1282
- /**
1283
- * Province or state of the contact's address.
1284
- */
1285
- provinceOrState?: string;
1286
-
1287
- /**
1288
- * If `true`, PostGrid will skip running this contact's address through our address
1289
- * verification system.
1290
- */
1291
- skipVerification?: boolean;
1292
- }
1293
-
1294
- export interface ContactCreateWithFirstName {
1295
- /**
1296
- * The first line of the contact's address.
1297
- */
1298
- addressLine1: string;
1299
-
1300
- /**
1301
- * The ISO 3611-1 country code of the contact's address.
1302
- */
1303
- countryCode: string;
1304
-
1305
- firstName: string;
1306
-
1307
- /**
1308
- * Second line of the contact's address, if applicable.
1309
- */
1310
- addressLine2?: string;
1311
-
1312
- /**
1313
- * The city of the contact's address.
1314
- */
1315
- city?: string;
1316
-
1317
- /**
1318
- * Company name of the contact.
1319
- */
1320
- companyName?: string;
1321
-
1322
- /**
1323
- * An optional string describing this resource. Will be visible in the API and the
1324
- * dashboard.
1325
- */
1326
- description?: string;
1327
-
1328
- /**
1329
- * Email of the contact.
1330
- */
1331
- email?: string;
1332
-
1333
- /**
1334
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1335
- * `verified` even if our address verification system says otherwise.
1336
- */
1337
- forceVerifiedStatus?: boolean;
1338
-
1339
- /**
1340
- * Job title of the contact.
1341
- */
1342
- jobTitle?: string;
1343
-
1344
- /**
1345
- * Last name of the contact.
1346
- */
1347
- lastName?: string;
1348
-
1349
- /**
1350
- * See the section on Metadata.
1351
- */
1352
- metadata?: { [key: string]: unknown };
1353
-
1354
- /**
1355
- * Phone number of the contact.
1356
- */
1357
- phoneNumber?: string;
1358
-
1359
- /**
1360
- * The postal or ZIP code of the contact's address.
1361
- */
1362
- postalOrZip?: string;
1363
-
1364
- /**
1365
- * Province or state of the contact's address.
1366
- */
1367
- provinceOrState?: string;
1368
-
1369
- /**
1370
- * If `true`, PostGrid will skip running this contact's address through our address
1371
- * verification system.
1372
- */
1373
- skipVerification?: boolean;
1374
- }
1375
-
1376
- export interface ContactCreateWithCompanyName {
1377
- /**
1378
- * The first line of the contact's address.
1379
- */
1380
- addressLine1: string;
1381
-
1382
- companyName: string;
1383
-
1384
- /**
1385
- * The ISO 3611-1 country code of the contact's address.
1386
- */
1387
- countryCode: string;
1388
-
1389
- /**
1390
- * Second line of the contact's address, if applicable.
1391
- */
1392
- addressLine2?: string;
1393
-
1394
- /**
1395
- * The city of the contact's address.
1396
- */
1397
- city?: string;
1398
-
1399
- /**
1400
- * An optional string describing this resource. Will be visible in the API and the
1401
- * dashboard.
1402
- */
1403
- description?: string;
1404
-
1405
- /**
1406
- * Email of the contact.
1407
- */
1408
- email?: string;
1409
-
1410
- /**
1411
- * First name of the contact.
1412
- */
1413
- firstName?: string;
1414
-
1415
- /**
1416
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1417
- * `verified` even if our address verification system says otherwise.
1418
- */
1419
- forceVerifiedStatus?: boolean;
1420
-
1421
- /**
1422
- * Job title of the contact.
1423
- */
1424
- jobTitle?: string;
1425
-
1426
- /**
1427
- * Last name of the contact.
1428
- */
1429
- lastName?: string;
1430
-
1431
- /**
1432
- * See the section on Metadata.
1433
- */
1434
- metadata?: { [key: string]: unknown };
1435
-
1436
- /**
1437
- * Phone number of the contact.
1438
- */
1439
- phoneNumber?: string;
1440
-
1441
- /**
1442
- * The postal or ZIP code of the contact's address.
1443
- */
1444
- postalOrZip?: string;
1445
-
1446
- /**
1447
- * Province or state of the contact's address.
1448
- */
1449
- provinceOrState?: string;
1450
-
1451
- /**
1452
- * If `true`, PostGrid will skip running this contact's address through our address
1453
- * verification system.
1454
- */
1455
- skipVerification?: boolean;
1456
- }
1457
- }
1458
445
  }
1459
446
 
1460
- export interface PostcardListParams {
1461
- limit?: number;
1462
-
447
+ export interface PostcardListParams extends SkipLimitParams {
1463
448
  /**
1464
449
  * You can supply any string to help narrow down the list of resources. For
1465
450
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -1468,15 +453,13 @@ export interface PostcardListParams {
1468
453
  * more details.
1469
454
  */
1470
455
  search?: string;
1471
-
1472
- skip?: number;
1473
456
  }
1474
457
 
1475
458
  export declare namespace Postcards {
1476
459
  export {
1477
460
  type Postcard as Postcard,
1478
- type PostcardListResponse as PostcardListResponse,
1479
461
  type PostcardRetrieveURLResponse as PostcardRetrieveURLResponse,
462
+ type PostcardsSkipLimit as PostcardsSkipLimit,
1480
463
  type PostcardCreateParams as PostcardCreateParams,
1481
464
  type PostcardListParams as PostcardListParams,
1482
465
  };