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,958 @@
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 * as ContactsAPI from './contacts';
7
+ import * as Shared from './shared';
8
+ import { List, type ListParams } from '../pagination';
9
+
10
+ export class SelfMailers extends APIResource {
11
+ /**
12
+ * Create a self-mailer. Note that you can supply one of the following:
13
+ *
14
+ * - HTML content for the inside and outside of the self-mailer
15
+ * - A template ID for the inside and outside of the self-mailer
16
+ * - A URL or file for a 2 page PDF where the first page is the outside of the
17
+ * self-mailer and the second page is the inside
18
+ * - Upload the aforementioned PDF file via a multipart form upload request
19
+ */
20
+ create(
21
+ body: SelfMailerCreateParams,
22
+ options?: Core.RequestOptions,
23
+ ): Core.APIPromise<SelfMailerCreateResponse> {
24
+ return this._client.post('/self_mailers', { body, ...options });
25
+ }
26
+
27
+ /**
28
+ * Retrieve a self-mailer by ID.
29
+ */
30
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<SelfMailerRetrieveResponse> {
31
+ return this._client.get(`/self_mailers/${id}`, options);
32
+ }
33
+
34
+ /**
35
+ * Get a list of self-mailers.
36
+ */
37
+ list(
38
+ query?: SelfMailerListParams,
39
+ options?: Core.RequestOptions,
40
+ ): Core.PagePromise<SelfMailerListResponsesList, SelfMailerListResponse>;
41
+ list(options?: Core.RequestOptions): Core.PagePromise<SelfMailerListResponsesList, SelfMailerListResponse>;
42
+ list(
43
+ query: SelfMailerListParams | Core.RequestOptions = {},
44
+ options?: Core.RequestOptions,
45
+ ): Core.PagePromise<SelfMailerListResponsesList, SelfMailerListResponse> {
46
+ if (isRequestOptions(query)) {
47
+ return this.list({}, query);
48
+ }
49
+ return this._client.getAPIList('/self_mailers', SelfMailerListResponsesList, { query, ...options });
50
+ }
51
+
52
+ /**
53
+ * Cancel a self-mailer by ID. Note that this operation cannot be undone.
54
+ */
55
+ cancel(id: string, options?: Core.RequestOptions): Core.APIPromise<SelfMailerCancelResponse> {
56
+ return this._client.delete(`/self_mailers/${id}`, options);
57
+ }
58
+ }
59
+
60
+ export class SelfMailerListResponsesList extends List<SelfMailerListResponse> {}
61
+
62
+ export interface SelfMailerCreateResponse {
63
+ /**
64
+ * A unique ID prefixed with self*mailer*
65
+ */
66
+ id: string;
67
+
68
+ /**
69
+ * The UTC time at which this resource was created.
70
+ */
71
+ createdAt: string;
72
+
73
+ /**
74
+ * The contact information of the sender.
75
+ */
76
+ from: ContactsAPI.Contact;
77
+
78
+ /**
79
+ * `true` if this is a live mode resource else `false`.
80
+ */
81
+ live: boolean;
82
+
83
+ /**
84
+ * The mailing class of this order. This determines the speed and cost of delivery.
85
+ * See `OrderMailingClass` for more details.
86
+ */
87
+ mailingClass:
88
+ | 'first_class'
89
+ | 'standard_class'
90
+ | 'express'
91
+ | 'certified'
92
+ | 'certified_return_receipt'
93
+ | 'registered'
94
+ | 'usps_first_class'
95
+ | 'usps_standard_class'
96
+ | 'usps_eddm'
97
+ | 'usps_express_2_day'
98
+ | 'usps_express_3_day'
99
+ | 'usps_first_class_certified'
100
+ | 'usps_first_class_certified_return_receipt'
101
+ | 'usps_first_class_registered'
102
+ | 'usps_express_3_day_signature_confirmation'
103
+ | 'usps_express_3_day_certified'
104
+ | 'usps_express_3_day_certified_return_receipt'
105
+ | 'ca_post_lettermail'
106
+ | 'ca_post_personalized'
107
+ | 'ca_post_neighbourhood_mail'
108
+ | 'ups_express_overnight'
109
+ | 'ups_express_2_day'
110
+ | 'ups_express_3_day'
111
+ | 'royal_mail_first_class'
112
+ | 'royal_mail_second_class'
113
+ | 'au_post_second_class';
114
+
115
+ /**
116
+ * Always `self_mailer`.
117
+ */
118
+ object: 'self_mailer';
119
+
120
+ /**
121
+ * This order will transition from `ready` to `printing` on the day after this
122
+ * date. For example, if this is a date on Tuesday, the order will transition to
123
+ * `printing` on Wednesday at midnight eastern time.
124
+ */
125
+ sendDate: string;
126
+
127
+ /**
128
+ * Enum representing the supported self-mailer sizes.
129
+ */
130
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
131
+
132
+ /**
133
+ * See `OrderStatus` for more details on the status of this order.
134
+ */
135
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
136
+
137
+ /**
138
+ * The recipient of this order. This will be provided even if you delete the
139
+ * underlying contact.
140
+ */
141
+ to: ContactsAPI.Contact;
142
+
143
+ /**
144
+ * The UTC time at which this resource was last updated.
145
+ */
146
+ updatedAt: string;
147
+
148
+ /**
149
+ * The cancellation details of this order. Populated if the order has been
150
+ * cancelled.
151
+ */
152
+ cancellation?: Shared.Cancellation;
153
+
154
+ /**
155
+ * An optional string describing this resource. Will be visible in the API and the
156
+ * dashboard.
157
+ */
158
+ description?: string;
159
+
160
+ /**
161
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
162
+ */
163
+ imbDate?: string;
164
+
165
+ /**
166
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
167
+ * US-printed and US-destined orders. This is the most detailed way to track
168
+ * non-express/certified orders.
169
+ */
170
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
171
+
172
+ /**
173
+ * The most recent ZIP code of the USPS facility that the order has been processed
174
+ * through. Only populated when an `imbStatus` is present.
175
+ */
176
+ imbZIPCode?: string;
177
+
178
+ /**
179
+ * These will be merged with the variables in the template or HTML you create this
180
+ * order with. The keys in this object should match the variable names in the
181
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
182
+ * PDFs uploaded with the order.
183
+ */
184
+ mergeVariables?: Record<string, unknown>;
185
+
186
+ /**
187
+ * See the section on Metadata.
188
+ */
189
+ metadata?: Record<string, unknown>;
190
+
191
+ /**
192
+ * The tracking number of this order. Populated after an express/certified order
193
+ * has been processed for delivery.
194
+ */
195
+ trackingNumber?: string;
196
+
197
+ /**
198
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
199
+ * ensure that the order is correct before it is sent out because it shows what
200
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
201
+ * this field will be returned by all `GET` endpoints which produce this order.
202
+ *
203
+ * This URL is a signed link to the PDF preview. It will expire after a short
204
+ * period of time. If you need to access this URL after it has expired, you can
205
+ * regenerate it by calling the `GET` endpoint again.
206
+ */
207
+ url?: string;
208
+ }
209
+
210
+ export interface SelfMailerRetrieveResponse {
211
+ /**
212
+ * A unique ID prefixed with self*mailer*
213
+ */
214
+ id: string;
215
+
216
+ /**
217
+ * The UTC time at which this resource was created.
218
+ */
219
+ createdAt: string;
220
+
221
+ /**
222
+ * The contact information of the sender.
223
+ */
224
+ from: ContactsAPI.Contact;
225
+
226
+ /**
227
+ * `true` if this is a live mode resource else `false`.
228
+ */
229
+ live: boolean;
230
+
231
+ /**
232
+ * The mailing class of this order. This determines the speed and cost of delivery.
233
+ * See `OrderMailingClass` for more details.
234
+ */
235
+ mailingClass:
236
+ | 'first_class'
237
+ | 'standard_class'
238
+ | 'express'
239
+ | 'certified'
240
+ | 'certified_return_receipt'
241
+ | 'registered'
242
+ | 'usps_first_class'
243
+ | 'usps_standard_class'
244
+ | 'usps_eddm'
245
+ | 'usps_express_2_day'
246
+ | 'usps_express_3_day'
247
+ | 'usps_first_class_certified'
248
+ | 'usps_first_class_certified_return_receipt'
249
+ | 'usps_first_class_registered'
250
+ | 'usps_express_3_day_signature_confirmation'
251
+ | 'usps_express_3_day_certified'
252
+ | 'usps_express_3_day_certified_return_receipt'
253
+ | 'ca_post_lettermail'
254
+ | 'ca_post_personalized'
255
+ | 'ca_post_neighbourhood_mail'
256
+ | 'ups_express_overnight'
257
+ | 'ups_express_2_day'
258
+ | 'ups_express_3_day'
259
+ | 'royal_mail_first_class'
260
+ | 'royal_mail_second_class'
261
+ | 'au_post_second_class';
262
+
263
+ /**
264
+ * Always `self_mailer`.
265
+ */
266
+ object: 'self_mailer';
267
+
268
+ /**
269
+ * This order will transition from `ready` to `printing` on the day after this
270
+ * date. For example, if this is a date on Tuesday, the order will transition to
271
+ * `printing` on Wednesday at midnight eastern time.
272
+ */
273
+ sendDate: string;
274
+
275
+ /**
276
+ * Enum representing the supported self-mailer sizes.
277
+ */
278
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
279
+
280
+ /**
281
+ * See `OrderStatus` for more details on the status of this order.
282
+ */
283
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
284
+
285
+ /**
286
+ * The recipient of this order. This will be provided even if you delete the
287
+ * underlying contact.
288
+ */
289
+ to: ContactsAPI.Contact;
290
+
291
+ /**
292
+ * The UTC time at which this resource was last updated.
293
+ */
294
+ updatedAt: string;
295
+
296
+ /**
297
+ * The cancellation details of this order. Populated if the order has been
298
+ * cancelled.
299
+ */
300
+ cancellation?: Shared.Cancellation;
301
+
302
+ /**
303
+ * An optional string describing this resource. Will be visible in the API and the
304
+ * dashboard.
305
+ */
306
+ description?: string;
307
+
308
+ /**
309
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
310
+ */
311
+ imbDate?: string;
312
+
313
+ /**
314
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
315
+ * US-printed and US-destined orders. This is the most detailed way to track
316
+ * non-express/certified orders.
317
+ */
318
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
319
+
320
+ /**
321
+ * The most recent ZIP code of the USPS facility that the order has been processed
322
+ * through. Only populated when an `imbStatus` is present.
323
+ */
324
+ imbZIPCode?: string;
325
+
326
+ /**
327
+ * These will be merged with the variables in the template or HTML you create this
328
+ * order with. The keys in this object should match the variable names in the
329
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
330
+ * PDFs uploaded with the order.
331
+ */
332
+ mergeVariables?: Record<string, unknown>;
333
+
334
+ /**
335
+ * See the section on Metadata.
336
+ */
337
+ metadata?: Record<string, unknown>;
338
+
339
+ /**
340
+ * The tracking number of this order. Populated after an express/certified order
341
+ * has been processed for delivery.
342
+ */
343
+ trackingNumber?: string;
344
+
345
+ /**
346
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
347
+ * ensure that the order is correct before it is sent out because it shows what
348
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
349
+ * this field will be returned by all `GET` endpoints which produce this order.
350
+ *
351
+ * This URL is a signed link to the PDF preview. It will expire after a short
352
+ * period of time. If you need to access this URL after it has expired, you can
353
+ * regenerate it by calling the `GET` endpoint again.
354
+ */
355
+ url?: string;
356
+ }
357
+
358
+ export interface SelfMailerListResponse {
359
+ /**
360
+ * A unique ID prefixed with self*mailer*
361
+ */
362
+ id: string;
363
+
364
+ /**
365
+ * The UTC time at which this resource was created.
366
+ */
367
+ createdAt: string;
368
+
369
+ /**
370
+ * The contact information of the sender.
371
+ */
372
+ from: ContactsAPI.Contact;
373
+
374
+ /**
375
+ * `true` if this is a live mode resource else `false`.
376
+ */
377
+ live: boolean;
378
+
379
+ /**
380
+ * The mailing class of this order. This determines the speed and cost of delivery.
381
+ * See `OrderMailingClass` for more details.
382
+ */
383
+ mailingClass:
384
+ | 'first_class'
385
+ | 'standard_class'
386
+ | 'express'
387
+ | 'certified'
388
+ | 'certified_return_receipt'
389
+ | 'registered'
390
+ | 'usps_first_class'
391
+ | 'usps_standard_class'
392
+ | 'usps_eddm'
393
+ | 'usps_express_2_day'
394
+ | 'usps_express_3_day'
395
+ | 'usps_first_class_certified'
396
+ | 'usps_first_class_certified_return_receipt'
397
+ | 'usps_first_class_registered'
398
+ | 'usps_express_3_day_signature_confirmation'
399
+ | 'usps_express_3_day_certified'
400
+ | 'usps_express_3_day_certified_return_receipt'
401
+ | 'ca_post_lettermail'
402
+ | 'ca_post_personalized'
403
+ | 'ca_post_neighbourhood_mail'
404
+ | 'ups_express_overnight'
405
+ | 'ups_express_2_day'
406
+ | 'ups_express_3_day'
407
+ | 'royal_mail_first_class'
408
+ | 'royal_mail_second_class'
409
+ | 'au_post_second_class';
410
+
411
+ /**
412
+ * Always `self_mailer`.
413
+ */
414
+ object: 'self_mailer';
415
+
416
+ /**
417
+ * This order will transition from `ready` to `printing` on the day after this
418
+ * date. For example, if this is a date on Tuesday, the order will transition to
419
+ * `printing` on Wednesday at midnight eastern time.
420
+ */
421
+ sendDate: string;
422
+
423
+ /**
424
+ * Enum representing the supported self-mailer sizes.
425
+ */
426
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
427
+
428
+ /**
429
+ * See `OrderStatus` for more details on the status of this order.
430
+ */
431
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
432
+
433
+ /**
434
+ * The recipient of this order. This will be provided even if you delete the
435
+ * underlying contact.
436
+ */
437
+ to: ContactsAPI.Contact;
438
+
439
+ /**
440
+ * The UTC time at which this resource was last updated.
441
+ */
442
+ updatedAt: string;
443
+
444
+ /**
445
+ * The cancellation details of this order. Populated if the order has been
446
+ * cancelled.
447
+ */
448
+ cancellation?: Shared.Cancellation;
449
+
450
+ /**
451
+ * An optional string describing this resource. Will be visible in the API and the
452
+ * dashboard.
453
+ */
454
+ description?: string;
455
+
456
+ /**
457
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
458
+ */
459
+ imbDate?: string;
460
+
461
+ /**
462
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
463
+ * US-printed and US-destined orders. This is the most detailed way to track
464
+ * non-express/certified orders.
465
+ */
466
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
467
+
468
+ /**
469
+ * The most recent ZIP code of the USPS facility that the order has been processed
470
+ * through. Only populated when an `imbStatus` is present.
471
+ */
472
+ imbZIPCode?: string;
473
+
474
+ /**
475
+ * These will be merged with the variables in the template or HTML you create this
476
+ * order with. The keys in this object should match the variable names in the
477
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
478
+ * PDFs uploaded with the order.
479
+ */
480
+ mergeVariables?: Record<string, unknown>;
481
+
482
+ /**
483
+ * See the section on Metadata.
484
+ */
485
+ metadata?: Record<string, unknown>;
486
+
487
+ /**
488
+ * The tracking number of this order. Populated after an express/certified order
489
+ * has been processed for delivery.
490
+ */
491
+ trackingNumber?: string;
492
+
493
+ /**
494
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
495
+ * ensure that the order is correct before it is sent out because it shows what
496
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
497
+ * this field will be returned by all `GET` endpoints which produce this order.
498
+ *
499
+ * This URL is a signed link to the PDF preview. It will expire after a short
500
+ * period of time. If you need to access this URL after it has expired, you can
501
+ * regenerate it by calling the `GET` endpoint again.
502
+ */
503
+ url?: string;
504
+ }
505
+
506
+ export interface SelfMailerCancelResponse {
507
+ /**
508
+ * A unique ID prefixed with self*mailer*
509
+ */
510
+ id: string;
511
+
512
+ /**
513
+ * The UTC time at which this resource was created.
514
+ */
515
+ createdAt: string;
516
+
517
+ /**
518
+ * The contact information of the sender.
519
+ */
520
+ from: ContactsAPI.Contact;
521
+
522
+ /**
523
+ * `true` if this is a live mode resource else `false`.
524
+ */
525
+ live: boolean;
526
+
527
+ /**
528
+ * The mailing class of this order. This determines the speed and cost of delivery.
529
+ * See `OrderMailingClass` for more details.
530
+ */
531
+ mailingClass:
532
+ | 'first_class'
533
+ | 'standard_class'
534
+ | 'express'
535
+ | 'certified'
536
+ | 'certified_return_receipt'
537
+ | 'registered'
538
+ | 'usps_first_class'
539
+ | 'usps_standard_class'
540
+ | 'usps_eddm'
541
+ | 'usps_express_2_day'
542
+ | 'usps_express_3_day'
543
+ | 'usps_first_class_certified'
544
+ | 'usps_first_class_certified_return_receipt'
545
+ | 'usps_first_class_registered'
546
+ | 'usps_express_3_day_signature_confirmation'
547
+ | 'usps_express_3_day_certified'
548
+ | 'usps_express_3_day_certified_return_receipt'
549
+ | 'ca_post_lettermail'
550
+ | 'ca_post_personalized'
551
+ | 'ca_post_neighbourhood_mail'
552
+ | 'ups_express_overnight'
553
+ | 'ups_express_2_day'
554
+ | 'ups_express_3_day'
555
+ | 'royal_mail_first_class'
556
+ | 'royal_mail_second_class'
557
+ | 'au_post_second_class';
558
+
559
+ /**
560
+ * Always `self_mailer`.
561
+ */
562
+ object: 'self_mailer';
563
+
564
+ /**
565
+ * This order will transition from `ready` to `printing` on the day after this
566
+ * date. For example, if this is a date on Tuesday, the order will transition to
567
+ * `printing` on Wednesday at midnight eastern time.
568
+ */
569
+ sendDate: string;
570
+
571
+ /**
572
+ * Enum representing the supported self-mailer sizes.
573
+ */
574
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
575
+
576
+ /**
577
+ * See `OrderStatus` for more details on the status of this order.
578
+ */
579
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
580
+
581
+ /**
582
+ * The recipient of this order. This will be provided even if you delete the
583
+ * underlying contact.
584
+ */
585
+ to: ContactsAPI.Contact;
586
+
587
+ /**
588
+ * The UTC time at which this resource was last updated.
589
+ */
590
+ updatedAt: string;
591
+
592
+ /**
593
+ * The cancellation details of this order. Populated if the order has been
594
+ * cancelled.
595
+ */
596
+ cancellation?: Shared.Cancellation;
597
+
598
+ /**
599
+ * An optional string describing this resource. Will be visible in the API and the
600
+ * dashboard.
601
+ */
602
+ description?: string;
603
+
604
+ /**
605
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
606
+ */
607
+ imbDate?: string;
608
+
609
+ /**
610
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
611
+ * US-printed and US-destined orders. This is the most detailed way to track
612
+ * non-express/certified orders.
613
+ */
614
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
615
+
616
+ /**
617
+ * The most recent ZIP code of the USPS facility that the order has been processed
618
+ * through. Only populated when an `imbStatus` is present.
619
+ */
620
+ imbZIPCode?: string;
621
+
622
+ /**
623
+ * These will be merged with the variables in the template or HTML you create this
624
+ * order with. The keys in this object should match the variable names in the
625
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
626
+ * PDFs uploaded with the order.
627
+ */
628
+ mergeVariables?: Record<string, unknown>;
629
+
630
+ /**
631
+ * See the section on Metadata.
632
+ */
633
+ metadata?: Record<string, unknown>;
634
+
635
+ /**
636
+ * The tracking number of this order. Populated after an express/certified order
637
+ * has been processed for delivery.
638
+ */
639
+ trackingNumber?: string;
640
+
641
+ /**
642
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
643
+ * ensure that the order is correct before it is sent out because it shows what
644
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
645
+ * this field will be returned by all `GET` endpoints which produce this order.
646
+ *
647
+ * This URL is a signed link to the PDF preview. It will expire after a short
648
+ * period of time. If you need to access this URL after it has expired, you can
649
+ * regenerate it by calling the `GET` endpoint again.
650
+ */
651
+ url?: string;
652
+ }
653
+
654
+ export type SelfMailerCreateParams =
655
+ | SelfMailerCreateParams.SelfMailerCreateWithHTML
656
+ | SelfMailerCreateParams.SelfMailerCreateWithTemplate
657
+ | SelfMailerCreateParams.SelfMailerCreateWithPdfurl
658
+ | SelfMailerCreateParams.SelfMailerCreateWithPdfFile;
659
+
660
+ export declare namespace SelfMailerCreateParams {
661
+ export interface SelfMailerCreateWithHTML {
662
+ /**
663
+ * The contact information of the sender. You can pass contact information inline
664
+ * here just like you can for the `to`.
665
+ */
666
+ from: Shared.ContactCreateWithFirstName | Shared.ContactCreateWithCompanyName | string;
667
+
668
+ /**
669
+ * The HTML content for the inside of the self-mailer. You can supply _either_ this
670
+ * or `insideTemplate` but not both.
671
+ */
672
+ insideHTML: string;
673
+
674
+ /**
675
+ * The HTML content for the outside of the self-mailer. You can supply _either_
676
+ * this or `outsideTemplate` but not both.
677
+ */
678
+ outsideHTML: string;
679
+
680
+ /**
681
+ * Enum representing the supported self-mailer sizes.
682
+ */
683
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
684
+
685
+ /**
686
+ * The recipient of this order. You can either supply the contact information
687
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
688
+ * contacts regardless of whether you provide the information inline here or call
689
+ * the contact creation endpoint.
690
+ */
691
+ to: Shared.ContactCreateWithFirstName | Shared.ContactCreateWithCompanyName | string;
692
+
693
+ /**
694
+ * An optional string describing this resource. Will be visible in the API and the
695
+ * dashboard.
696
+ */
697
+ description?: string;
698
+
699
+ /**
700
+ * The mailing class of this order. If not provided, automatically set to
701
+ * `first_class`.
702
+ */
703
+ mailingClass?:
704
+ | 'first_class'
705
+ | 'standard_class'
706
+ | 'express'
707
+ | 'certified'
708
+ | 'certified_return_receipt'
709
+ | 'registered'
710
+ | 'usps_first_class'
711
+ | 'usps_standard_class'
712
+ | 'usps_eddm'
713
+ | 'usps_express_2_day'
714
+ | 'usps_express_3_day'
715
+ | 'usps_first_class_certified'
716
+ | 'usps_first_class_certified_return_receipt'
717
+ | 'usps_first_class_registered'
718
+ | 'usps_express_3_day_signature_confirmation'
719
+ | 'usps_express_3_day_certified'
720
+ | 'usps_express_3_day_certified_return_receipt'
721
+ | 'ca_post_lettermail'
722
+ | 'ca_post_personalized'
723
+ | 'ca_post_neighbourhood_mail'
724
+ | 'ups_express_overnight'
725
+ | 'ups_express_2_day'
726
+ | 'ups_express_3_day'
727
+ | 'royal_mail_first_class'
728
+ | 'royal_mail_second_class'
729
+ | 'au_post_second_class';
730
+
731
+ /**
732
+ * These will be merged with the variables in the template or HTML you create this
733
+ * order with. The keys in this object should match the variable names in the
734
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
735
+ * PDFs uploaded with the order.
736
+ */
737
+ mergeVariables?: Record<string, unknown>;
738
+
739
+ /**
740
+ * See the section on Metadata.
741
+ */
742
+ metadata?: Record<string, unknown>;
743
+
744
+ /**
745
+ * This order will transition from `ready` to `printing` on the day after this
746
+ * date. You can use this parameter to schedule orders for a future date.
747
+ */
748
+ sendDate?: string;
749
+ }
750
+
751
+ export interface SelfMailerCreateWithTemplate {
752
+ /**
753
+ * The template ID for the inside of the self-mailer. You can supply _either_ this
754
+ * or `insideHTML` but not both.
755
+ */
756
+ insideTemplate: string;
757
+
758
+ /**
759
+ * The template ID for the outside of the self-mailer. You can supply _either_ this
760
+ * or `outsideHTML` but not both.
761
+ */
762
+ outsideTemplate: string;
763
+ }
764
+
765
+ export interface SelfMailerCreateWithPdfurl {
766
+ /**
767
+ * The contact information of the sender. You can pass contact information inline
768
+ * here just like you can for the `to`.
769
+ */
770
+ from: Shared.ContactCreateWithFirstName | Shared.ContactCreateWithCompanyName | string;
771
+
772
+ /**
773
+ * A URL pointing to a 2 page PDF file. The first page is the inside of the
774
+ * self-mailer and the second page is the outside (where the address will be
775
+ * stamped on).
776
+ */
777
+ pdf: string;
778
+
779
+ /**
780
+ * Enum representing the supported self-mailer sizes.
781
+ */
782
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
783
+
784
+ /**
785
+ * The recipient of this order. You can either supply the contact information
786
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
787
+ * contacts regardless of whether you provide the information inline here or call
788
+ * the contact creation endpoint.
789
+ */
790
+ to: Shared.ContactCreateWithFirstName | Shared.ContactCreateWithCompanyName | string;
791
+
792
+ /**
793
+ * An optional string describing this resource. Will be visible in the API and the
794
+ * dashboard.
795
+ */
796
+ description?: string;
797
+
798
+ /**
799
+ * The mailing class of this order. If not provided, automatically set to
800
+ * `first_class`.
801
+ */
802
+ mailingClass?:
803
+ | 'first_class'
804
+ | 'standard_class'
805
+ | 'express'
806
+ | 'certified'
807
+ | 'certified_return_receipt'
808
+ | 'registered'
809
+ | 'usps_first_class'
810
+ | 'usps_standard_class'
811
+ | 'usps_eddm'
812
+ | 'usps_express_2_day'
813
+ | 'usps_express_3_day'
814
+ | 'usps_first_class_certified'
815
+ | 'usps_first_class_certified_return_receipt'
816
+ | 'usps_first_class_registered'
817
+ | 'usps_express_3_day_signature_confirmation'
818
+ | 'usps_express_3_day_certified'
819
+ | 'usps_express_3_day_certified_return_receipt'
820
+ | 'ca_post_lettermail'
821
+ | 'ca_post_personalized'
822
+ | 'ca_post_neighbourhood_mail'
823
+ | 'ups_express_overnight'
824
+ | 'ups_express_2_day'
825
+ | 'ups_express_3_day'
826
+ | 'royal_mail_first_class'
827
+ | 'royal_mail_second_class'
828
+ | 'au_post_second_class';
829
+
830
+ /**
831
+ * These will be merged with the variables in the template or HTML you create this
832
+ * order with. The keys in this object should match the variable names in the
833
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
834
+ * PDFs uploaded with the order.
835
+ */
836
+ mergeVariables?: Record<string, unknown>;
837
+
838
+ /**
839
+ * See the section on Metadata.
840
+ */
841
+ metadata?: Record<string, unknown>;
842
+
843
+ /**
844
+ * This order will transition from `ready` to `printing` on the day after this
845
+ * date. You can use this parameter to schedule orders for a future date.
846
+ */
847
+ sendDate?: string;
848
+ }
849
+
850
+ export interface SelfMailerCreateWithPdfFile {
851
+ /**
852
+ * The contact information of the sender. You can pass contact information inline
853
+ * here just like you can for the `to`.
854
+ */
855
+ from: Shared.ContactCreateWithFirstName | Shared.ContactCreateWithCompanyName | string;
856
+
857
+ /**
858
+ * A 2 page PDF file. The first page is the inside of the self-mailer and the
859
+ * second page is the outside (where the address will be stamped on).
860
+ */
861
+ pdf: string;
862
+
863
+ /**
864
+ * Enum representing the supported self-mailer sizes.
865
+ */
866
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
867
+
868
+ /**
869
+ * The recipient of this order. You can either supply the contact information
870
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
871
+ * contacts regardless of whether you provide the information inline here or call
872
+ * the contact creation endpoint.
873
+ */
874
+ to: Shared.ContactCreateWithFirstName | Shared.ContactCreateWithCompanyName | string;
875
+
876
+ /**
877
+ * An optional string describing this resource. Will be visible in the API and the
878
+ * dashboard.
879
+ */
880
+ description?: string;
881
+
882
+ /**
883
+ * The mailing class of this order. If not provided, automatically set to
884
+ * `first_class`.
885
+ */
886
+ mailingClass?:
887
+ | 'first_class'
888
+ | 'standard_class'
889
+ | 'express'
890
+ | 'certified'
891
+ | 'certified_return_receipt'
892
+ | 'registered'
893
+ | 'usps_first_class'
894
+ | 'usps_standard_class'
895
+ | 'usps_eddm'
896
+ | 'usps_express_2_day'
897
+ | 'usps_express_3_day'
898
+ | 'usps_first_class_certified'
899
+ | 'usps_first_class_certified_return_receipt'
900
+ | 'usps_first_class_registered'
901
+ | 'usps_express_3_day_signature_confirmation'
902
+ | 'usps_express_3_day_certified'
903
+ | 'usps_express_3_day_certified_return_receipt'
904
+ | 'ca_post_lettermail'
905
+ | 'ca_post_personalized'
906
+ | 'ca_post_neighbourhood_mail'
907
+ | 'ups_express_overnight'
908
+ | 'ups_express_2_day'
909
+ | 'ups_express_3_day'
910
+ | 'royal_mail_first_class'
911
+ | 'royal_mail_second_class'
912
+ | 'au_post_second_class';
913
+
914
+ /**
915
+ * These will be merged with the variables in the template or HTML you create this
916
+ * order with. The keys in this object should match the variable names in the
917
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
918
+ * PDFs uploaded with the order.
919
+ */
920
+ mergeVariables?: Record<string, unknown>;
921
+
922
+ /**
923
+ * See the section on Metadata.
924
+ */
925
+ metadata?: Record<string, unknown>;
926
+
927
+ /**
928
+ * This order will transition from `ready` to `printing` on the day after this
929
+ * date. You can use this parameter to schedule orders for a future date.
930
+ */
931
+ sendDate?: string;
932
+ }
933
+ }
934
+
935
+ export interface SelfMailerListParams extends ListParams {
936
+ /**
937
+ * You can supply any string to help narrow down the list of resources. For
938
+ * example, if you pass `"New York"` (quoted), it will return resources that have
939
+ * that string present somewhere in their response. Alternatively, you can supply a
940
+ * structured search query. See the documentation on `StructuredSearchQuery` for
941
+ * more details.
942
+ */
943
+ search?: string;
944
+ }
945
+
946
+ SelfMailers.SelfMailerListResponsesList = SelfMailerListResponsesList;
947
+
948
+ export declare namespace SelfMailers {
949
+ export {
950
+ type SelfMailerCreateResponse as SelfMailerCreateResponse,
951
+ type SelfMailerRetrieveResponse as SelfMailerRetrieveResponse,
952
+ type SelfMailerListResponse as SelfMailerListResponse,
953
+ type SelfMailerCancelResponse as SelfMailerCancelResponse,
954
+ SelfMailerListResponsesList as SelfMailerListResponsesList,
955
+ type SelfMailerCreateParams as SelfMailerCreateParams,
956
+ type SelfMailerListParams as SelfMailerListParams,
957
+ };
958
+ }