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