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
@@ -8,8 +8,8 @@ import {
8
8
  BankAccountCreateParams,
9
9
  BankAccountDeleteResponse,
10
10
  BankAccountListParams,
11
- BankAccountListResponse,
12
11
  BankAccounts,
12
+ BankAccountsSkipLimit,
13
13
  } from './bank-accounts';
14
14
  import * as BoxesAPI from './boxes';
15
15
  import {
@@ -17,8 +17,8 @@ import {
17
17
  BoxChequeBase,
18
18
  BoxCreateParams,
19
19
  BoxListParams,
20
- BoxListResponse,
21
20
  Boxes,
21
+ BoxesSkipLimit,
22
22
  Cancellation,
23
23
  OrderImbStatus,
24
24
  OrderMailingClass,
@@ -30,20 +30,20 @@ import {
30
30
  CampaignCreateParams,
31
31
  CampaignDeleteResponse,
32
32
  CampaignListParams,
33
- CampaignListResponse,
34
33
  CampaignSendParams,
35
34
  CampaignUpdateParams,
36
35
  Campaigns,
36
+ CampaignsSkipLimit,
37
37
  } from './campaigns';
38
38
  import * as ChequesAPI from './cheques';
39
39
  import {
40
40
  Cheque,
41
41
  ChequeCreateParams,
42
42
  ChequeListParams,
43
- ChequeListResponse,
44
43
  ChequeRetrieveURLResponse,
45
44
  ChequeSize,
46
45
  Cheques,
46
+ ChequesSkipLimit,
47
47
  DigitalOnly,
48
48
  } from './cheques';
49
49
  import * as ContactsAPI from './contacts';
@@ -53,8 +53,8 @@ import {
53
53
  ContactCreateParams,
54
54
  ContactDeleteResponse,
55
55
  ContactListParams,
56
- ContactListResponse,
57
56
  Contacts,
57
+ ContactsSkipLimit,
58
58
  } from './contacts';
59
59
  import * as LettersAPI from './letters';
60
60
  import {
@@ -63,10 +63,10 @@ import {
63
63
  Letter,
64
64
  LetterCreateParams,
65
65
  LetterListParams,
66
- LetterListResponse,
67
66
  LetterRetrieveURLResponse,
68
67
  LetterSize,
69
68
  Letters,
69
+ LettersSkipLimit,
70
70
  PlasticCard,
71
71
  } from './letters';
72
72
  import * as MailingListImportsAPI from './mailing-list-imports';
@@ -75,8 +75,8 @@ import {
75
75
  MailingListImportCreateParams,
76
76
  MailingListImportDeleteResponse,
77
77
  MailingListImportListParams,
78
- MailingListImportListResponse,
79
78
  MailingListImportResponse,
79
+ MailingListImportResponsesSkipLimit,
80
80
  MailingListImportUpdateParams,
81
81
  MailingListImports,
82
82
  VerificationStatusCount,
@@ -88,40 +88,40 @@ import {
88
88
  MailingListDeleteResponse,
89
89
  MailingListJobsParams,
90
90
  MailingListListParams,
91
- MailingListListResponse,
92
91
  MailingListUpdate,
93
92
  MailingListUpdateParams,
94
93
  MailingLists,
94
+ MailingListsSkipLimit,
95
95
  } from './mailing-lists';
96
96
  import * as PostcardsAPI from './postcards';
97
97
  import {
98
98
  Postcard,
99
99
  PostcardCreateParams,
100
100
  PostcardListParams,
101
- PostcardListResponse,
102
101
  PostcardRetrieveURLResponse,
103
102
  Postcards,
103
+ PostcardsSkipLimit,
104
104
  } from './postcards';
105
105
  import * as SelfMailersAPI from './self-mailers';
106
106
  import {
107
107
  SelfMailer,
108
108
  SelfMailerCreateParams,
109
109
  SelfMailerListParams,
110
- SelfMailerListResponse,
111
110
  SelfMailerRetrieveURLResponse,
112
111
  SelfMailers,
112
+ SelfMailersSkipLimit,
113
113
  } from './self-mailers';
114
114
  import * as SubOrganizationsAPI from './sub-organizations';
115
115
  import {
116
116
  EmailPreferences,
117
117
  SubOrganization,
118
118
  SubOrganizationListParams,
119
- SubOrganizationListResponse,
120
119
  SubOrganizationRetrieveUsersParams,
121
120
  SubOrganizationRetrieveUsersResponse,
122
121
  SubOrganizationUpdateParams,
123
122
  SubOrganizationUpdateResponse,
124
123
  SubOrganizations,
124
+ SubOrganizationsSkipLimit,
125
125
  } from './sub-organizations';
126
126
  import * as TemplatesAPI from './templates';
127
127
  import {
@@ -129,9 +129,9 @@ import {
129
129
  TemplateCreateParams,
130
130
  TemplateDeleteResponse,
131
131
  TemplateListParams,
132
- TemplateListResponse,
133
132
  TemplateUpdateParams,
134
133
  Templates,
134
+ TemplatesSkipLimit,
135
135
  } from './templates';
136
136
  import * as OrderProfilesAPI from './order-profiles/order-profiles';
137
137
  import { OrderProfiles } from './order-profiles/order-profiles';
@@ -141,10 +141,10 @@ import {
141
141
  Report,
142
142
  ReportCreateParams,
143
143
  ReportListParams,
144
- ReportListResponse,
145
144
  ReportSampleParams,
146
145
  ReportUpdateParams,
147
146
  Reports,
147
+ ReportsSkipLimit,
148
148
  } from './reports/reports';
149
149
 
150
150
  export class PrintMail extends APIResource {
@@ -168,6 +168,170 @@ export class PrintMail extends APIResource {
168
168
  templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);
169
169
  }
170
170
 
171
+ export interface ContactCreateWithCompanyName {
172
+ /**
173
+ * The first line of the contact's address.
174
+ */
175
+ addressLine1: string;
176
+
177
+ companyName: string;
178
+
179
+ /**
180
+ * The ISO 3611-1 country code of the contact's address.
181
+ */
182
+ countryCode: string;
183
+
184
+ /**
185
+ * Second line of the contact's address, if applicable.
186
+ */
187
+ addressLine2?: string;
188
+
189
+ /**
190
+ * The city of the contact's address.
191
+ */
192
+ city?: string;
193
+
194
+ /**
195
+ * An optional string describing this resource. Will be visible in the API and the
196
+ * dashboard.
197
+ */
198
+ description?: string;
199
+
200
+ /**
201
+ * Email of the contact.
202
+ */
203
+ email?: string;
204
+
205
+ /**
206
+ * First name of the contact.
207
+ */
208
+ firstName?: string;
209
+
210
+ /**
211
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
212
+ * `verified` even if our address verification system says otherwise.
213
+ */
214
+ forceVerifiedStatus?: boolean;
215
+
216
+ /**
217
+ * Job title of the contact.
218
+ */
219
+ jobTitle?: string;
220
+
221
+ /**
222
+ * Last name of the contact.
223
+ */
224
+ lastName?: string;
225
+
226
+ /**
227
+ * See the section on Metadata.
228
+ */
229
+ metadata?: { [key: string]: unknown };
230
+
231
+ /**
232
+ * Phone number of the contact.
233
+ */
234
+ phoneNumber?: string;
235
+
236
+ /**
237
+ * The postal or ZIP code of the contact's address.
238
+ */
239
+ postalOrZip?: string;
240
+
241
+ /**
242
+ * Province or state of the contact's address.
243
+ */
244
+ provinceOrState?: string;
245
+
246
+ /**
247
+ * If `true`, PostGrid will skip running this contact's address through our address
248
+ * verification system.
249
+ */
250
+ skipVerification?: boolean;
251
+ }
252
+
253
+ export interface ContactCreateWithFirstName {
254
+ /**
255
+ * The first line of the contact's address.
256
+ */
257
+ addressLine1: string;
258
+
259
+ /**
260
+ * The ISO 3611-1 country code of the contact's address.
261
+ */
262
+ countryCode: string;
263
+
264
+ firstName: string;
265
+
266
+ /**
267
+ * Second line of the contact's address, if applicable.
268
+ */
269
+ addressLine2?: string;
270
+
271
+ /**
272
+ * The city of the contact's address.
273
+ */
274
+ city?: string;
275
+
276
+ /**
277
+ * Company name of the contact.
278
+ */
279
+ companyName?: string;
280
+
281
+ /**
282
+ * An optional string describing this resource. Will be visible in the API and the
283
+ * dashboard.
284
+ */
285
+ description?: string;
286
+
287
+ /**
288
+ * Email of the contact.
289
+ */
290
+ email?: string;
291
+
292
+ /**
293
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
294
+ * `verified` even if our address verification system says otherwise.
295
+ */
296
+ forceVerifiedStatus?: boolean;
297
+
298
+ /**
299
+ * Job title of the contact.
300
+ */
301
+ jobTitle?: string;
302
+
303
+ /**
304
+ * Last name of the contact.
305
+ */
306
+ lastName?: string;
307
+
308
+ /**
309
+ * See the section on Metadata.
310
+ */
311
+ metadata?: { [key: string]: unknown };
312
+
313
+ /**
314
+ * Phone number of the contact.
315
+ */
316
+ phoneNumber?: string;
317
+
318
+ /**
319
+ * The postal or ZIP code of the contact's address.
320
+ */
321
+ postalOrZip?: string;
322
+
323
+ /**
324
+ * Province or state of the contact's address.
325
+ */
326
+ provinceOrState?: string;
327
+
328
+ /**
329
+ * If `true`, PostGrid will skip running this contact's address through our address
330
+ * verification system.
331
+ */
332
+ skipVerification?: boolean;
333
+ }
334
+
171
335
  PrintMail.BankAccounts = BankAccounts;
172
336
  PrintMail.Boxes = Boxes;
173
337
  PrintMail.Campaigns = Campaigns;
@@ -184,12 +348,17 @@ PrintMail.SubOrganizations = SubOrganizations;
184
348
  PrintMail.Templates = Templates;
185
349
 
186
350
  export declare namespace PrintMail {
351
+ export {
352
+ type ContactCreateWithCompanyName as ContactCreateWithCompanyName,
353
+ type ContactCreateWithFirstName as ContactCreateWithFirstName,
354
+ };
355
+
187
356
  export {
188
357
  BankAccounts as BankAccounts,
189
358
  type BankAccount as BankAccount,
190
359
  type BankAccountCountryCode as BankAccountCountryCode,
191
- type BankAccountListResponse as BankAccountListResponse,
192
360
  type BankAccountDeleteResponse as BankAccountDeleteResponse,
361
+ type BankAccountsSkipLimit as BankAccountsSkipLimit,
193
362
  type BankAccountCreateParams as BankAccountCreateParams,
194
363
  type BankAccountListParams as BankAccountListParams,
195
364
  };
@@ -202,7 +371,7 @@ export declare namespace PrintMail {
202
371
  type OrderImbStatus as OrderImbStatus,
203
372
  type OrderMailingClass as OrderMailingClass,
204
373
  type OrderStatus as OrderStatus,
205
- type BoxListResponse as BoxListResponse,
374
+ type BoxesSkipLimit as BoxesSkipLimit,
206
375
  type BoxCreateParams as BoxCreateParams,
207
376
  type BoxListParams as BoxListParams,
208
377
  };
@@ -210,8 +379,8 @@ export declare namespace PrintMail {
210
379
  export {
211
380
  Campaigns as Campaigns,
212
381
  type Campaign as Campaign,
213
- type CampaignListResponse as CampaignListResponse,
214
382
  type CampaignDeleteResponse as CampaignDeleteResponse,
383
+ type CampaignsSkipLimit as CampaignsSkipLimit,
215
384
  type CampaignCreateParams as CampaignCreateParams,
216
385
  type CampaignUpdateParams as CampaignUpdateParams,
217
386
  type CampaignListParams as CampaignListParams,
@@ -223,8 +392,8 @@ export declare namespace PrintMail {
223
392
  type Cheque as Cheque,
224
393
  type ChequeSize as ChequeSize,
225
394
  type DigitalOnly as DigitalOnly,
226
- type ChequeListResponse as ChequeListResponse,
227
395
  type ChequeRetrieveURLResponse as ChequeRetrieveURLResponse,
396
+ type ChequesSkipLimit as ChequesSkipLimit,
228
397
  type ChequeCreateParams as ChequeCreateParams,
229
398
  type ChequeListParams as ChequeListParams,
230
399
  };
@@ -233,8 +402,8 @@ export declare namespace PrintMail {
233
402
  Contacts as Contacts,
234
403
  type Contact as Contact,
235
404
  type ContactCreate as ContactCreate,
236
- type ContactListResponse as ContactListResponse,
237
405
  type ContactDeleteResponse as ContactDeleteResponse,
406
+ type ContactsSkipLimit as ContactsSkipLimit,
238
407
  type ContactCreateParams as ContactCreateParams,
239
408
  type ContactListParams as ContactListParams,
240
409
  };
@@ -246,8 +415,8 @@ export declare namespace PrintMail {
246
415
  type Letter as Letter,
247
416
  type LetterSize as LetterSize,
248
417
  type PlasticCard as PlasticCard,
249
- type LetterListResponse as LetterListResponse,
250
418
  type LetterRetrieveURLResponse as LetterRetrieveURLResponse,
419
+ type LettersSkipLimit as LettersSkipLimit,
251
420
  type LetterCreateParams as LetterCreateParams,
252
421
  type LetterListParams as LetterListParams,
253
422
  };
@@ -257,8 +426,8 @@ export declare namespace PrintMail {
257
426
  type FileType as FileType,
258
427
  type MailingListImportResponse as MailingListImportResponse,
259
428
  type VerificationStatusCount as VerificationStatusCount,
260
- type MailingListImportListResponse as MailingListImportListResponse,
261
429
  type MailingListImportDeleteResponse as MailingListImportDeleteResponse,
430
+ type MailingListImportResponsesSkipLimit as MailingListImportResponsesSkipLimit,
262
431
  type MailingListImportCreateParams as MailingListImportCreateParams,
263
432
  type MailingListImportUpdateParams as MailingListImportUpdateParams,
264
433
  type MailingListImportListParams as MailingListImportListParams,
@@ -268,8 +437,8 @@ export declare namespace PrintMail {
268
437
  MailingLists as MailingLists,
269
438
  type MailingList as MailingList,
270
439
  type MailingListUpdate as MailingListUpdate,
271
- type MailingListListResponse as MailingListListResponse,
272
440
  type MailingListDeleteResponse as MailingListDeleteResponse,
441
+ type MailingListsSkipLimit as MailingListsSkipLimit,
273
442
  type MailingListCreateParams as MailingListCreateParams,
274
443
  type MailingListUpdateParams as MailingListUpdateParams,
275
444
  type MailingListListParams as MailingListListParams,
@@ -281,8 +450,8 @@ export declare namespace PrintMail {
281
450
  export {
282
451
  Postcards as Postcards,
283
452
  type Postcard as Postcard,
284
- type PostcardListResponse as PostcardListResponse,
285
453
  type PostcardRetrieveURLResponse as PostcardRetrieveURLResponse,
454
+ type PostcardsSkipLimit as PostcardsSkipLimit,
286
455
  type PostcardCreateParams as PostcardCreateParams,
287
456
  type PostcardListParams as PostcardListParams,
288
457
  };
@@ -291,7 +460,7 @@ export declare namespace PrintMail {
291
460
  Reports as Reports,
292
461
  type DeletedResponse as DeletedResponse,
293
462
  type Report as Report,
294
- type ReportListResponse as ReportListResponse,
463
+ type ReportsSkipLimit as ReportsSkipLimit,
295
464
  type ReportCreateParams as ReportCreateParams,
296
465
  type ReportUpdateParams as ReportUpdateParams,
297
466
  type ReportListParams as ReportListParams,
@@ -301,8 +470,8 @@ export declare namespace PrintMail {
301
470
  export {
302
471
  SelfMailers as SelfMailers,
303
472
  type SelfMailer as SelfMailer,
304
- type SelfMailerListResponse as SelfMailerListResponse,
305
473
  type SelfMailerRetrieveURLResponse as SelfMailerRetrieveURLResponse,
474
+ type SelfMailersSkipLimit as SelfMailersSkipLimit,
306
475
  type SelfMailerCreateParams as SelfMailerCreateParams,
307
476
  type SelfMailerListParams as SelfMailerListParams,
308
477
  };
@@ -312,8 +481,8 @@ export declare namespace PrintMail {
312
481
  type EmailPreferences as EmailPreferences,
313
482
  type SubOrganization as SubOrganization,
314
483
  type SubOrganizationUpdateResponse as SubOrganizationUpdateResponse,
315
- type SubOrganizationListResponse as SubOrganizationListResponse,
316
484
  type SubOrganizationRetrieveUsersResponse as SubOrganizationRetrieveUsersResponse,
485
+ type SubOrganizationsSkipLimit as SubOrganizationsSkipLimit,
317
486
  type SubOrganizationUpdateParams as SubOrganizationUpdateParams,
318
487
  type SubOrganizationListParams as SubOrganizationListParams,
319
488
  type SubOrganizationRetrieveUsersParams as SubOrganizationRetrieveUsersParams,
@@ -322,8 +491,8 @@ export declare namespace PrintMail {
322
491
  export {
323
492
  Templates as Templates,
324
493
  type Template as Template,
325
- type TemplateListResponse as TemplateListResponse,
326
494
  type TemplateDeleteResponse as TemplateDeleteResponse,
495
+ type TemplatesSkipLimit as TemplatesSkipLimit,
327
496
  type TemplateCreateParams as TemplateCreateParams,
328
497
  type TemplateUpdateParams as TemplateUpdateParams,
329
498
  type TemplateListParams as TemplateListParams,
@@ -11,10 +11,10 @@ export {
11
11
  Reports,
12
12
  type DeletedResponse,
13
13
  type Report,
14
- type ReportListResponse,
15
14
  type ReportCreateParams,
16
15
  type ReportUpdateParams,
17
16
  type ReportListParams,
18
17
  type ReportSampleParams,
18
+ type ReportsSkipLimit,
19
19
  } from './reports';
20
20
  export { Samples, type ReportSample, type ReportSampleCreateBase, type SampleCreateParams } from './samples';
@@ -12,6 +12,7 @@ import {
12
12
  import * as SamplesAPI from './samples';
13
13
  import { ReportSample, ReportSampleCreateBase, SampleCreateParams, Samples } from './samples';
14
14
  import { APIPromise } from '../../../core/api-promise';
15
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
15
16
  import { RequestOptions } from '../../../internal/request-options';
16
17
  import { path } from '../../../internal/utils/path';
17
18
 
@@ -74,14 +75,17 @@ export class Reports extends APIResource {
74
75
  *
75
76
  * @example
76
77
  * ```ts
77
- * const reports = await client.printMail.reports.list();
78
+ * // Automatically fetches more pages as needed.
79
+ * for await (const report of client.printMail.reports.list()) {
80
+ * // ...
81
+ * }
78
82
  * ```
79
83
  */
80
84
  list(
81
85
  query: ReportListParams | null | undefined = {},
82
86
  options?: RequestOptions,
83
- ): APIPromise<ReportListResponse> {
84
- return this._client.get('/print-mail/v1/reports', { query, ...options });
87
+ ): PagePromise<ReportsSkipLimit, Report> {
88
+ return this._client.getAPIList('/print-mail/v1/reports', SkipLimit<Report>, { query, ...options });
85
89
  }
86
90
 
87
91
  /**
@@ -117,6 +121,8 @@ export class Reports extends APIResource {
117
121
  }
118
122
  }
119
123
 
124
+ export type ReportsSkipLimit = SkipLimit<Report>;
125
+
120
126
  /**
121
127
  * Generic response for delete operations.
122
128
  */
@@ -177,21 +183,6 @@ export interface Report {
177
183
  metadata?: { [key: string]: string };
178
184
  }
179
185
 
180
- /**
181
- * Represents a list of Reports.
182
- */
183
- export interface ReportListResponse {
184
- data: Array<Report>;
185
-
186
- limit: number;
187
-
188
- object: 'list';
189
-
190
- skip: number;
191
-
192
- totalCount: number;
193
- }
194
-
195
186
  export interface ReportCreateParams {
196
187
  /**
197
188
  * The SQL query defining the report.
@@ -226,9 +217,7 @@ export interface ReportUpdateParams {
226
217
  sqlQuery?: string;
227
218
  }
228
219
 
229
- export interface ReportListParams {
230
- limit?: number;
231
-
220
+ export interface ReportListParams extends SkipLimitParams {
232
221
  /**
233
222
  * You can supply any string to help narrow down the list of resources. For
234
223
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -237,8 +226,6 @@ export interface ReportListParams {
237
226
  * more details.
238
227
  */
239
228
  search?: string;
240
-
241
- skip?: number;
242
229
  }
243
230
 
244
231
  export interface ReportSampleParams {
@@ -266,7 +253,7 @@ export declare namespace Reports {
266
253
  export {
267
254
  type DeletedResponse as DeletedResponse,
268
255
  type Report as Report,
269
- type ReportListResponse as ReportListResponse,
256
+ type ReportsSkipLimit as ReportsSkipLimit,
270
257
  type ReportCreateParams as ReportCreateParams,
271
258
  type ReportUpdateParams as ReportUpdateParams,
272
259
  type ReportListParams as ReportListParams,