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
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import { APIPromise } from '../../core/api-promise';
5
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
5
6
  import { buildHeaders } from '../../internal/headers';
6
7
  import { RequestOptions } from '../../internal/request-options';
7
8
  import { path } from '../../internal/utils/path';
@@ -73,14 +74,17 @@ export class Campaigns extends APIResource {
73
74
  *
74
75
  * @example
75
76
  * ```ts
76
- * const campaigns = await client.printMail.campaigns.list();
77
+ * // Automatically fetches more pages as needed.
78
+ * for await (const campaign of client.printMail.campaigns.list()) {
79
+ * // ...
80
+ * }
77
81
  * ```
78
82
  */
79
83
  list(
80
84
  query: CampaignListParams | null | undefined = {},
81
85
  options?: RequestOptions,
82
- ): APIPromise<CampaignListResponse> {
83
- return this._client.get('/print-mail/v1/campaigns', { query, ...options });
86
+ ): PagePromise<CampaignsSkipLimit, Campaign> {
87
+ return this._client.getAPIList('/print-mail/v1/campaigns', SkipLimit<Campaign>, { query, ...options });
84
88
  }
85
89
 
86
90
  /**
@@ -120,6 +124,8 @@ export class Campaigns extends APIResource {
120
124
  }
121
125
  }
122
126
 
127
+ export type CampaignsSkipLimit = SkipLimit<Campaign>;
128
+
123
129
  /**
124
130
  * Represents a bulk mail campaign.
125
131
  */
@@ -244,21 +250,6 @@ export namespace Campaign {
244
250
  }
245
251
  }
246
252
 
247
- /**
248
- * A list of campaigns.
249
- */
250
- export interface CampaignListResponse {
251
- data: Array<Campaign>;
252
-
253
- limit: number;
254
-
255
- object: 'list';
256
-
257
- skip: number;
258
-
259
- totalCount: number;
260
- }
261
-
262
253
  export interface CampaignDeleteResponse {
263
254
  /**
264
255
  * A unique ID prefixed with campaign\_
@@ -372,9 +363,7 @@ export interface CampaignUpdateParams {
372
363
  selfMailerProfile?: string | null;
373
364
  }
374
365
 
375
- export interface CampaignListParams {
376
- limit?: number;
377
-
366
+ export interface CampaignListParams extends SkipLimitParams {
378
367
  /**
379
368
  * You can supply any string to help narrow down the list of resources. For
380
369
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -383,8 +372,6 @@ export interface CampaignListParams {
383
372
  * more details.
384
373
  */
385
374
  search?: string;
386
-
387
- skip?: number;
388
375
  }
389
376
 
390
377
  export interface CampaignSendParams {
@@ -398,8 +385,8 @@ export interface CampaignSendParams {
398
385
  export declare namespace Campaigns {
399
386
  export {
400
387
  type Campaign as Campaign,
401
- type CampaignListResponse as CampaignListResponse,
402
388
  type CampaignDeleteResponse as CampaignDeleteResponse,
389
+ type CampaignsSkipLimit as CampaignsSkipLimit,
403
390
  type CampaignCreateParams as CampaignCreateParams,
404
391
  type CampaignUpdateParams as CampaignUpdateParams,
405
392
  type CampaignListParams as CampaignListParams,
@@ -3,7 +3,9 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as BoxesAPI from './boxes';
5
5
  import * as ContactsAPI from './contacts';
6
+ import * as PrintMailAPI from './print-mail';
6
7
  import { APIPromise } from '../../core/api-promise';
8
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
7
9
  import { RequestOptions } from '../../internal/request-options';
8
10
  import { path } from '../../internal/utils/path';
9
11
 
@@ -69,14 +71,17 @@ export class Cheques extends APIResource {
69
71
  *
70
72
  * @example
71
73
  * ```ts
72
- * const cheques = await client.printMail.cheques.list();
74
+ * // Automatically fetches more pages as needed.
75
+ * for await (const cheque of client.printMail.cheques.list()) {
76
+ * // ...
77
+ * }
73
78
  * ```
74
79
  */
75
80
  list(
76
81
  query: ChequeListParams | null | undefined = {},
77
82
  options?: RequestOptions,
78
- ): APIPromise<ChequeListResponse> {
79
- return this._client.get('/print-mail/v1/cheques', { query, ...options });
83
+ ): PagePromise<ChequesSkipLimit, Cheque> {
84
+ return this._client.getAPIList('/print-mail/v1/cheques', SkipLimit<Cheque>, { query, ...options });
80
85
  }
81
86
 
82
87
  /**
@@ -129,6 +134,8 @@ export class Cheques extends APIResource {
129
134
  }
130
135
  }
131
136
 
137
+ export type ChequesSkipLimit = SkipLimit<Cheque>;
138
+
132
139
  export interface Cheque {
133
140
  /**
134
141
  * A unique ID prefixed with cheque\_
@@ -322,18 +329,6 @@ export interface DigitalOnly {
322
329
  watermark: string;
323
330
  }
324
331
 
325
- export interface ChequeListResponse {
326
- data: Array<Cheque>;
327
-
328
- limit: number;
329
-
330
- object: 'list';
331
-
332
- skip: number;
333
-
334
- totalCount: number;
335
- }
336
-
337
332
  export interface ChequeRetrieveURLResponse {
338
333
  /**
339
334
  * A unique ID prefixed with cheque\_
@@ -364,10 +359,7 @@ export interface ChequeCreateParams {
364
359
  * The contact information of the sender. You can pass contact information inline
365
360
  * here just like you can for the `to`.
366
361
  */
367
- from:
368
- | ChequeCreateParams.ContactCreateWithFirstName
369
- | ChequeCreateParams.ContactCreateWithCompanyName
370
- | string;
362
+ from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
371
363
 
372
364
  /**
373
365
  * The recipient of this order. You can either supply the contact information
@@ -375,10 +367,7 @@ export interface ChequeCreateParams {
375
367
  * contacts regardless of whether you provide the information inline here or call
376
368
  * the contact creation endpoint.
377
369
  */
378
- to:
379
- | ChequeCreateParams.ContactCreateWithFirstName
380
- | ChequeCreateParams.ContactCreateWithCompanyName
381
- | string;
370
+ to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
382
371
 
383
372
  /**
384
373
  * The currency code of the cheque. This will be set to the default currency of the
@@ -456,10 +445,7 @@ export interface ChequeCreateParams {
456
445
  * mail it forward to the final recipient yourself. One use case for this is
457
446
  * signing cheques at your office before mailing them out yourself.
458
447
  */
459
- redirectTo?:
460
- | ChequeCreateParams.ContactCreateWithFirstName
461
- | ChequeCreateParams.ContactCreateWithCompanyName
462
- | string;
448
+ redirectTo?: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
463
449
 
464
450
  /**
465
451
  * This order will transition from `ready` to `printing` on the day after this
@@ -473,503 +459,7 @@ export interface ChequeCreateParams {
473
459
  size?: ChequeSize;
474
460
  }
475
461
 
476
- export namespace ChequeCreateParams {
477
- export interface ContactCreateWithFirstName {
478
- /**
479
- * The first line of the contact's address.
480
- */
481
- addressLine1: string;
482
-
483
- /**
484
- * The ISO 3611-1 country code of the contact's address.
485
- */
486
- countryCode: string;
487
-
488
- firstName: string;
489
-
490
- /**
491
- * Second line of the contact's address, if applicable.
492
- */
493
- addressLine2?: string;
494
-
495
- /**
496
- * The city of the contact's address.
497
- */
498
- city?: string;
499
-
500
- /**
501
- * Company name of the contact.
502
- */
503
- companyName?: string;
504
-
505
- /**
506
- * An optional string describing this resource. Will be visible in the API and the
507
- * dashboard.
508
- */
509
- description?: string;
510
-
511
- /**
512
- * Email of the contact.
513
- */
514
- email?: string;
515
-
516
- /**
517
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
518
- * `verified` even if our address verification system says otherwise.
519
- */
520
- forceVerifiedStatus?: boolean;
521
-
522
- /**
523
- * Job title of the contact.
524
- */
525
- jobTitle?: string;
526
-
527
- /**
528
- * Last name of the contact.
529
- */
530
- lastName?: string;
531
-
532
- /**
533
- * See the section on Metadata.
534
- */
535
- metadata?: { [key: string]: unknown };
536
-
537
- /**
538
- * Phone number of the contact.
539
- */
540
- phoneNumber?: string;
541
-
542
- /**
543
- * The postal or ZIP code of the contact's address.
544
- */
545
- postalOrZip?: string;
546
-
547
- /**
548
- * Province or state of the contact's address.
549
- */
550
- provinceOrState?: string;
551
-
552
- /**
553
- * If `true`, PostGrid will skip running this contact's address through our address
554
- * verification system.
555
- */
556
- skipVerification?: boolean;
557
- }
558
-
559
- export interface ContactCreateWithCompanyName {
560
- /**
561
- * The first line of the contact's address.
562
- */
563
- addressLine1: string;
564
-
565
- companyName: string;
566
-
567
- /**
568
- * The ISO 3611-1 country code of the contact's address.
569
- */
570
- countryCode: string;
571
-
572
- /**
573
- * Second line of the contact's address, if applicable.
574
- */
575
- addressLine2?: string;
576
-
577
- /**
578
- * The city of the contact's address.
579
- */
580
- city?: string;
581
-
582
- /**
583
- * An optional string describing this resource. Will be visible in the API and the
584
- * dashboard.
585
- */
586
- description?: string;
587
-
588
- /**
589
- * Email of the contact.
590
- */
591
- email?: string;
592
-
593
- /**
594
- * First name of the contact.
595
- */
596
- firstName?: string;
597
-
598
- /**
599
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
600
- * `verified` even if our address verification system says otherwise.
601
- */
602
- forceVerifiedStatus?: boolean;
603
-
604
- /**
605
- * Job title of the contact.
606
- */
607
- jobTitle?: string;
608
-
609
- /**
610
- * Last name of the contact.
611
- */
612
- lastName?: string;
613
-
614
- /**
615
- * See the section on Metadata.
616
- */
617
- metadata?: { [key: string]: unknown };
618
-
619
- /**
620
- * Phone number of the contact.
621
- */
622
- phoneNumber?: string;
623
-
624
- /**
625
- * The postal or ZIP code of the contact's address.
626
- */
627
- postalOrZip?: string;
628
-
629
- /**
630
- * Province or state of the contact's address.
631
- */
632
- provinceOrState?: string;
633
-
634
- /**
635
- * If `true`, PostGrid will skip running this contact's address through our address
636
- * verification system.
637
- */
638
- skipVerification?: boolean;
639
- }
640
-
641
- export interface ContactCreateWithFirstName {
642
- /**
643
- * The first line of the contact's address.
644
- */
645
- addressLine1: string;
646
-
647
- /**
648
- * The ISO 3611-1 country code of the contact's address.
649
- */
650
- countryCode: string;
651
-
652
- firstName: string;
653
-
654
- /**
655
- * Second line of the contact's address, if applicable.
656
- */
657
- addressLine2?: string;
658
-
659
- /**
660
- * The city of the contact's address.
661
- */
662
- city?: string;
663
-
664
- /**
665
- * Company name of the contact.
666
- */
667
- companyName?: string;
668
-
669
- /**
670
- * An optional string describing this resource. Will be visible in the API and the
671
- * dashboard.
672
- */
673
- description?: string;
674
-
675
- /**
676
- * Email of the contact.
677
- */
678
- email?: string;
679
-
680
- /**
681
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
682
- * `verified` even if our address verification system says otherwise.
683
- */
684
- forceVerifiedStatus?: boolean;
685
-
686
- /**
687
- * Job title of the contact.
688
- */
689
- jobTitle?: string;
690
-
691
- /**
692
- * Last name of the contact.
693
- */
694
- lastName?: string;
695
-
696
- /**
697
- * See the section on Metadata.
698
- */
699
- metadata?: { [key: string]: unknown };
700
-
701
- /**
702
- * Phone number of the contact.
703
- */
704
- phoneNumber?: string;
705
-
706
- /**
707
- * The postal or ZIP code of the contact's address.
708
- */
709
- postalOrZip?: string;
710
-
711
- /**
712
- * Province or state of the contact's address.
713
- */
714
- provinceOrState?: string;
715
-
716
- /**
717
- * If `true`, PostGrid will skip running this contact's address through our address
718
- * verification system.
719
- */
720
- skipVerification?: boolean;
721
- }
722
-
723
- export interface ContactCreateWithCompanyName {
724
- /**
725
- * The first line of the contact's address.
726
- */
727
- addressLine1: string;
728
-
729
- companyName: string;
730
-
731
- /**
732
- * The ISO 3611-1 country code of the contact's address.
733
- */
734
- countryCode: string;
735
-
736
- /**
737
- * Second line of the contact's address, if applicable.
738
- */
739
- addressLine2?: string;
740
-
741
- /**
742
- * The city of the contact's address.
743
- */
744
- city?: string;
745
-
746
- /**
747
- * An optional string describing this resource. Will be visible in the API and the
748
- * dashboard.
749
- */
750
- description?: string;
751
-
752
- /**
753
- * Email of the contact.
754
- */
755
- email?: string;
756
-
757
- /**
758
- * First name of the contact.
759
- */
760
- firstName?: string;
761
-
762
- /**
763
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
764
- * `verified` even if our address verification system says otherwise.
765
- */
766
- forceVerifiedStatus?: boolean;
767
-
768
- /**
769
- * Job title of the contact.
770
- */
771
- jobTitle?: string;
772
-
773
- /**
774
- * Last name of the contact.
775
- */
776
- lastName?: string;
777
-
778
- /**
779
- * See the section on Metadata.
780
- */
781
- metadata?: { [key: string]: unknown };
782
-
783
- /**
784
- * Phone number of the contact.
785
- */
786
- phoneNumber?: string;
787
-
788
- /**
789
- * The postal or ZIP code of the contact's address.
790
- */
791
- postalOrZip?: string;
792
-
793
- /**
794
- * Province or state of the contact's address.
795
- */
796
- provinceOrState?: string;
797
-
798
- /**
799
- * If `true`, PostGrid will skip running this contact's address through our address
800
- * verification system.
801
- */
802
- skipVerification?: boolean;
803
- }
804
-
805
- export interface ContactCreateWithFirstName {
806
- /**
807
- * The first line of the contact's address.
808
- */
809
- addressLine1: string;
810
-
811
- /**
812
- * The ISO 3611-1 country code of the contact's address.
813
- */
814
- countryCode: string;
815
-
816
- firstName: string;
817
-
818
- /**
819
- * Second line of the contact's address, if applicable.
820
- */
821
- addressLine2?: string;
822
-
823
- /**
824
- * The city of the contact's address.
825
- */
826
- city?: string;
827
-
828
- /**
829
- * Company name of the contact.
830
- */
831
- companyName?: string;
832
-
833
- /**
834
- * An optional string describing this resource. Will be visible in the API and the
835
- * dashboard.
836
- */
837
- description?: string;
838
-
839
- /**
840
- * Email of the contact.
841
- */
842
- email?: string;
843
-
844
- /**
845
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
846
- * `verified` even if our address verification system says otherwise.
847
- */
848
- forceVerifiedStatus?: boolean;
849
-
850
- /**
851
- * Job title of the contact.
852
- */
853
- jobTitle?: string;
854
-
855
- /**
856
- * Last name of the contact.
857
- */
858
- lastName?: string;
859
-
860
- /**
861
- * See the section on Metadata.
862
- */
863
- metadata?: { [key: string]: unknown };
864
-
865
- /**
866
- * Phone number of the contact.
867
- */
868
- phoneNumber?: string;
869
-
870
- /**
871
- * The postal or ZIP code of the contact's address.
872
- */
873
- postalOrZip?: string;
874
-
875
- /**
876
- * Province or state of the contact's address.
877
- */
878
- provinceOrState?: string;
879
-
880
- /**
881
- * If `true`, PostGrid will skip running this contact's address through our address
882
- * verification system.
883
- */
884
- skipVerification?: boolean;
885
- }
886
-
887
- export interface ContactCreateWithCompanyName {
888
- /**
889
- * The first line of the contact's address.
890
- */
891
- addressLine1: string;
892
-
893
- companyName: string;
894
-
895
- /**
896
- * The ISO 3611-1 country code of the contact's address.
897
- */
898
- countryCode: string;
899
-
900
- /**
901
- * Second line of the contact's address, if applicable.
902
- */
903
- addressLine2?: string;
904
-
905
- /**
906
- * The city of the contact's address.
907
- */
908
- city?: string;
909
-
910
- /**
911
- * An optional string describing this resource. Will be visible in the API and the
912
- * dashboard.
913
- */
914
- description?: string;
915
-
916
- /**
917
- * Email of the contact.
918
- */
919
- email?: string;
920
-
921
- /**
922
- * First name of the contact.
923
- */
924
- firstName?: string;
925
-
926
- /**
927
- * If `true`, PostGrid will force this contact to have an `addressStatus` of
928
- * `verified` even if our address verification system says otherwise.
929
- */
930
- forceVerifiedStatus?: boolean;
931
-
932
- /**
933
- * Job title of the contact.
934
- */
935
- jobTitle?: string;
936
-
937
- /**
938
- * Last name of the contact.
939
- */
940
- lastName?: string;
941
-
942
- /**
943
- * See the section on Metadata.
944
- */
945
- metadata?: { [key: string]: unknown };
946
-
947
- /**
948
- * Phone number of the contact.
949
- */
950
- phoneNumber?: string;
951
-
952
- /**
953
- * The postal or ZIP code of the contact's address.
954
- */
955
- postalOrZip?: string;
956
-
957
- /**
958
- * Province or state of the contact's address.
959
- */
960
- provinceOrState?: string;
961
-
962
- /**
963
- * If `true`, PostGrid will skip running this contact's address through our address
964
- * verification system.
965
- */
966
- skipVerification?: boolean;
967
- }
968
- }
969
-
970
- export interface ChequeListParams {
971
- limit?: number;
972
-
462
+ export interface ChequeListParams extends SkipLimitParams {
973
463
  /**
974
464
  * You can supply any string to help narrow down the list of resources. For
975
465
  * example, if you pass `"New York"` (quoted), it will return resources that have
@@ -978,8 +468,6 @@ export interface ChequeListParams {
978
468
  * more details.
979
469
  */
980
470
  search?: string;
981
-
982
- skip?: number;
983
471
  }
984
472
 
985
473
  export declare namespace Cheques {
@@ -987,8 +475,8 @@ export declare namespace Cheques {
987
475
  type Cheque as Cheque,
988
476
  type ChequeSize as ChequeSize,
989
477
  type DigitalOnly as DigitalOnly,
990
- type ChequeListResponse as ChequeListResponse,
991
478
  type ChequeRetrieveURLResponse as ChequeRetrieveURLResponse,
479
+ type ChequesSkipLimit as ChequesSkipLimit,
992
480
  type ChequeCreateParams as ChequeCreateParams,
993
481
  type ChequeListParams as ChequeListParams,
994
482
  };