postgrid-node 0.3.0 → 0.4.1

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 +31 -0
  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
@@ -1,8 +1,10 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as BoxesAPI from "./boxes.mjs";
3
3
  import * as ContactsAPI from "./contacts.mjs";
4
+ import * as PrintMailAPI from "./print-mail.mjs";
4
5
  import * as OrderProfilesPostcardsAPI from "./order-profiles/postcards.mjs";
5
6
  import { APIPromise } from "../../core/api-promise.mjs";
7
+ import { PagePromise, SkipLimit, type SkipLimitParams } from "../../core/pagination.mjs";
6
8
  import { RequestOptions } from "../../internal/request-options.mjs";
7
9
  export declare class Postcards extends APIResource {
8
10
  /**
@@ -42,10 +44,13 @@ export declare class Postcards extends APIResource {
42
44
  *
43
45
  * @example
44
46
  * ```ts
45
- * const postcards = await client.printMail.postcards.list();
47
+ * // Automatically fetches more pages as needed.
48
+ * for await (const postcard of client.printMail.postcards.list()) {
49
+ * // ...
50
+ * }
46
51
  * ```
47
52
  */
48
- list(query?: PostcardListParams | null | undefined, options?: RequestOptions): APIPromise<PostcardListResponse>;
53
+ list(query?: PostcardListParams | null | undefined, options?: RequestOptions): PagePromise<PostcardsSkipLimit, Postcard>;
49
54
  /**
50
55
  * Cancel a postcard by ID. Note that this operation cannot be undone.
51
56
  *
@@ -73,6 +78,7 @@ export declare class Postcards extends APIResource {
73
78
  */
74
79
  retrieveURL(id: string, options?: RequestOptions): APIPromise<PostcardRetrieveURLResponse>;
75
80
  }
81
+ export type PostcardsSkipLimit = SkipLimit<Postcard>;
76
82
  export interface Postcard {
77
83
  /**
78
84
  * A unique ID prefixed with postcard\_
@@ -179,13 +185,6 @@ export interface Postcard {
179
185
  */
180
186
  url?: string;
181
187
  }
182
- export interface PostcardListResponse {
183
- data: Array<Postcard>;
184
- limit: number;
185
- object: 'list';
186
- skip: number;
187
- totalCount: number;
188
- }
189
188
  export interface PostcardRetrieveURLResponse {
190
189
  /**
191
190
  * A unique ID prefixed with postcard\_
@@ -221,7 +220,7 @@ export declare namespace PostcardCreateParams {
221
220
  * contacts regardless of whether you provide the information inline here or call
222
221
  * the contact creation endpoint.
223
222
  */
224
- to: PostcardCreateWithHTML.ContactCreateWithFirstName | PostcardCreateWithHTML.ContactCreateWithCompanyName | string;
223
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
225
224
  /**
226
225
  * An optional string describing this resource. Will be visible in the API and the
227
226
  * dashboard.
@@ -232,7 +231,7 @@ export declare namespace PostcardCreateParams {
232
231
  * here just like you can for the `to`. Unlike other order types, the sender
233
232
  * address is optional for postcards.
234
233
  */
235
- from?: PostcardCreateWithHTML.ContactCreateWithFirstName | PostcardCreateWithHTML.ContactCreateWithCompanyName | string;
234
+ from?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
236
235
  /**
237
236
  * The mailing class of this order. If not provided, automatically set to
238
237
  * `first_class`.
@@ -259,280 +258,6 @@ export declare namespace PostcardCreateParams {
259
258
  */
260
259
  sendDate?: string;
261
260
  }
262
- namespace PostcardCreateWithHTML {
263
- interface ContactCreateWithFirstName {
264
- /**
265
- * The first line of the contact's address.
266
- */
267
- addressLine1: string;
268
- /**
269
- * The ISO 3611-1 country code of the contact's address.
270
- */
271
- countryCode: string;
272
- firstName: string;
273
- /**
274
- * Second line of the contact's address, if applicable.
275
- */
276
- addressLine2?: string;
277
- /**
278
- * The city of the contact's address.
279
- */
280
- city?: string;
281
- /**
282
- * Company name of the contact.
283
- */
284
- companyName?: string;
285
- /**
286
- * An optional string describing this resource. Will be visible in the API and the
287
- * dashboard.
288
- */
289
- description?: string;
290
- /**
291
- * Email of the contact.
292
- */
293
- email?: string;
294
- /**
295
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
296
- * `verified` even if our address verification system says otherwise.
297
- */
298
- forceVerifiedStatus?: boolean;
299
- /**
300
- * Job title of the contact.
301
- */
302
- jobTitle?: string;
303
- /**
304
- * Last name of the contact.
305
- */
306
- lastName?: string;
307
- /**
308
- * See the section on Metadata.
309
- */
310
- metadata?: {
311
- [key: string]: unknown;
312
- };
313
- /**
314
- * Phone number of the contact.
315
- */
316
- phoneNumber?: string;
317
- /**
318
- * The postal or ZIP code of the contact's address.
319
- */
320
- postalOrZip?: string;
321
- /**
322
- * Province or state of the contact's address.
323
- */
324
- provinceOrState?: string;
325
- /**
326
- * If `true`, PostGrid will skip running this contact's address through our address
327
- * verification system.
328
- */
329
- skipVerification?: boolean;
330
- }
331
- interface ContactCreateWithCompanyName {
332
- /**
333
- * The first line of the contact's address.
334
- */
335
- addressLine1: string;
336
- companyName: string;
337
- /**
338
- * The ISO 3611-1 country code of the contact's address.
339
- */
340
- countryCode: string;
341
- /**
342
- * Second line of the contact's address, if applicable.
343
- */
344
- addressLine2?: string;
345
- /**
346
- * The city of the contact's address.
347
- */
348
- city?: string;
349
- /**
350
- * An optional string describing this resource. Will be visible in the API and the
351
- * dashboard.
352
- */
353
- description?: string;
354
- /**
355
- * Email of the contact.
356
- */
357
- email?: string;
358
- /**
359
- * First name of the contact.
360
- */
361
- firstName?: string;
362
- /**
363
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
364
- * `verified` even if our address verification system says otherwise.
365
- */
366
- forceVerifiedStatus?: boolean;
367
- /**
368
- * Job title of the contact.
369
- */
370
- jobTitle?: string;
371
- /**
372
- * Last name of the contact.
373
- */
374
- lastName?: string;
375
- /**
376
- * See the section on Metadata.
377
- */
378
- metadata?: {
379
- [key: string]: unknown;
380
- };
381
- /**
382
- * Phone number of the contact.
383
- */
384
- phoneNumber?: string;
385
- /**
386
- * The postal or ZIP code of the contact's address.
387
- */
388
- postalOrZip?: string;
389
- /**
390
- * Province or state of the contact's address.
391
- */
392
- provinceOrState?: string;
393
- /**
394
- * If `true`, PostGrid will skip running this contact's address through our address
395
- * verification system.
396
- */
397
- skipVerification?: boolean;
398
- }
399
- interface ContactCreateWithFirstName {
400
- /**
401
- * The first line of the contact's address.
402
- */
403
- addressLine1: string;
404
- /**
405
- * The ISO 3611-1 country code of the contact's address.
406
- */
407
- countryCode: string;
408
- firstName: string;
409
- /**
410
- * Second line of the contact's address, if applicable.
411
- */
412
- addressLine2?: string;
413
- /**
414
- * The city of the contact's address.
415
- */
416
- city?: string;
417
- /**
418
- * Company name of the contact.
419
- */
420
- companyName?: string;
421
- /**
422
- * An optional string describing this resource. Will be visible in the API and the
423
- * dashboard.
424
- */
425
- description?: string;
426
- /**
427
- * Email of the contact.
428
- */
429
- email?: string;
430
- /**
431
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
432
- * `verified` even if our address verification system says otherwise.
433
- */
434
- forceVerifiedStatus?: boolean;
435
- /**
436
- * Job title of the contact.
437
- */
438
- jobTitle?: string;
439
- /**
440
- * Last name of the contact.
441
- */
442
- lastName?: string;
443
- /**
444
- * See the section on Metadata.
445
- */
446
- metadata?: {
447
- [key: string]: unknown;
448
- };
449
- /**
450
- * Phone number of the contact.
451
- */
452
- phoneNumber?: string;
453
- /**
454
- * The postal or ZIP code of the contact's address.
455
- */
456
- postalOrZip?: string;
457
- /**
458
- * Province or state of the contact's address.
459
- */
460
- provinceOrState?: string;
461
- /**
462
- * If `true`, PostGrid will skip running this contact's address through our address
463
- * verification system.
464
- */
465
- skipVerification?: boolean;
466
- }
467
- interface ContactCreateWithCompanyName {
468
- /**
469
- * The first line of the contact's address.
470
- */
471
- addressLine1: string;
472
- companyName: string;
473
- /**
474
- * The ISO 3611-1 country code of the contact's address.
475
- */
476
- countryCode: string;
477
- /**
478
- * Second line of the contact's address, if applicable.
479
- */
480
- addressLine2?: string;
481
- /**
482
- * The city of the contact's address.
483
- */
484
- city?: string;
485
- /**
486
- * An optional string describing this resource. Will be visible in the API and the
487
- * dashboard.
488
- */
489
- description?: string;
490
- /**
491
- * Email of the contact.
492
- */
493
- email?: string;
494
- /**
495
- * First name of the contact.
496
- */
497
- firstName?: string;
498
- /**
499
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
500
- * `verified` even if our address verification system says otherwise.
501
- */
502
- forceVerifiedStatus?: boolean;
503
- /**
504
- * Job title of the contact.
505
- */
506
- jobTitle?: string;
507
- /**
508
- * Last name of the contact.
509
- */
510
- lastName?: string;
511
- /**
512
- * See the section on Metadata.
513
- */
514
- metadata?: {
515
- [key: string]: unknown;
516
- };
517
- /**
518
- * Phone number of the contact.
519
- */
520
- phoneNumber?: string;
521
- /**
522
- * The postal or ZIP code of the contact's address.
523
- */
524
- postalOrZip?: string;
525
- /**
526
- * Province or state of the contact's address.
527
- */
528
- provinceOrState?: string;
529
- /**
530
- * If `true`, PostGrid will skip running this contact's address through our address
531
- * verification system.
532
- */
533
- skipVerification?: boolean;
534
- }
535
- }
536
261
  interface PostcardCreateWithTemplate {
537
262
  /**
538
263
  * The template ID for the back of the postcard. You can supply _either_ this or
@@ -561,7 +286,7 @@ export declare namespace PostcardCreateParams {
561
286
  * contacts regardless of whether you provide the information inline here or call
562
287
  * the contact creation endpoint.
563
288
  */
564
- to: PostcardCreateWithPdfurl.ContactCreateWithFirstName | PostcardCreateWithPdfurl.ContactCreateWithCompanyName | string;
289
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
565
290
  /**
566
291
  * An optional string describing this resource. Will be visible in the API and the
567
292
  * dashboard.
@@ -572,7 +297,7 @@ export declare namespace PostcardCreateParams {
572
297
  * here just like you can for the `to`. Unlike other order types, the sender
573
298
  * address is optional for postcards.
574
299
  */
575
- from?: PostcardCreateWithPdfurl.ContactCreateWithFirstName | PostcardCreateWithPdfurl.ContactCreateWithCompanyName | string;
300
+ from?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
576
301
  /**
577
302
  * The mailing class of this order. If not provided, automatically set to
578
303
  * `first_class`.
@@ -599,280 +324,6 @@ export declare namespace PostcardCreateParams {
599
324
  */
600
325
  sendDate?: string;
601
326
  }
602
- namespace PostcardCreateWithPdfurl {
603
- interface ContactCreateWithFirstName {
604
- /**
605
- * The first line of the contact's address.
606
- */
607
- addressLine1: string;
608
- /**
609
- * The ISO 3611-1 country code of the contact's address.
610
- */
611
- countryCode: string;
612
- firstName: string;
613
- /**
614
- * Second line of the contact's address, if applicable.
615
- */
616
- addressLine2?: string;
617
- /**
618
- * The city of the contact's address.
619
- */
620
- city?: string;
621
- /**
622
- * Company name of the contact.
623
- */
624
- companyName?: string;
625
- /**
626
- * An optional string describing this resource. Will be visible in the API and the
627
- * dashboard.
628
- */
629
- description?: string;
630
- /**
631
- * Email of the contact.
632
- */
633
- email?: string;
634
- /**
635
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
636
- * `verified` even if our address verification system says otherwise.
637
- */
638
- forceVerifiedStatus?: boolean;
639
- /**
640
- * Job title of the contact.
641
- */
642
- jobTitle?: string;
643
- /**
644
- * Last name of the contact.
645
- */
646
- lastName?: string;
647
- /**
648
- * See the section on Metadata.
649
- */
650
- metadata?: {
651
- [key: string]: unknown;
652
- };
653
- /**
654
- * Phone number of the contact.
655
- */
656
- phoneNumber?: string;
657
- /**
658
- * The postal or ZIP code of the contact's address.
659
- */
660
- postalOrZip?: string;
661
- /**
662
- * Province or state of the contact's address.
663
- */
664
- provinceOrState?: string;
665
- /**
666
- * If `true`, PostGrid will skip running this contact's address through our address
667
- * verification system.
668
- */
669
- skipVerification?: boolean;
670
- }
671
- interface ContactCreateWithCompanyName {
672
- /**
673
- * The first line of the contact's address.
674
- */
675
- addressLine1: string;
676
- companyName: string;
677
- /**
678
- * The ISO 3611-1 country code of the contact's address.
679
- */
680
- countryCode: string;
681
- /**
682
- * Second line of the contact's address, if applicable.
683
- */
684
- addressLine2?: string;
685
- /**
686
- * The city of the contact's address.
687
- */
688
- city?: string;
689
- /**
690
- * An optional string describing this resource. Will be visible in the API and the
691
- * dashboard.
692
- */
693
- description?: string;
694
- /**
695
- * Email of the contact.
696
- */
697
- email?: string;
698
- /**
699
- * First name of the contact.
700
- */
701
- firstName?: string;
702
- /**
703
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
704
- * `verified` even if our address verification system says otherwise.
705
- */
706
- forceVerifiedStatus?: boolean;
707
- /**
708
- * Job title of the contact.
709
- */
710
- jobTitle?: string;
711
- /**
712
- * Last name of the contact.
713
- */
714
- lastName?: string;
715
- /**
716
- * See the section on Metadata.
717
- */
718
- metadata?: {
719
- [key: string]: unknown;
720
- };
721
- /**
722
- * Phone number of the contact.
723
- */
724
- phoneNumber?: string;
725
- /**
726
- * The postal or ZIP code of the contact's address.
727
- */
728
- postalOrZip?: string;
729
- /**
730
- * Province or state of the contact's address.
731
- */
732
- provinceOrState?: string;
733
- /**
734
- * If `true`, PostGrid will skip running this contact's address through our address
735
- * verification system.
736
- */
737
- skipVerification?: boolean;
738
- }
739
- interface ContactCreateWithFirstName {
740
- /**
741
- * The first line of the contact's address.
742
- */
743
- addressLine1: string;
744
- /**
745
- * The ISO 3611-1 country code of the contact's address.
746
- */
747
- countryCode: string;
748
- firstName: string;
749
- /**
750
- * Second line of the contact's address, if applicable.
751
- */
752
- addressLine2?: string;
753
- /**
754
- * The city of the contact's address.
755
- */
756
- city?: string;
757
- /**
758
- * Company name of the contact.
759
- */
760
- companyName?: string;
761
- /**
762
- * An optional string describing this resource. Will be visible in the API and the
763
- * dashboard.
764
- */
765
- description?: string;
766
- /**
767
- * Email of the contact.
768
- */
769
- email?: string;
770
- /**
771
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
772
- * `verified` even if our address verification system says otherwise.
773
- */
774
- forceVerifiedStatus?: boolean;
775
- /**
776
- * Job title of the contact.
777
- */
778
- jobTitle?: string;
779
- /**
780
- * Last name of the contact.
781
- */
782
- lastName?: string;
783
- /**
784
- * See the section on Metadata.
785
- */
786
- metadata?: {
787
- [key: string]: unknown;
788
- };
789
- /**
790
- * Phone number of the contact.
791
- */
792
- phoneNumber?: string;
793
- /**
794
- * The postal or ZIP code of the contact's address.
795
- */
796
- postalOrZip?: string;
797
- /**
798
- * Province or state of the contact's address.
799
- */
800
- provinceOrState?: string;
801
- /**
802
- * If `true`, PostGrid will skip running this contact's address through our address
803
- * verification system.
804
- */
805
- skipVerification?: boolean;
806
- }
807
- interface ContactCreateWithCompanyName {
808
- /**
809
- * The first line of the contact's address.
810
- */
811
- addressLine1: string;
812
- companyName: string;
813
- /**
814
- * The ISO 3611-1 country code of the contact's address.
815
- */
816
- countryCode: string;
817
- /**
818
- * Second line of the contact's address, if applicable.
819
- */
820
- addressLine2?: string;
821
- /**
822
- * The city of the contact's address.
823
- */
824
- city?: string;
825
- /**
826
- * An optional string describing this resource. Will be visible in the API and the
827
- * dashboard.
828
- */
829
- description?: string;
830
- /**
831
- * Email of the contact.
832
- */
833
- email?: string;
834
- /**
835
- * First name of the contact.
836
- */
837
- firstName?: string;
838
- /**
839
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
840
- * `verified` even if our address verification system says otherwise.
841
- */
842
- forceVerifiedStatus?: boolean;
843
- /**
844
- * Job title of the contact.
845
- */
846
- jobTitle?: string;
847
- /**
848
- * Last name of the contact.
849
- */
850
- lastName?: string;
851
- /**
852
- * See the section on Metadata.
853
- */
854
- metadata?: {
855
- [key: string]: unknown;
856
- };
857
- /**
858
- * Phone number of the contact.
859
- */
860
- phoneNumber?: string;
861
- /**
862
- * The postal or ZIP code of the contact's address.
863
- */
864
- postalOrZip?: string;
865
- /**
866
- * Province or state of the contact's address.
867
- */
868
- provinceOrState?: string;
869
- /**
870
- * If `true`, PostGrid will skip running this contact's address through our address
871
- * verification system.
872
- */
873
- skipVerification?: boolean;
874
- }
875
- }
876
327
  interface PostcardCreateWithPdfFile {
877
328
  /**
878
329
  * A 2 page PDF file. The first page is the front of the postcard and the second
@@ -889,7 +340,7 @@ export declare namespace PostcardCreateParams {
889
340
  * contacts regardless of whether you provide the information inline here or call
890
341
  * the contact creation endpoint.
891
342
  */
892
- to: PostcardCreateWithPdfFile.ContactCreateWithFirstName | PostcardCreateWithPdfFile.ContactCreateWithCompanyName | string;
343
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
893
344
  /**
894
345
  * An optional string describing this resource. Will be visible in the API and the
895
346
  * dashboard.
@@ -900,7 +351,7 @@ export declare namespace PostcardCreateParams {
900
351
  * here just like you can for the `to`. Unlike other order types, the sender
901
352
  * address is optional for postcards.
902
353
  */
903
- from?: PostcardCreateWithPdfFile.ContactCreateWithFirstName | PostcardCreateWithPdfFile.ContactCreateWithCompanyName | string;
354
+ from?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
904
355
  /**
905
356
  * The mailing class of this order. If not provided, automatically set to
906
357
  * `first_class`.
@@ -927,283 +378,8 @@ export declare namespace PostcardCreateParams {
927
378
  */
928
379
  sendDate?: string;
929
380
  }
930
- namespace PostcardCreateWithPdfFile {
931
- interface ContactCreateWithFirstName {
932
- /**
933
- * The first line of the contact's address.
934
- */
935
- addressLine1: string;
936
- /**
937
- * The ISO 3611-1 country code of the contact's address.
938
- */
939
- countryCode: string;
940
- firstName: string;
941
- /**
942
- * Second line of the contact's address, if applicable.
943
- */
944
- addressLine2?: string;
945
- /**
946
- * The city of the contact's address.
947
- */
948
- city?: string;
949
- /**
950
- * Company name of the contact.
951
- */
952
- companyName?: string;
953
- /**
954
- * An optional string describing this resource. Will be visible in the API and the
955
- * dashboard.
956
- */
957
- description?: string;
958
- /**
959
- * Email of the contact.
960
- */
961
- email?: string;
962
- /**
963
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
964
- * `verified` even if our address verification system says otherwise.
965
- */
966
- forceVerifiedStatus?: boolean;
967
- /**
968
- * Job title of the contact.
969
- */
970
- jobTitle?: string;
971
- /**
972
- * Last name of the contact.
973
- */
974
- lastName?: string;
975
- /**
976
- * See the section on Metadata.
977
- */
978
- metadata?: {
979
- [key: string]: unknown;
980
- };
981
- /**
982
- * Phone number of the contact.
983
- */
984
- phoneNumber?: string;
985
- /**
986
- * The postal or ZIP code of the contact's address.
987
- */
988
- postalOrZip?: string;
989
- /**
990
- * Province or state of the contact's address.
991
- */
992
- provinceOrState?: string;
993
- /**
994
- * If `true`, PostGrid will skip running this contact's address through our address
995
- * verification system.
996
- */
997
- skipVerification?: boolean;
998
- }
999
- interface ContactCreateWithCompanyName {
1000
- /**
1001
- * The first line of the contact's address.
1002
- */
1003
- addressLine1: string;
1004
- companyName: string;
1005
- /**
1006
- * The ISO 3611-1 country code of the contact's address.
1007
- */
1008
- countryCode: string;
1009
- /**
1010
- * Second line of the contact's address, if applicable.
1011
- */
1012
- addressLine2?: string;
1013
- /**
1014
- * The city of the contact's address.
1015
- */
1016
- city?: string;
1017
- /**
1018
- * An optional string describing this resource. Will be visible in the API and the
1019
- * dashboard.
1020
- */
1021
- description?: string;
1022
- /**
1023
- * Email of the contact.
1024
- */
1025
- email?: string;
1026
- /**
1027
- * First name of the contact.
1028
- */
1029
- firstName?: string;
1030
- /**
1031
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1032
- * `verified` even if our address verification system says otherwise.
1033
- */
1034
- forceVerifiedStatus?: boolean;
1035
- /**
1036
- * Job title of the contact.
1037
- */
1038
- jobTitle?: string;
1039
- /**
1040
- * Last name of the contact.
1041
- */
1042
- lastName?: string;
1043
- /**
1044
- * See the section on Metadata.
1045
- */
1046
- metadata?: {
1047
- [key: string]: unknown;
1048
- };
1049
- /**
1050
- * Phone number of the contact.
1051
- */
1052
- phoneNumber?: string;
1053
- /**
1054
- * The postal or ZIP code of the contact's address.
1055
- */
1056
- postalOrZip?: string;
1057
- /**
1058
- * Province or state of the contact's address.
1059
- */
1060
- provinceOrState?: string;
1061
- /**
1062
- * If `true`, PostGrid will skip running this contact's address through our address
1063
- * verification system.
1064
- */
1065
- skipVerification?: boolean;
1066
- }
1067
- interface ContactCreateWithFirstName {
1068
- /**
1069
- * The first line of the contact's address.
1070
- */
1071
- addressLine1: string;
1072
- /**
1073
- * The ISO 3611-1 country code of the contact's address.
1074
- */
1075
- countryCode: string;
1076
- firstName: string;
1077
- /**
1078
- * Second line of the contact's address, if applicable.
1079
- */
1080
- addressLine2?: string;
1081
- /**
1082
- * The city of the contact's address.
1083
- */
1084
- city?: string;
1085
- /**
1086
- * Company name of the contact.
1087
- */
1088
- companyName?: string;
1089
- /**
1090
- * An optional string describing this resource. Will be visible in the API and the
1091
- * dashboard.
1092
- */
1093
- description?: string;
1094
- /**
1095
- * Email of the contact.
1096
- */
1097
- email?: string;
1098
- /**
1099
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1100
- * `verified` even if our address verification system says otherwise.
1101
- */
1102
- forceVerifiedStatus?: boolean;
1103
- /**
1104
- * Job title of the contact.
1105
- */
1106
- jobTitle?: string;
1107
- /**
1108
- * Last name of the contact.
1109
- */
1110
- lastName?: string;
1111
- /**
1112
- * See the section on Metadata.
1113
- */
1114
- metadata?: {
1115
- [key: string]: unknown;
1116
- };
1117
- /**
1118
- * Phone number of the contact.
1119
- */
1120
- phoneNumber?: string;
1121
- /**
1122
- * The postal or ZIP code of the contact's address.
1123
- */
1124
- postalOrZip?: string;
1125
- /**
1126
- * Province or state of the contact's address.
1127
- */
1128
- provinceOrState?: string;
1129
- /**
1130
- * If `true`, PostGrid will skip running this contact's address through our address
1131
- * verification system.
1132
- */
1133
- skipVerification?: boolean;
1134
- }
1135
- interface ContactCreateWithCompanyName {
1136
- /**
1137
- * The first line of the contact's address.
1138
- */
1139
- addressLine1: string;
1140
- companyName: string;
1141
- /**
1142
- * The ISO 3611-1 country code of the contact's address.
1143
- */
1144
- countryCode: string;
1145
- /**
1146
- * Second line of the contact's address, if applicable.
1147
- */
1148
- addressLine2?: string;
1149
- /**
1150
- * The city of the contact's address.
1151
- */
1152
- city?: string;
1153
- /**
1154
- * An optional string describing this resource. Will be visible in the API and the
1155
- * dashboard.
1156
- */
1157
- description?: string;
1158
- /**
1159
- * Email of the contact.
1160
- */
1161
- email?: string;
1162
- /**
1163
- * First name of the contact.
1164
- */
1165
- firstName?: string;
1166
- /**
1167
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
1168
- * `verified` even if our address verification system says otherwise.
1169
- */
1170
- forceVerifiedStatus?: boolean;
1171
- /**
1172
- * Job title of the contact.
1173
- */
1174
- jobTitle?: string;
1175
- /**
1176
- * Last name of the contact.
1177
- */
1178
- lastName?: string;
1179
- /**
1180
- * See the section on Metadata.
1181
- */
1182
- metadata?: {
1183
- [key: string]: unknown;
1184
- };
1185
- /**
1186
- * Phone number of the contact.
1187
- */
1188
- phoneNumber?: string;
1189
- /**
1190
- * The postal or ZIP code of the contact's address.
1191
- */
1192
- postalOrZip?: string;
1193
- /**
1194
- * Province or state of the contact's address.
1195
- */
1196
- provinceOrState?: string;
1197
- /**
1198
- * If `true`, PostGrid will skip running this contact's address through our address
1199
- * verification system.
1200
- */
1201
- skipVerification?: boolean;
1202
- }
1203
- }
1204
381
  }
1205
- export interface PostcardListParams {
1206
- limit?: number;
382
+ export interface PostcardListParams extends SkipLimitParams {
1207
383
  /**
1208
384
  * You can supply any string to help narrow down the list of resources. For
1209
385
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -1212,9 +388,8 @@ export interface PostcardListParams {
1212
388
  * more details.
1213
389
  */
1214
390
  search?: string;
1215
- skip?: number;
1216
391
  }
1217
392
  export declare namespace Postcards {
1218
- export { type Postcard as Postcard, type PostcardListResponse as PostcardListResponse, type PostcardRetrieveURLResponse as PostcardRetrieveURLResponse, type PostcardCreateParams as PostcardCreateParams, type PostcardListParams as PostcardListParams, };
393
+ export { type Postcard as Postcard, type PostcardRetrieveURLResponse as PostcardRetrieveURLResponse, type PostcardsSkipLimit as PostcardsSkipLimit, type PostcardCreateParams as PostcardCreateParams, type PostcardListParams as PostcardListParams, };
1219
394
  }
1220
395
  //# sourceMappingURL=postcards.d.mts.map