postgrid-node 0.4.2 → 0.5.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 (101) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/client.d.mts +5 -5
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +5 -5
  7. package/client.d.ts.map +1 -1
  8. package/client.js +5 -5
  9. package/client.js.map +1 -1
  10. package/client.mjs +5 -5
  11. package/client.mjs.map +1 -1
  12. package/package.json +3 -3
  13. package/resources/print-mail/cheques.d.mts +25 -6
  14. package/resources/print-mail/cheques.d.mts.map +1 -1
  15. package/resources/print-mail/cheques.d.ts +25 -6
  16. package/resources/print-mail/cheques.d.ts.map +1 -1
  17. package/resources/print-mail/cheques.js.map +1 -1
  18. package/resources/print-mail/cheques.mjs.map +1 -1
  19. package/resources/print-mail/index.d.mts +0 -1
  20. package/resources/print-mail/index.d.mts.map +1 -1
  21. package/resources/print-mail/index.d.ts +0 -1
  22. package/resources/print-mail/index.d.ts.map +1 -1
  23. package/resources/print-mail/index.js +1 -3
  24. package/resources/print-mail/index.js.map +1 -1
  25. package/resources/print-mail/index.mjs +0 -1
  26. package/resources/print-mail/index.mjs.map +1 -1
  27. package/resources/print-mail/letters.d.mts +26 -7
  28. package/resources/print-mail/letters.d.mts.map +1 -1
  29. package/resources/print-mail/letters.d.ts +26 -7
  30. package/resources/print-mail/letters.d.ts.map +1 -1
  31. package/resources/print-mail/letters.js.map +1 -1
  32. package/resources/print-mail/letters.mjs.map +1 -1
  33. package/resources/print-mail/order-profiles/cheques.d.mts +4 -5
  34. package/resources/print-mail/order-profiles/cheques.d.mts.map +1 -1
  35. package/resources/print-mail/order-profiles/cheques.d.ts +4 -5
  36. package/resources/print-mail/order-profiles/cheques.d.ts.map +1 -1
  37. package/resources/print-mail/order-profiles/cheques.js.map +1 -1
  38. package/resources/print-mail/order-profiles/cheques.mjs.map +1 -1
  39. package/resources/print-mail/order-profiles/letters.d.mts +3 -4
  40. package/resources/print-mail/order-profiles/letters.d.mts.map +1 -1
  41. package/resources/print-mail/order-profiles/letters.d.ts +3 -4
  42. package/resources/print-mail/order-profiles/letters.d.ts.map +1 -1
  43. package/resources/print-mail/order-profiles/letters.js.map +1 -1
  44. package/resources/print-mail/order-profiles/letters.mjs.map +1 -1
  45. package/resources/print-mail/order-profiles/postcards.d.mts +3 -4
  46. package/resources/print-mail/order-profiles/postcards.d.mts.map +1 -1
  47. package/resources/print-mail/order-profiles/postcards.d.ts +3 -4
  48. package/resources/print-mail/order-profiles/postcards.d.ts.map +1 -1
  49. package/resources/print-mail/order-profiles/postcards.js.map +1 -1
  50. package/resources/print-mail/order-profiles/postcards.mjs.map +1 -1
  51. package/resources/print-mail/order-profiles/self-mailers.d.mts +3 -4
  52. package/resources/print-mail/order-profiles/self-mailers.d.mts.map +1 -1
  53. package/resources/print-mail/order-profiles/self-mailers.d.ts +3 -4
  54. package/resources/print-mail/order-profiles/self-mailers.d.ts.map +1 -1
  55. package/resources/print-mail/order-profiles/self-mailers.js.map +1 -1
  56. package/resources/print-mail/order-profiles/self-mailers.mjs.map +1 -1
  57. package/resources/print-mail/postcards.d.mts +27 -8
  58. package/resources/print-mail/postcards.d.mts.map +1 -1
  59. package/resources/print-mail/postcards.d.ts +27 -8
  60. package/resources/print-mail/postcards.d.ts.map +1 -1
  61. package/resources/print-mail/postcards.js.map +1 -1
  62. package/resources/print-mail/postcards.mjs.map +1 -1
  63. package/resources/print-mail/print-mail.d.mts +0 -4
  64. package/resources/print-mail/print-mail.d.mts.map +1 -1
  65. package/resources/print-mail/print-mail.d.ts +0 -4
  66. package/resources/print-mail/print-mail.d.ts.map +1 -1
  67. package/resources/print-mail/print-mail.js +0 -4
  68. package/resources/print-mail/print-mail.js.map +1 -1
  69. package/resources/print-mail/print-mail.mjs +0 -4
  70. package/resources/print-mail/print-mail.mjs.map +1 -1
  71. package/resources/print-mail/self-mailers.d.mts +27 -8
  72. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  73. package/resources/print-mail/self-mailers.d.ts +27 -8
  74. package/resources/print-mail/self-mailers.d.ts.map +1 -1
  75. package/resources/print-mail/self-mailers.js.map +1 -1
  76. package/resources/print-mail/self-mailers.mjs.map +1 -1
  77. package/src/client.ts +7 -7
  78. package/src/resources/print-mail/cheques.ts +80 -6
  79. package/src/resources/print-mail/index.ts +0 -12
  80. package/src/resources/print-mail/letters.ts +107 -7
  81. package/src/resources/print-mail/order-profiles/cheques.ts +108 -5
  82. package/src/resources/print-mail/order-profiles/letters.ts +81 -4
  83. package/src/resources/print-mail/order-profiles/postcards.ts +81 -4
  84. package/src/resources/print-mail/order-profiles/self-mailers.ts +81 -4
  85. package/src/resources/print-mail/postcards.ts +134 -8
  86. package/src/resources/print-mail/print-mail.ts +0 -28
  87. package/src/resources/print-mail/self-mailers.ts +134 -8
  88. package/src/version.ts +1 -1
  89. package/version.d.mts +1 -1
  90. package/version.d.ts +1 -1
  91. package/version.js +1 -1
  92. package/version.mjs +1 -1
  93. package/resources/print-mail/boxes.d.mts +0 -321
  94. package/resources/print-mail/boxes.d.mts.map +0 -1
  95. package/resources/print-mail/boxes.d.ts +0 -321
  96. package/resources/print-mail/boxes.d.ts.map +0 -1
  97. package/resources/print-mail/boxes.js +0 -85
  98. package/resources/print-mail/boxes.js.map +0 -1
  99. package/resources/print-mail/boxes.mjs +0 -81
  100. package/resources/print-mail/boxes.mjs.map +0 -1
  101. package/src/resources/print-mail/boxes.ts +0 -412
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
- import * as BoxesAPI from '../boxes';
5
4
  import { APIPromise } from '../../../core/api-promise';
6
5
  import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
7
6
  import { RequestOptions } from '../../../internal/request-options';
@@ -159,7 +158,33 @@ export interface PostcardProfile {
159
158
  * Mailing class (cannot include extra services like `certified` or `registered`
160
159
  * for postcards, though).
161
160
  */
162
- mailingClass?: BoxesAPI.OrderMailingClass;
161
+ mailingClass?:
162
+ | 'first_class'
163
+ | 'standard_class'
164
+ | 'express'
165
+ | 'certified'
166
+ | 'certified_return_receipt'
167
+ | 'registered'
168
+ | 'usps_first_class'
169
+ | 'usps_standard_class'
170
+ | 'usps_eddm'
171
+ | 'usps_express_2_day'
172
+ | 'usps_express_3_day'
173
+ | 'usps_first_class_certified'
174
+ | 'usps_first_class_certified_return_receipt'
175
+ | 'usps_first_class_registered'
176
+ | 'usps_express_3_day_signature_confirmation'
177
+ | 'usps_express_3_day_certified'
178
+ | 'usps_express_3_day_certified_return_receipt'
179
+ | 'ca_post_lettermail'
180
+ | 'ca_post_personalized'
181
+ | 'ca_post_neighbourhood_mail'
182
+ | 'ups_express_overnight'
183
+ | 'ups_express_2_day'
184
+ | 'ups_express_3_day'
185
+ | 'royal_mail_first_class'
186
+ | 'royal_mail_second_class'
187
+ | 'au_post_second_class';
163
188
 
164
189
  /**
165
190
  * Default merge variables for orders created using this profile.
@@ -229,7 +254,33 @@ export interface PostcardCreateParams {
229
254
  * Body param: Mailing class (cannot include extra services like `certified` or
230
255
  * `registered` for postcards, though).
231
256
  */
232
- mailingClass?: BoxesAPI.OrderMailingClass;
257
+ mailingClass?:
258
+ | 'first_class'
259
+ | 'standard_class'
260
+ | 'express'
261
+ | 'certified'
262
+ | 'certified_return_receipt'
263
+ | 'registered'
264
+ | 'usps_first_class'
265
+ | 'usps_standard_class'
266
+ | 'usps_eddm'
267
+ | 'usps_express_2_day'
268
+ | 'usps_express_3_day'
269
+ | 'usps_first_class_certified'
270
+ | 'usps_first_class_certified_return_receipt'
271
+ | 'usps_first_class_registered'
272
+ | 'usps_express_3_day_signature_confirmation'
273
+ | 'usps_express_3_day_certified'
274
+ | 'usps_express_3_day_certified_return_receipt'
275
+ | 'ca_post_lettermail'
276
+ | 'ca_post_personalized'
277
+ | 'ca_post_neighbourhood_mail'
278
+ | 'ups_express_overnight'
279
+ | 'ups_express_2_day'
280
+ | 'ups_express_3_day'
281
+ | 'royal_mail_first_class'
282
+ | 'royal_mail_second_class'
283
+ | 'au_post_second_class';
233
284
 
234
285
  /**
235
286
  * Body param: Default merge variables for orders created using this profile.
@@ -283,7 +334,33 @@ export interface PostcardUpdateParams {
283
334
  * Body param: Mailing class (cannot include extra services like `certified` or
284
335
  * `registered` for postcards, though).
285
336
  */
286
- mailingClass?: BoxesAPI.OrderMailingClass;
337
+ mailingClass?:
338
+ | 'first_class'
339
+ | 'standard_class'
340
+ | 'express'
341
+ | 'certified'
342
+ | 'certified_return_receipt'
343
+ | 'registered'
344
+ | 'usps_first_class'
345
+ | 'usps_standard_class'
346
+ | 'usps_eddm'
347
+ | 'usps_express_2_day'
348
+ | 'usps_express_3_day'
349
+ | 'usps_first_class_certified'
350
+ | 'usps_first_class_certified_return_receipt'
351
+ | 'usps_first_class_registered'
352
+ | 'usps_express_3_day_signature_confirmation'
353
+ | 'usps_express_3_day_certified'
354
+ | 'usps_express_3_day_certified_return_receipt'
355
+ | 'ca_post_lettermail'
356
+ | 'ca_post_personalized'
357
+ | 'ca_post_neighbourhood_mail'
358
+ | 'ups_express_overnight'
359
+ | 'ups_express_2_day'
360
+ | 'ups_express_3_day'
361
+ | 'royal_mail_first_class'
362
+ | 'royal_mail_second_class'
363
+ | 'au_post_second_class';
287
364
 
288
365
  /**
289
366
  * Body param: Default merge variables for orders created using this profile.
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
- import * as BoxesAPI from '../boxes';
5
4
  import { APIPromise } from '../../../core/api-promise';
6
5
  import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
7
6
  import { RequestOptions } from '../../../internal/request-options';
@@ -162,7 +161,33 @@ export interface SelfMailerProfile {
162
161
  /**
163
162
  * Mailing class (cannot include extra services for self-mailers).
164
163
  */
165
- mailingClass?: BoxesAPI.OrderMailingClass;
164
+ mailingClass?:
165
+ | 'first_class'
166
+ | 'standard_class'
167
+ | 'express'
168
+ | 'certified'
169
+ | 'certified_return_receipt'
170
+ | 'registered'
171
+ | 'usps_first_class'
172
+ | 'usps_standard_class'
173
+ | 'usps_eddm'
174
+ | 'usps_express_2_day'
175
+ | 'usps_express_3_day'
176
+ | 'usps_first_class_certified'
177
+ | 'usps_first_class_certified_return_receipt'
178
+ | 'usps_first_class_registered'
179
+ | 'usps_express_3_day_signature_confirmation'
180
+ | 'usps_express_3_day_certified'
181
+ | 'usps_express_3_day_certified_return_receipt'
182
+ | 'ca_post_lettermail'
183
+ | 'ca_post_personalized'
184
+ | 'ca_post_neighbourhood_mail'
185
+ | 'ups_express_overnight'
186
+ | 'ups_express_2_day'
187
+ | 'ups_express_3_day'
188
+ | 'royal_mail_first_class'
189
+ | 'royal_mail_second_class'
190
+ | 'au_post_second_class';
166
191
 
167
192
  /**
168
193
  * Default merge variables for orders created using this profile.
@@ -230,7 +255,33 @@ export interface SelfMailerCreateParams {
230
255
  /**
231
256
  * Body param: Mailing class (cannot include extra services for self-mailers).
232
257
  */
233
- mailingClass?: BoxesAPI.OrderMailingClass;
258
+ mailingClass?:
259
+ | 'first_class'
260
+ | 'standard_class'
261
+ | 'express'
262
+ | 'certified'
263
+ | 'certified_return_receipt'
264
+ | 'registered'
265
+ | 'usps_first_class'
266
+ | 'usps_standard_class'
267
+ | 'usps_eddm'
268
+ | 'usps_express_2_day'
269
+ | 'usps_express_3_day'
270
+ | 'usps_first_class_certified'
271
+ | 'usps_first_class_certified_return_receipt'
272
+ | 'usps_first_class_registered'
273
+ | 'usps_express_3_day_signature_confirmation'
274
+ | 'usps_express_3_day_certified'
275
+ | 'usps_express_3_day_certified_return_receipt'
276
+ | 'ca_post_lettermail'
277
+ | 'ca_post_personalized'
278
+ | 'ca_post_neighbourhood_mail'
279
+ | 'ups_express_overnight'
280
+ | 'ups_express_2_day'
281
+ | 'ups_express_3_day'
282
+ | 'royal_mail_first_class'
283
+ | 'royal_mail_second_class'
284
+ | 'au_post_second_class';
234
285
 
235
286
  /**
236
287
  * Body param: Default merge variables for orders created using this profile.
@@ -288,7 +339,33 @@ export interface SelfMailerUpdateParams {
288
339
  /**
289
340
  * Body param: Mailing class (cannot include extra services for self-mailers).
290
341
  */
291
- mailingClass?: BoxesAPI.OrderMailingClass;
342
+ mailingClass?:
343
+ | 'first_class'
344
+ | 'standard_class'
345
+ | 'express'
346
+ | 'certified'
347
+ | 'certified_return_receipt'
348
+ | 'registered'
349
+ | 'usps_first_class'
350
+ | 'usps_standard_class'
351
+ | 'usps_eddm'
352
+ | 'usps_express_2_day'
353
+ | 'usps_express_3_day'
354
+ | 'usps_first_class_certified'
355
+ | 'usps_first_class_certified_return_receipt'
356
+ | 'usps_first_class_registered'
357
+ | 'usps_express_3_day_signature_confirmation'
358
+ | 'usps_express_3_day_certified'
359
+ | 'usps_express_3_day_certified_return_receipt'
360
+ | 'ca_post_lettermail'
361
+ | 'ca_post_personalized'
362
+ | 'ca_post_neighbourhood_mail'
363
+ | 'ups_express_overnight'
364
+ | 'ups_express_2_day'
365
+ | 'ups_express_3_day'
366
+ | 'royal_mail_first_class'
367
+ | 'royal_mail_second_class'
368
+ | 'au_post_second_class';
292
369
 
293
370
  /**
294
371
  * Body param: Default merge variables for orders created using this profile.
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as BoxesAPI from './boxes';
5
4
  import * as ContactsAPI from './contacts';
6
5
  import * as PrintMailAPI from './print-mail';
7
6
  import * as OrderProfilesPostcardsAPI from './order-profiles/postcards';
@@ -122,7 +121,33 @@ export interface Postcard {
122
121
  * The mailing class of this order. This determines the speed and cost of delivery.
123
122
  * See `OrderMailingClass` for more details.
124
123
  */
125
- mailingClass: BoxesAPI.OrderMailingClass;
124
+ mailingClass:
125
+ | 'first_class'
126
+ | 'standard_class'
127
+ | 'express'
128
+ | 'certified'
129
+ | 'certified_return_receipt'
130
+ | 'registered'
131
+ | 'usps_first_class'
132
+ | 'usps_standard_class'
133
+ | 'usps_eddm'
134
+ | 'usps_express_2_day'
135
+ | 'usps_express_3_day'
136
+ | 'usps_first_class_certified'
137
+ | 'usps_first_class_certified_return_receipt'
138
+ | 'usps_first_class_registered'
139
+ | 'usps_express_3_day_signature_confirmation'
140
+ | 'usps_express_3_day_certified'
141
+ | 'usps_express_3_day_certified_return_receipt'
142
+ | 'ca_post_lettermail'
143
+ | 'ca_post_personalized'
144
+ | 'ca_post_neighbourhood_mail'
145
+ | 'ups_express_overnight'
146
+ | 'ups_express_2_day'
147
+ | 'ups_express_3_day'
148
+ | 'royal_mail_first_class'
149
+ | 'royal_mail_second_class'
150
+ | 'au_post_second_class';
126
151
 
127
152
  /**
128
153
  * Always `postcard`.
@@ -144,7 +169,7 @@ export interface Postcard {
144
169
  /**
145
170
  * See `OrderStatus` for more details on the status of this order.
146
171
  */
147
- status: BoxesAPI.OrderStatus;
172
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
148
173
 
149
174
  /**
150
175
  * The recipient of this order. This will be provided even if you delete the
@@ -161,7 +186,7 @@ export interface Postcard {
161
186
  * The cancellation details of this order. Populated if the order has been
162
187
  * cancelled.
163
188
  */
164
- cancellation?: BoxesAPI.Cancellation;
189
+ cancellation?: Postcard.Cancellation;
165
190
 
166
191
  /**
167
192
  * An optional string describing this resource. Will be visible in the API and the
@@ -184,7 +209,7 @@ export interface Postcard {
184
209
  * US-printed and US-destined orders. This is the most detailed way to track
185
210
  * non-express/certified orders.
186
211
  */
187
- imbStatus?: BoxesAPI.OrderImbStatus;
212
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
188
213
 
189
214
  /**
190
215
  * The most recent ZIP code of the USPS facility that the order has been processed
@@ -224,6 +249,29 @@ export interface Postcard {
224
249
  url?: string;
225
250
  }
226
251
 
252
+ export namespace Postcard {
253
+ /**
254
+ * The cancellation details of this order. Populated if the order has been
255
+ * cancelled.
256
+ */
257
+ export interface Cancellation {
258
+ /**
259
+ * The reason for the cancellation.
260
+ */
261
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
262
+
263
+ /**
264
+ * The user ID who cancelled the order.
265
+ */
266
+ cancelledByUser?: string;
267
+
268
+ /**
269
+ * An optional note provided by the user who cancelled the order.
270
+ */
271
+ note?: string;
272
+ }
273
+ }
274
+
227
275
  export interface PostcardRetrieveURLResponse {
228
276
  /**
229
277
  * A unique ID prefixed with postcard\_
@@ -289,7 +337,33 @@ export declare namespace PostcardCreateParams {
289
337
  * The mailing class of this order. If not provided, automatically set to
290
338
  * `first_class`.
291
339
  */
292
- mailingClass?: BoxesAPI.OrderMailingClass;
340
+ mailingClass?:
341
+ | 'first_class'
342
+ | 'standard_class'
343
+ | 'express'
344
+ | 'certified'
345
+ | 'certified_return_receipt'
346
+ | 'registered'
347
+ | 'usps_first_class'
348
+ | 'usps_standard_class'
349
+ | 'usps_eddm'
350
+ | 'usps_express_2_day'
351
+ | 'usps_express_3_day'
352
+ | 'usps_first_class_certified'
353
+ | 'usps_first_class_certified_return_receipt'
354
+ | 'usps_first_class_registered'
355
+ | 'usps_express_3_day_signature_confirmation'
356
+ | 'usps_express_3_day_certified'
357
+ | 'usps_express_3_day_certified_return_receipt'
358
+ | 'ca_post_lettermail'
359
+ | 'ca_post_personalized'
360
+ | 'ca_post_neighbourhood_mail'
361
+ | 'ups_express_overnight'
362
+ | 'ups_express_2_day'
363
+ | 'ups_express_3_day'
364
+ | 'royal_mail_first_class'
365
+ | 'royal_mail_second_class'
366
+ | 'au_post_second_class';
293
367
 
294
368
  /**
295
369
  * These will be merged with the variables in the template or HTML you create this
@@ -362,7 +436,33 @@ export declare namespace PostcardCreateParams {
362
436
  * The mailing class of this order. If not provided, automatically set to
363
437
  * `first_class`.
364
438
  */
365
- mailingClass?: BoxesAPI.OrderMailingClass;
439
+ mailingClass?:
440
+ | 'first_class'
441
+ | 'standard_class'
442
+ | 'express'
443
+ | 'certified'
444
+ | 'certified_return_receipt'
445
+ | 'registered'
446
+ | 'usps_first_class'
447
+ | 'usps_standard_class'
448
+ | 'usps_eddm'
449
+ | 'usps_express_2_day'
450
+ | 'usps_express_3_day'
451
+ | 'usps_first_class_certified'
452
+ | 'usps_first_class_certified_return_receipt'
453
+ | 'usps_first_class_registered'
454
+ | 'usps_express_3_day_signature_confirmation'
455
+ | 'usps_express_3_day_certified'
456
+ | 'usps_express_3_day_certified_return_receipt'
457
+ | 'ca_post_lettermail'
458
+ | 'ca_post_personalized'
459
+ | 'ca_post_neighbourhood_mail'
460
+ | 'ups_express_overnight'
461
+ | 'ups_express_2_day'
462
+ | 'ups_express_3_day'
463
+ | 'royal_mail_first_class'
464
+ | 'royal_mail_second_class'
465
+ | 'au_post_second_class';
366
466
 
367
467
  /**
368
468
  * These will be merged with the variables in the template or HTML you create this
@@ -421,7 +521,33 @@ export declare namespace PostcardCreateParams {
421
521
  * The mailing class of this order. If not provided, automatically set to
422
522
  * `first_class`.
423
523
  */
424
- mailingClass?: BoxesAPI.OrderMailingClass;
524
+ mailingClass?:
525
+ | 'first_class'
526
+ | 'standard_class'
527
+ | 'express'
528
+ | 'certified'
529
+ | 'certified_return_receipt'
530
+ | 'registered'
531
+ | 'usps_first_class'
532
+ | 'usps_standard_class'
533
+ | 'usps_eddm'
534
+ | 'usps_express_2_day'
535
+ | 'usps_express_3_day'
536
+ | 'usps_first_class_certified'
537
+ | 'usps_first_class_certified_return_receipt'
538
+ | 'usps_first_class_registered'
539
+ | 'usps_express_3_day_signature_confirmation'
540
+ | 'usps_express_3_day_certified'
541
+ | 'usps_express_3_day_certified_return_receipt'
542
+ | 'ca_post_lettermail'
543
+ | 'ca_post_personalized'
544
+ | 'ca_post_neighbourhood_mail'
545
+ | 'ups_express_overnight'
546
+ | 'ups_express_2_day'
547
+ | 'ups_express_3_day'
548
+ | 'royal_mail_first_class'
549
+ | 'royal_mail_second_class'
550
+ | 'au_post_second_class';
425
551
 
426
552
  /**
427
553
  * These will be merged with the variables in the template or HTML you create this
@@ -11,19 +11,6 @@ import {
11
11
  BankAccounts,
12
12
  BankAccountsSkipLimit,
13
13
  } from './bank-accounts';
14
- import * as BoxesAPI from './boxes';
15
- import {
16
- Box,
17
- BoxChequeBase,
18
- BoxCreateParams,
19
- BoxListParams,
20
- Boxes,
21
- BoxesSkipLimit,
22
- Cancellation,
23
- OrderImbStatus,
24
- OrderMailingClass,
25
- OrderStatus,
26
- } from './boxes';
27
14
  import * as CampaignsAPI from './campaigns';
28
15
  import {
29
16
  Campaign,
@@ -149,7 +136,6 @@ import {
149
136
 
150
137
  export class PrintMail extends APIResource {
151
138
  bankAccounts: BankAccountsAPI.BankAccounts = new BankAccountsAPI.BankAccounts(this._client);
152
- boxes: BoxesAPI.Boxes = new BoxesAPI.Boxes(this._client);
153
139
  campaigns: CampaignsAPI.Campaigns = new CampaignsAPI.Campaigns(this._client);
154
140
  cheques: ChequesAPI.Cheques = new ChequesAPI.Cheques(this._client);
155
141
  contacts: ContactsAPI.Contacts = new ContactsAPI.Contacts(this._client);
@@ -333,7 +319,6 @@ export interface ContactCreateWithFirstName {
333
319
  }
334
320
 
335
321
  PrintMail.BankAccounts = BankAccounts;
336
- PrintMail.Boxes = Boxes;
337
322
  PrintMail.Campaigns = Campaigns;
338
323
  PrintMail.Cheques = Cheques;
339
324
  PrintMail.Contacts = Contacts;
@@ -363,19 +348,6 @@ export declare namespace PrintMail {
363
348
  type BankAccountListParams as BankAccountListParams,
364
349
  };
365
350
 
366
- export {
367
- Boxes as Boxes,
368
- type Box as Box,
369
- type BoxChequeBase as BoxChequeBase,
370
- type Cancellation as Cancellation,
371
- type OrderImbStatus as OrderImbStatus,
372
- type OrderMailingClass as OrderMailingClass,
373
- type OrderStatus as OrderStatus,
374
- type BoxesSkipLimit as BoxesSkipLimit,
375
- type BoxCreateParams as BoxCreateParams,
376
- type BoxListParams as BoxListParams,
377
- };
378
-
379
351
  export {
380
352
  Campaigns as Campaigns,
381
353
  type Campaign as Campaign,
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as BoxesAPI from './boxes';
5
4
  import * as ContactsAPI from './contacts';
6
5
  import * as PrintMailAPI from './print-mail';
7
6
  import * as OrderProfilesSelfMailersAPI from './order-profiles/self-mailers';
@@ -129,7 +128,33 @@ export interface SelfMailer {
129
128
  * The mailing class of this order. This determines the speed and cost of delivery.
130
129
  * See `OrderMailingClass` for more details.
131
130
  */
132
- mailingClass: BoxesAPI.OrderMailingClass;
131
+ mailingClass:
132
+ | 'first_class'
133
+ | 'standard_class'
134
+ | 'express'
135
+ | 'certified'
136
+ | 'certified_return_receipt'
137
+ | 'registered'
138
+ | 'usps_first_class'
139
+ | 'usps_standard_class'
140
+ | 'usps_eddm'
141
+ | 'usps_express_2_day'
142
+ | 'usps_express_3_day'
143
+ | 'usps_first_class_certified'
144
+ | 'usps_first_class_certified_return_receipt'
145
+ | 'usps_first_class_registered'
146
+ | 'usps_express_3_day_signature_confirmation'
147
+ | 'usps_express_3_day_certified'
148
+ | 'usps_express_3_day_certified_return_receipt'
149
+ | 'ca_post_lettermail'
150
+ | 'ca_post_personalized'
151
+ | 'ca_post_neighbourhood_mail'
152
+ | 'ups_express_overnight'
153
+ | 'ups_express_2_day'
154
+ | 'ups_express_3_day'
155
+ | 'royal_mail_first_class'
156
+ | 'royal_mail_second_class'
157
+ | 'au_post_second_class';
133
158
 
134
159
  /**
135
160
  * Always `self_mailer`.
@@ -151,7 +176,7 @@ export interface SelfMailer {
151
176
  /**
152
177
  * See `OrderStatus` for more details on the status of this order.
153
178
  */
154
- status: BoxesAPI.OrderStatus;
179
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
155
180
 
156
181
  /**
157
182
  * The recipient of this order. This will be provided even if you delete the
@@ -168,7 +193,7 @@ export interface SelfMailer {
168
193
  * The cancellation details of this order. Populated if the order has been
169
194
  * cancelled.
170
195
  */
171
- cancellation?: BoxesAPI.Cancellation;
196
+ cancellation?: SelfMailer.Cancellation;
172
197
 
173
198
  /**
174
199
  * An optional string describing this resource. Will be visible in the API and the
@@ -186,7 +211,7 @@ export interface SelfMailer {
186
211
  * US-printed and US-destined orders. This is the most detailed way to track
187
212
  * non-express/certified orders.
188
213
  */
189
- imbStatus?: BoxesAPI.OrderImbStatus;
214
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
190
215
 
191
216
  /**
192
217
  * The most recent ZIP code of the USPS facility that the order has been processed
@@ -226,6 +251,29 @@ export interface SelfMailer {
226
251
  url?: string;
227
252
  }
228
253
 
254
+ export namespace SelfMailer {
255
+ /**
256
+ * The cancellation details of this order. Populated if the order has been
257
+ * cancelled.
258
+ */
259
+ export interface Cancellation {
260
+ /**
261
+ * The reason for the cancellation.
262
+ */
263
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
264
+
265
+ /**
266
+ * The user ID who cancelled the order.
267
+ */
268
+ cancelledByUser?: string;
269
+
270
+ /**
271
+ * An optional note provided by the user who cancelled the order.
272
+ */
273
+ note?: string;
274
+ }
275
+ }
276
+
229
277
  export interface SelfMailerRetrieveURLResponse {
230
278
  /**
231
279
  * A unique ID prefixed with self*mailer*
@@ -290,7 +338,33 @@ export declare namespace SelfMailerCreateParams {
290
338
  * The mailing class of this order. If not provided, automatically set to
291
339
  * `first_class`.
292
340
  */
293
- mailingClass?: BoxesAPI.OrderMailingClass;
341
+ mailingClass?:
342
+ | 'first_class'
343
+ | 'standard_class'
344
+ | 'express'
345
+ | 'certified'
346
+ | 'certified_return_receipt'
347
+ | 'registered'
348
+ | 'usps_first_class'
349
+ | 'usps_standard_class'
350
+ | 'usps_eddm'
351
+ | 'usps_express_2_day'
352
+ | 'usps_express_3_day'
353
+ | 'usps_first_class_certified'
354
+ | 'usps_first_class_certified_return_receipt'
355
+ | 'usps_first_class_registered'
356
+ | 'usps_express_3_day_signature_confirmation'
357
+ | 'usps_express_3_day_certified'
358
+ | 'usps_express_3_day_certified_return_receipt'
359
+ | 'ca_post_lettermail'
360
+ | 'ca_post_personalized'
361
+ | 'ca_post_neighbourhood_mail'
362
+ | 'ups_express_overnight'
363
+ | 'ups_express_2_day'
364
+ | 'ups_express_3_day'
365
+ | 'royal_mail_first_class'
366
+ | 'royal_mail_second_class'
367
+ | 'au_post_second_class';
294
368
 
295
369
  /**
296
370
  * These will be merged with the variables in the template or HTML you create this
@@ -363,7 +437,33 @@ export declare namespace SelfMailerCreateParams {
363
437
  * The mailing class of this order. If not provided, automatically set to
364
438
  * `first_class`.
365
439
  */
366
- mailingClass?: BoxesAPI.OrderMailingClass;
440
+ mailingClass?:
441
+ | 'first_class'
442
+ | 'standard_class'
443
+ | 'express'
444
+ | 'certified'
445
+ | 'certified_return_receipt'
446
+ | 'registered'
447
+ | 'usps_first_class'
448
+ | 'usps_standard_class'
449
+ | 'usps_eddm'
450
+ | 'usps_express_2_day'
451
+ | 'usps_express_3_day'
452
+ | 'usps_first_class_certified'
453
+ | 'usps_first_class_certified_return_receipt'
454
+ | 'usps_first_class_registered'
455
+ | 'usps_express_3_day_signature_confirmation'
456
+ | 'usps_express_3_day_certified'
457
+ | 'usps_express_3_day_certified_return_receipt'
458
+ | 'ca_post_lettermail'
459
+ | 'ca_post_personalized'
460
+ | 'ca_post_neighbourhood_mail'
461
+ | 'ups_express_overnight'
462
+ | 'ups_express_2_day'
463
+ | 'ups_express_3_day'
464
+ | 'royal_mail_first_class'
465
+ | 'royal_mail_second_class'
466
+ | 'au_post_second_class';
367
467
 
368
468
  /**
369
469
  * These will be merged with the variables in the template or HTML you create this
@@ -421,7 +521,33 @@ export declare namespace SelfMailerCreateParams {
421
521
  * The mailing class of this order. If not provided, automatically set to
422
522
  * `first_class`.
423
523
  */
424
- mailingClass?: BoxesAPI.OrderMailingClass;
524
+ mailingClass?:
525
+ | 'first_class'
526
+ | 'standard_class'
527
+ | 'express'
528
+ | 'certified'
529
+ | 'certified_return_receipt'
530
+ | 'registered'
531
+ | 'usps_first_class'
532
+ | 'usps_standard_class'
533
+ | 'usps_eddm'
534
+ | 'usps_express_2_day'
535
+ | 'usps_express_3_day'
536
+ | 'usps_first_class_certified'
537
+ | 'usps_first_class_certified_return_receipt'
538
+ | 'usps_first_class_registered'
539
+ | 'usps_express_3_day_signature_confirmation'
540
+ | 'usps_express_3_day_certified'
541
+ | 'usps_express_3_day_certified_return_receipt'
542
+ | 'ca_post_lettermail'
543
+ | 'ca_post_personalized'
544
+ | 'ca_post_neighbourhood_mail'
545
+ | 'ups_express_overnight'
546
+ | 'ups_express_2_day'
547
+ | 'ups_express_3_day'
548
+ | 'royal_mail_first_class'
549
+ | 'royal_mail_second_class'
550
+ | 'au_post_second_class';
425
551
 
426
552
  /**
427
553
  * These will be merged with the variables in the template or HTML you create this
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.4.2'; // x-release-please-version
1
+ export const VERSION = '0.5.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.4.2";
1
+ export declare const VERSION = "0.5.0";
2
2
  //# sourceMappingURL=version.d.mts.map