postgrid-node 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +201 -0
  3. package/README.md +346 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +914 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +882 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +144 -0
  87. package/index.d.ts +144 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +161 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +118 -0
  92. package/index.mjs.map +1 -0
  93. package/package.json +124 -0
  94. package/pagination.d.ts +24 -0
  95. package/pagination.d.ts.map +1 -0
  96. package/pagination.js +45 -0
  97. package/pagination.js.map +1 -0
  98. package/pagination.mjs +41 -0
  99. package/pagination.mjs.map +1 -0
  100. package/resource.d.ts +6 -0
  101. package/resource.d.ts.map +1 -0
  102. package/resource.js +11 -0
  103. package/resource.js.map +1 -0
  104. package/resource.mjs +7 -0
  105. package/resource.mjs.map +1 -0
  106. package/resources/bank-accounts.d.ts +285 -0
  107. package/resources/bank-accounts.d.ts.map +1 -0
  108. package/resources/bank-accounts.js +45 -0
  109. package/resources/bank-accounts.js.map +1 -0
  110. package/resources/bank-accounts.mjs +40 -0
  111. package/resources/bank-accounts.mjs.map +1 -0
  112. package/resources/boxes.d.ts +683 -0
  113. package/resources/boxes.d.ts.map +1 -0
  114. package/resources/boxes.js +54 -0
  115. package/resources/boxes.js.map +1 -0
  116. package/resources/boxes.mjs +49 -0
  117. package/resources/boxes.mjs.map +1 -0
  118. package/resources/campaigns.d.ts +644 -0
  119. package/resources/campaigns.d.ts.map +1 -0
  120. package/resources/campaigns.js +67 -0
  121. package/resources/campaigns.js.map +1 -0
  122. package/resources/campaigns.mjs +62 -0
  123. package/resources/campaigns.mjs.map +1 -0
  124. package/resources/cheques/cheques.d.ts +349 -0
  125. package/resources/cheques/cheques.d.ts.map +1 -0
  126. package/resources/cheques/cheques.js +95 -0
  127. package/resources/cheques/cheques.js.map +1 -0
  128. package/resources/cheques/cheques.mjs +67 -0
  129. package/resources/cheques/cheques.mjs.map +1 -0
  130. package/resources/cheques/index.d.ts +4 -0
  131. package/resources/cheques/index.d.ts.map +1 -0
  132. package/resources/cheques/index.js +12 -0
  133. package/resources/cheques/index.js.map +1 -0
  134. package/resources/cheques/index.mjs +5 -0
  135. package/resources/cheques/index.mjs.map +1 -0
  136. package/resources/cheques/url.d.ts +29 -0
  137. package/resources/cheques/url.d.ts.map +1 -0
  138. package/resources/cheques/url.js +20 -0
  139. package/resources/cheques/url.js.map +1 -0
  140. package/resources/cheques/url.mjs +16 -0
  141. package/resources/cheques/url.mjs.map +1 -0
  142. package/resources/cheques/with-deposit-ready-pdf.d.ts +13 -0
  143. package/resources/cheques/with-deposit-ready-pdf.d.ts.map +1 -0
  144. package/resources/cheques/with-deposit-ready-pdf.js +18 -0
  145. package/resources/cheques/with-deposit-ready-pdf.js.map +1 -0
  146. package/resources/cheques/with-deposit-ready-pdf.mjs +14 -0
  147. package/resources/cheques/with-deposit-ready-pdf.mjs.map +1 -0
  148. package/resources/contacts.d.ts +295 -0
  149. package/resources/contacts.d.ts.map +1 -0
  150. package/resources/contacts.js +52 -0
  151. package/resources/contacts.js.map +1 -0
  152. package/resources/contacts.mjs +47 -0
  153. package/resources/contacts.mjs.map +1 -0
  154. package/resources/index.d.ts +12 -0
  155. package/resources/index.d.ts.map +1 -0
  156. package/resources/index.js +50 -0
  157. package/resources/index.js.map +1 -0
  158. package/resources/index.mjs +13 -0
  159. package/resources/index.mjs.map +1 -0
  160. package/resources/letters.d.ts +639 -0
  161. package/resources/letters.d.ts.map +1 -0
  162. package/resources/letters.js +55 -0
  163. package/resources/letters.js.map +1 -0
  164. package/resources/letters.mjs +50 -0
  165. package/resources/letters.mjs.map +1 -0
  166. package/resources/postcards.d.ts +346 -0
  167. package/resources/postcards.d.ts.map +1 -0
  168. package/resources/postcards.js +56 -0
  169. package/resources/postcards.js.map +1 -0
  170. package/resources/postcards.mjs +51 -0
  171. package/resources/postcards.mjs.map +1 -0
  172. package/resources/reports/exports.d.ts +207 -0
  173. package/resources/reports/exports.d.ts.map +1 -0
  174. package/resources/reports/exports.js +33 -0
  175. package/resources/reports/exports.js.map +1 -0
  176. package/resources/reports/exports.mjs +29 -0
  177. package/resources/reports/exports.mjs.map +1 -0
  178. package/resources/reports/index.d.ts +4 -0
  179. package/resources/reports/index.d.ts.map +1 -0
  180. package/resources/reports/index.js +12 -0
  181. package/resources/reports/index.js.map +1 -0
  182. package/resources/reports/index.mjs +5 -0
  183. package/resources/reports/index.mjs.map +1 -0
  184. package/resources/reports/reports.d.ts +245 -0
  185. package/resources/reports/reports.d.ts.map +1 -0
  186. package/resources/reports/reports.js +85 -0
  187. package/resources/reports/reports.js.map +1 -0
  188. package/resources/reports/reports.mjs +57 -0
  189. package/resources/reports/reports.mjs.map +1 -0
  190. package/resources/reports/samples.d.ts +81 -0
  191. package/resources/reports/samples.d.ts.map +1 -0
  192. package/resources/reports/samples.js +26 -0
  193. package/resources/reports/samples.js.map +1 -0
  194. package/resources/reports/samples.mjs +22 -0
  195. package/resources/reports/samples.mjs.map +1 -0
  196. package/resources/self-mailers.d.ts +622 -0
  197. package/resources/self-mailers.d.ts.map +1 -0
  198. package/resources/self-mailers.js +45 -0
  199. package/resources/self-mailers.js.map +1 -0
  200. package/resources/self-mailers.mjs +40 -0
  201. package/resources/self-mailers.mjs.map +1 -0
  202. package/resources/shared.d.ts +147 -0
  203. package/resources/shared.d.ts.map +1 -0
  204. package/resources/shared.js +4 -0
  205. package/resources/shared.js.map +1 -0
  206. package/resources/shared.mjs +3 -0
  207. package/resources/shared.mjs.map +1 -0
  208. package/resources/templates.d.ts +126 -0
  209. package/resources/templates.d.ts.map +1 -0
  210. package/resources/templates.js +46 -0
  211. package/resources/templates.js.map +1 -0
  212. package/resources/templates.mjs +41 -0
  213. package/resources/templates.mjs.map +1 -0
  214. package/shims/node.d.ts +30 -0
  215. package/shims/node.d.ts.map +1 -0
  216. package/shims/node.js +31 -0
  217. package/shims/node.js.map +1 -0
  218. package/shims/node.mjs +5 -0
  219. package/shims/node.mjs.map +1 -0
  220. package/shims/web.d.ts +26 -0
  221. package/shims/web.d.ts.map +1 -0
  222. package/shims/web.js +31 -0
  223. package/shims/web.js.map +1 -0
  224. package/shims/web.mjs +5 -0
  225. package/shims/web.mjs.map +1 -0
  226. package/src/_shims/MultipartBody.ts +9 -0
  227. package/src/_shims/README.md +46 -0
  228. package/src/_shims/auto/runtime-bun.ts +4 -0
  229. package/src/_shims/auto/runtime-node.ts +4 -0
  230. package/src/_shims/auto/runtime.ts +4 -0
  231. package/src/_shims/auto/types-node.ts +4 -0
  232. package/src/_shims/auto/types.d.ts +101 -0
  233. package/src/_shims/auto/types.js +3 -0
  234. package/src/_shims/auto/types.mjs +3 -0
  235. package/src/_shims/bun-runtime.ts +14 -0
  236. package/src/_shims/index.d.ts +81 -0
  237. package/src/_shims/index.js +13 -0
  238. package/src/_shims/index.mjs +7 -0
  239. package/src/_shims/manual-types.d.ts +12 -0
  240. package/src/_shims/manual-types.js +3 -0
  241. package/src/_shims/manual-types.mjs +3 -0
  242. package/src/_shims/node-runtime.ts +81 -0
  243. package/src/_shims/node-types.d.ts +42 -0
  244. package/src/_shims/node-types.js +3 -0
  245. package/src/_shims/node-types.mjs +3 -0
  246. package/src/_shims/registry.ts +67 -0
  247. package/src/_shims/web-runtime.ts +103 -0
  248. package/src/_shims/web-types.d.ts +83 -0
  249. package/src/_shims/web-types.js +3 -0
  250. package/src/_shims/web-types.mjs +3 -0
  251. package/src/core.ts +1208 -0
  252. package/src/error.ts +130 -0
  253. package/src/index.ts +428 -0
  254. package/src/lib/.keep +4 -0
  255. package/src/pagination.ts +69 -0
  256. package/src/resource.ts +11 -0
  257. package/src/resources/bank-accounts.ts +382 -0
  258. package/src/resources/boxes.ts +982 -0
  259. package/src/resources/campaigns.ts +853 -0
  260. package/src/resources/cheques/cheques.ts +493 -0
  261. package/src/resources/cheques/index.ts +12 -0
  262. package/src/resources/cheques/url.ts +37 -0
  263. package/src/resources/cheques/with-deposit-ready-pdf.ts +17 -0
  264. package/src/resources/contacts.ts +387 -0
  265. package/src/resources/index.ts +102 -0
  266. package/src/resources/letters.ts +870 -0
  267. package/src/resources/postcards.ts +548 -0
  268. package/src/resources/reports/exports.ts +272 -0
  269. package/src/resources/reports/index.ts +28 -0
  270. package/src/resources/reports/reports.ts +359 -0
  271. package/src/resources/reports/samples.ts +109 -0
  272. package/src/resources/self-mailers.ts +958 -0
  273. package/src/resources/shared.ts +182 -0
  274. package/src/resources/templates.ts +184 -0
  275. package/src/shims/node.ts +50 -0
  276. package/src/shims/web.ts +50 -0
  277. package/src/tsconfig.json +11 -0
  278. package/src/uploads.ts +255 -0
  279. package/src/version.ts +1 -0
  280. package/uploads.d.ts +75 -0
  281. package/uploads.d.ts.map +1 -0
  282. package/uploads.js +171 -0
  283. package/uploads.js.map +1 -0
  284. package/uploads.mjs +158 -0
  285. package/uploads.mjs.map +1 -0
  286. package/version.d.ts +2 -0
  287. package/version.d.ts.map +1 -0
  288. package/version.js +5 -0
  289. package/version.js.map +1 -0
  290. package/version.mjs +2 -0
  291. package/version.mjs.map +1 -0
@@ -0,0 +1,387 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import { isRequestOptions } from '../core';
5
+ import * as Core from '../core';
6
+ import { List, type ListParams } from '../pagination';
7
+
8
+ export class Contacts extends APIResource {
9
+ /**
10
+ * Creates a contact. This will also verify the contact's address **if you create
11
+ * it using a live API key**. To sucessfully create a contact, either a
12
+ * `firstName`, a `companyName`, or both are required. You can supply both, but you
13
+ * **cannot** supply neither.
14
+ *
15
+ * You have the option to supply the entire address (except for `countryCode`) via
16
+ * `addressLine1`, in which case PostGrid will parse it automatically. However,
17
+ * this is **not guaranteed to be correct**, so we recommend passing along the
18
+ * structured address fields (`city`, `provinceOrState`, etc) if you have them.
19
+ *
20
+ * _Note that if you create a contact that has identical information to another
21
+ * contact, this will simply update the description of the existing contact and
22
+ * return it. This avoids creating duplicate contacts._
23
+ */
24
+ create(body: ContactCreateParams, options?: Core.RequestOptions): Core.APIPromise<Contact> {
25
+ return this._client.post('/contacts', { body, ...options });
26
+ }
27
+
28
+ /**
29
+ * Retrieve a contact.
30
+ */
31
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Contact> {
32
+ return this._client.get(`/contacts/${id}`, options);
33
+ }
34
+
35
+ /**
36
+ * Get a list of contacts.
37
+ */
38
+ list(query?: ContactListParams, options?: Core.RequestOptions): Core.PagePromise<ContactsList, Contact>;
39
+ list(options?: Core.RequestOptions): Core.PagePromise<ContactsList, Contact>;
40
+ list(
41
+ query: ContactListParams | Core.RequestOptions = {},
42
+ options?: Core.RequestOptions,
43
+ ): Core.PagePromise<ContactsList, Contact> {
44
+ if (isRequestOptions(query)) {
45
+ return this.list({}, query);
46
+ }
47
+ return this._client.getAPIList('/contacts', ContactsList, { query, ...options });
48
+ }
49
+
50
+ /**
51
+ * Delete a contact. Note that this will not affect orders that were sent to this
52
+ * contact.
53
+ */
54
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<ContactDeleteResponse> {
55
+ return this._client.delete(`/contacts/${id}`, options);
56
+ }
57
+ }
58
+
59
+ export class ContactsList extends List<Contact> {}
60
+
61
+ export interface Contact {
62
+ /**
63
+ * A unique ID prefixed with contact\_
64
+ */
65
+ id: string;
66
+
67
+ /**
68
+ * The first line of the contact's address.
69
+ */
70
+ addressLine1: string;
71
+
72
+ /**
73
+ * One of `verified`, `corrected`, or `failed`.
74
+ */
75
+ addressStatus: 'verified' | 'corrected' | 'failed';
76
+
77
+ /**
78
+ * The ISO 3611-1 country code of the contact's address.
79
+ */
80
+ countryCode: string;
81
+
82
+ /**
83
+ * The UTC time at which this resource was created.
84
+ */
85
+ createdAt: string;
86
+
87
+ /**
88
+ * `true` if this is a live mode resource else `false`.
89
+ */
90
+ live: boolean;
91
+
92
+ /**
93
+ * Always `contact`.
94
+ */
95
+ object: 'contact';
96
+
97
+ /**
98
+ * The UTC time at which this resource was last updated.
99
+ */
100
+ updatedAt: string;
101
+
102
+ /**
103
+ * A series of human-readable errors/warnings that were raised when running the
104
+ * provided address through our address verification.
105
+ */
106
+ addressErrors?: string;
107
+
108
+ /**
109
+ * Second line of the contact's address, if applicable.
110
+ */
111
+ addressLine2?: string;
112
+
113
+ /**
114
+ * The city of the contact's address.
115
+ */
116
+ city?: string;
117
+
118
+ /**
119
+ * Company name of the contact.
120
+ */
121
+ companyName?: string;
122
+
123
+ /**
124
+ * An optional string describing this resource. Will be visible in the API and the
125
+ * dashboard.
126
+ */
127
+ description?: string;
128
+
129
+ /**
130
+ * Email of the contact.
131
+ */
132
+ email?: string;
133
+
134
+ /**
135
+ * First name of the contact.
136
+ */
137
+ firstName?: string;
138
+
139
+ /**
140
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
141
+ * `verified` even if our address verification system says otherwise.
142
+ */
143
+ forceVerifiedStatus?: boolean;
144
+
145
+ /**
146
+ * Job title of the contact.
147
+ */
148
+ jobTitle?: string;
149
+
150
+ /**
151
+ * Last name of the contact.
152
+ */
153
+ lastName?: string;
154
+
155
+ /**
156
+ * See the section on Metadata.
157
+ */
158
+ metadata?: Record<string, unknown>;
159
+
160
+ /**
161
+ * Phone number of the contact.
162
+ */
163
+ phoneNumber?: string;
164
+
165
+ /**
166
+ * The postal or ZIP code of the contact's address.
167
+ */
168
+ postalOrZip?: string;
169
+
170
+ /**
171
+ * Province or state of the contact's address.
172
+ */
173
+ provinceOrState?: string;
174
+
175
+ /**
176
+ * If `true`, PostGrid will skip running this contact's address through our address
177
+ * verification system.
178
+ */
179
+ skipVerification?: boolean;
180
+ }
181
+
182
+ export interface ContactDeleteResponse {
183
+ /**
184
+ * A unique ID prefixed with contact\_
185
+ */
186
+ id: string;
187
+
188
+ deleted: true;
189
+
190
+ /**
191
+ * Always `contact`.
192
+ */
193
+ object: 'contact';
194
+ }
195
+
196
+ export type ContactCreateParams =
197
+ | ContactCreateParams.ContactCreateWithFirstName
198
+ | ContactCreateParams.ContactCreateWithCompanyName;
199
+
200
+ export declare namespace ContactCreateParams {
201
+ export interface ContactCreateWithFirstName {
202
+ /**
203
+ * The first line of the contact's address.
204
+ */
205
+ addressLine1: string;
206
+
207
+ /**
208
+ * The ISO 3611-1 country code of the contact's address.
209
+ */
210
+ countryCode: string;
211
+
212
+ firstName: string;
213
+
214
+ /**
215
+ * Second line of the contact's address, if applicable.
216
+ */
217
+ addressLine2?: string;
218
+
219
+ /**
220
+ * The city of the contact's address.
221
+ */
222
+ city?: string;
223
+
224
+ /**
225
+ * Company name of the contact.
226
+ */
227
+ companyName?: string;
228
+
229
+ /**
230
+ * An optional string describing this resource. Will be visible in the API and the
231
+ * dashboard.
232
+ */
233
+ description?: string;
234
+
235
+ /**
236
+ * Email of the contact.
237
+ */
238
+ email?: string;
239
+
240
+ /**
241
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
242
+ * `verified` even if our address verification system says otherwise.
243
+ */
244
+ forceVerifiedStatus?: boolean;
245
+
246
+ /**
247
+ * Job title of the contact.
248
+ */
249
+ jobTitle?: string;
250
+
251
+ /**
252
+ * Last name of the contact.
253
+ */
254
+ lastName?: string;
255
+
256
+ /**
257
+ * See the section on Metadata.
258
+ */
259
+ metadata?: Record<string, unknown>;
260
+
261
+ /**
262
+ * Phone number of the contact.
263
+ */
264
+ phoneNumber?: string;
265
+
266
+ /**
267
+ * The postal or ZIP code of the contact's address.
268
+ */
269
+ postalOrZip?: string;
270
+
271
+ /**
272
+ * Province or state of the contact's address.
273
+ */
274
+ provinceOrState?: string;
275
+
276
+ /**
277
+ * If `true`, PostGrid will skip running this contact's address through our address
278
+ * verification system.
279
+ */
280
+ skipVerification?: boolean;
281
+ }
282
+
283
+ export interface ContactCreateWithCompanyName {
284
+ /**
285
+ * The first line of the contact's address.
286
+ */
287
+ addressLine1: string;
288
+
289
+ companyName: string;
290
+
291
+ /**
292
+ * The ISO 3611-1 country code of the contact's address.
293
+ */
294
+ countryCode: string;
295
+
296
+ /**
297
+ * Second line of the contact's address, if applicable.
298
+ */
299
+ addressLine2?: string;
300
+
301
+ /**
302
+ * The city of the contact's address.
303
+ */
304
+ city?: string;
305
+
306
+ /**
307
+ * An optional string describing this resource. Will be visible in the API and the
308
+ * dashboard.
309
+ */
310
+ description?: string;
311
+
312
+ /**
313
+ * Email of the contact.
314
+ */
315
+ email?: string;
316
+
317
+ /**
318
+ * First name of the contact.
319
+ */
320
+ firstName?: string;
321
+
322
+ /**
323
+ * If `true`, PostGrid will force this contact to have an `addressStatus` of
324
+ * `verified` even if our address verification system says otherwise.
325
+ */
326
+ forceVerifiedStatus?: boolean;
327
+
328
+ /**
329
+ * Job title of the contact.
330
+ */
331
+ jobTitle?: string;
332
+
333
+ /**
334
+ * Last name of the contact.
335
+ */
336
+ lastName?: string;
337
+
338
+ /**
339
+ * See the section on Metadata.
340
+ */
341
+ metadata?: Record<string, unknown>;
342
+
343
+ /**
344
+ * Phone number of the contact.
345
+ */
346
+ phoneNumber?: string;
347
+
348
+ /**
349
+ * The postal or ZIP code of the contact's address.
350
+ */
351
+ postalOrZip?: string;
352
+
353
+ /**
354
+ * Province or state of the contact's address.
355
+ */
356
+ provinceOrState?: string;
357
+
358
+ /**
359
+ * If `true`, PostGrid will skip running this contact's address through our address
360
+ * verification system.
361
+ */
362
+ skipVerification?: boolean;
363
+ }
364
+ }
365
+
366
+ export interface ContactListParams extends ListParams {
367
+ /**
368
+ * You can supply any string to help narrow down the list of resources. For
369
+ * example, if you pass `"New York"` (quoted), it will return resources that have
370
+ * that string present somewhere in their response. Alternatively, you can supply a
371
+ * structured search query. See the documentation on `StructuredSearchQuery` for
372
+ * more details.
373
+ */
374
+ search?: string;
375
+ }
376
+
377
+ Contacts.ContactsList = ContactsList;
378
+
379
+ export declare namespace Contacts {
380
+ export {
381
+ type Contact as Contact,
382
+ type ContactDeleteResponse as ContactDeleteResponse,
383
+ ContactsList as ContactsList,
384
+ type ContactCreateParams as ContactCreateParams,
385
+ type ContactListParams as ContactListParams,
386
+ };
387
+ }
@@ -0,0 +1,102 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './shared';
4
+ export {
5
+ BankAccountsList,
6
+ BankAccounts,
7
+ type BankAccount,
8
+ type BankAccountList,
9
+ type BankAccountDeleteResponse,
10
+ type BankAccountCreateParams,
11
+ type BankAccountListParams,
12
+ } from './bank-accounts';
13
+ export {
14
+ BoxListResponsesList,
15
+ Boxes,
16
+ type BoxCreateResponse,
17
+ type BoxRetrieveResponse,
18
+ type BoxListResponse,
19
+ type BoxCancelResponse,
20
+ type BoxCreateParams,
21
+ type BoxListParams,
22
+ } from './boxes';
23
+ export {
24
+ CampaignListResponsesList,
25
+ Campaigns,
26
+ type CampaignCreateResponse,
27
+ type CampaignRetrieveResponse,
28
+ type CampaignUpdateResponse,
29
+ type CampaignListResponse,
30
+ type CampaignDeleteResponse,
31
+ type CampaignSendResponse,
32
+ type CampaignCreateParams,
33
+ type CampaignUpdateParams,
34
+ type CampaignListParams,
35
+ type CampaignSendParams,
36
+ } from './campaigns';
37
+ export {
38
+ ChequesList,
39
+ Cheques,
40
+ type Cheque,
41
+ type ChequeList,
42
+ type ChequeCreateParams,
43
+ type ChequeListParams,
44
+ } from './cheques/cheques';
45
+ export {
46
+ ContactsList,
47
+ Contacts,
48
+ type Contact,
49
+ type ContactDeleteResponse,
50
+ type ContactCreateParams,
51
+ type ContactListParams,
52
+ } from './contacts';
53
+ export {
54
+ LettersList,
55
+ Letters,
56
+ type Letter,
57
+ type LetterList,
58
+ type LetterURLResponse,
59
+ type LetterCreateParams,
60
+ type LetterListParams,
61
+ } from './letters';
62
+ export {
63
+ PostcardsList,
64
+ Postcards,
65
+ type Postcard,
66
+ type PostcardList,
67
+ type PostcardURLResponse,
68
+ type PostcardCreateParams,
69
+ type PostcardListParams,
70
+ } from './postcards';
71
+ export {
72
+ ReportListResponsesList,
73
+ Reports,
74
+ type ReportCreateResponse,
75
+ type ReportRetrieveResponse,
76
+ type ReportUpdateResponse,
77
+ type ReportListResponse,
78
+ type ReportDeleteResponse,
79
+ type ReportCreateParams,
80
+ type ReportUpdateParams,
81
+ type ReportListParams,
82
+ } from './reports/reports';
83
+ export {
84
+ SelfMailerListResponsesList,
85
+ SelfMailers,
86
+ type SelfMailerCreateResponse,
87
+ type SelfMailerRetrieveResponse,
88
+ type SelfMailerListResponse,
89
+ type SelfMailerCancelResponse,
90
+ type SelfMailerCreateParams,
91
+ type SelfMailerListParams,
92
+ } from './self-mailers';
93
+ export {
94
+ TemplatesList,
95
+ Templates,
96
+ type Template,
97
+ type TemplateList,
98
+ type TemplateDeleteResponse,
99
+ type TemplateCreateParams,
100
+ type TemplateUpdateParams,
101
+ type TemplateListParams,
102
+ } from './templates';