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 +1 @@
1
- {"version":3,"file":"self-mailers.d.ts","sourceRoot":"","sources":["../../src/resources/print-mail/self-mailers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,KAAK,2BAA2B;OAChC,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;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BAA+B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAU,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -63,7 +63,7 @@ export interface ClientOptions {
63
63
  /**
64
64
  * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
65
65
  *
66
- * Defaults to process.env['POST_GRID_BASE_URL'].
66
+ * Defaults to process.env['POSTGRID_BASE_URL'].
67
67
  */
68
68
  baseURL?: string | null | undefined;
69
69
 
@@ -117,7 +117,7 @@ export interface ClientOptions {
117
117
  /**
118
118
  * Set the log level.
119
119
  *
120
- * Defaults to process.env['POST_GRID_LOG'] or 'warn' if it isn't set.
120
+ * Defaults to process.env['POSTGRID_LOG'] or 'warn' if it isn't set.
121
121
  */
122
122
  logLevel?: LogLevel | undefined;
123
123
 
@@ -130,7 +130,7 @@ export interface ClientOptions {
130
130
  }
131
131
 
132
132
  /**
133
- * API Client for interfacing with the Post Grid API.
133
+ * API Client for interfacing with the PostGrid API.
134
134
  */
135
135
  export class PostGrid {
136
136
  addressVerificationAPIKey: string | null;
@@ -149,11 +149,11 @@ export class PostGrid {
149
149
  private _options: ClientOptions;
150
150
 
151
151
  /**
152
- * API Client for interfacing with the Post Grid API.
152
+ * API Client for interfacing with the PostGrid API.
153
153
  *
154
154
  * @param {string | null | undefined} [opts.addressVerificationAPIKey=process.env['POSTGRID_ADDRESS_VERIFICATION_API_KEY'] ?? null]
155
155
  * @param {string | null | undefined} [opts.printMailAPIKey=process.env['POSTGRID_PRINT_MAIL_API_KEY'] ?? null]
156
- * @param {string} [opts.baseURL=process.env['POST_GRID_BASE_URL'] ?? https://api.postgrid.com] - Override the default base URL for the API.
156
+ * @param {string} [opts.baseURL=process.env['POSTGRID_BASE_URL'] ?? https://api.postgrid.com] - Override the default base URL for the API.
157
157
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
158
158
  * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
159
159
  * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -162,7 +162,7 @@ export class PostGrid {
162
162
  * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
163
163
  */
164
164
  constructor({
165
- baseURL = readEnv('POST_GRID_BASE_URL'),
165
+ baseURL = readEnv('POSTGRID_BASE_URL'),
166
166
  addressVerificationAPIKey = readEnv('POSTGRID_ADDRESS_VERIFICATION_API_KEY') ?? null,
167
167
  printMailAPIKey = readEnv('POSTGRID_PRINT_MAIL_API_KEY') ?? null,
168
168
  ...opts
@@ -182,7 +182,7 @@ export class PostGrid {
182
182
  this.logLevel = defaultLogLevel;
183
183
  this.logLevel =
184
184
  parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ??
185
- parseLogLevel(readEnv('POST_GRID_LOG'), "process.env['POST_GRID_LOG']", this) ??
185
+ parseLogLevel(readEnv('POSTGRID_LOG'), "process.env['POSTGRID_LOG']", this) ??
186
186
  defaultLogLevel;
187
187
  this.fetchOptions = options.fetchOptions;
188
188
  this.maxRetries = options.maxRetries ?? 2;
@@ -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 { APIPromise } from '../../core/api-promise';
@@ -178,7 +177,33 @@ export interface Cheque {
178
177
  * The mailing class of this order. This determines the speed and cost of delivery.
179
178
  * See `OrderMailingClass` for more details.
180
179
  */
181
- mailingClass: BoxesAPI.OrderMailingClass;
180
+ mailingClass:
181
+ | 'first_class'
182
+ | 'standard_class'
183
+ | 'express'
184
+ | 'certified'
185
+ | 'certified_return_receipt'
186
+ | 'registered'
187
+ | 'usps_first_class'
188
+ | 'usps_standard_class'
189
+ | 'usps_eddm'
190
+ | 'usps_express_2_day'
191
+ | 'usps_express_3_day'
192
+ | 'usps_first_class_certified'
193
+ | 'usps_first_class_certified_return_receipt'
194
+ | 'usps_first_class_registered'
195
+ | 'usps_express_3_day_signature_confirmation'
196
+ | 'usps_express_3_day_certified'
197
+ | 'usps_express_3_day_certified_return_receipt'
198
+ | 'ca_post_lettermail'
199
+ | 'ca_post_personalized'
200
+ | 'ca_post_neighbourhood_mail'
201
+ | 'ups_express_overnight'
202
+ | 'ups_express_2_day'
203
+ | 'ups_express_3_day'
204
+ | 'royal_mail_first_class'
205
+ | 'royal_mail_second_class'
206
+ | 'au_post_second_class';
182
207
 
183
208
  /**
184
209
  * Always `cheque`.
@@ -200,7 +225,7 @@ export interface Cheque {
200
225
  /**
201
226
  * See `OrderStatus` for more details on the status of this order.
202
227
  */
203
- status: BoxesAPI.OrderStatus;
228
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
204
229
 
205
230
  /**
206
231
  * The recipient of this order. This will be provided even if you delete the
@@ -217,7 +242,7 @@ export interface Cheque {
217
242
  * The cancellation details of this order. Populated if the order has been
218
243
  * cancelled.
219
244
  */
220
- cancellation?: BoxesAPI.Cancellation;
245
+ cancellation?: Cheque.Cancellation;
221
246
 
222
247
  /**
223
248
  * A link to the deposit-ready PDF for a digital-only cheque, returned if requested
@@ -253,7 +278,7 @@ export interface Cheque {
253
278
  * US-printed and US-destined orders. This is the most detailed way to track
254
279
  * non-express/certified orders.
255
280
  */
256
- imbStatus?: BoxesAPI.OrderImbStatus;
281
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
257
282
 
258
283
  /**
259
284
  * The most recent ZIP code of the USPS facility that the order has been processed
@@ -317,6 +342,29 @@ export interface Cheque {
317
342
  url?: string;
318
343
  }
319
344
 
345
+ export namespace Cheque {
346
+ /**
347
+ * The cancellation details of this order. Populated if the order has been
348
+ * cancelled.
349
+ */
350
+ export interface Cancellation {
351
+ /**
352
+ * The reason for the cancellation.
353
+ */
354
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
355
+
356
+ /**
357
+ * The user ID who cancelled the order.
358
+ */
359
+ cancelledByUser?: string;
360
+
361
+ /**
362
+ * An optional note provided by the user who cancelled the order.
363
+ */
364
+ note?: string;
365
+ }
366
+ }
367
+
320
368
  /**
321
369
  * Enum representing the supported cheque sizes.
322
370
  */
@@ -406,7 +454,33 @@ export interface ChequeCreateParams {
406
454
  * The mailing class of this order. If not provided, automatically set to
407
455
  * `first_class`.
408
456
  */
409
- mailingClass?: BoxesAPI.OrderMailingClass;
457
+ mailingClass?:
458
+ | 'first_class'
459
+ | 'standard_class'
460
+ | 'express'
461
+ | 'certified'
462
+ | 'certified_return_receipt'
463
+ | 'registered'
464
+ | 'usps_first_class'
465
+ | 'usps_standard_class'
466
+ | 'usps_eddm'
467
+ | 'usps_express_2_day'
468
+ | 'usps_express_3_day'
469
+ | 'usps_first_class_certified'
470
+ | 'usps_first_class_certified_return_receipt'
471
+ | 'usps_first_class_registered'
472
+ | 'usps_express_3_day_signature_confirmation'
473
+ | 'usps_express_3_day_certified'
474
+ | 'usps_express_3_day_certified_return_receipt'
475
+ | 'ca_post_lettermail'
476
+ | 'ca_post_personalized'
477
+ | 'ca_post_neighbourhood_mail'
478
+ | 'ups_express_overnight'
479
+ | 'ups_express_2_day'
480
+ | 'ups_express_3_day'
481
+ | 'royal_mail_first_class'
482
+ | 'royal_mail_second_class'
483
+ | 'au_post_second_class';
410
484
 
411
485
  /**
412
486
  * The memo of the cheque.
@@ -9,18 +9,6 @@ export {
9
9
  type BankAccountListParams,
10
10
  type BankAccountsSkipLimit,
11
11
  } from './bank-accounts';
12
- export {
13
- Boxes,
14
- type Box,
15
- type BoxChequeBase,
16
- type Cancellation,
17
- type OrderImbStatus,
18
- type OrderMailingClass,
19
- type OrderStatus,
20
- type BoxCreateParams,
21
- type BoxListParams,
22
- type BoxesSkipLimit,
23
- } from './boxes';
24
12
  export {
25
13
  Campaigns,
26
14
  type 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 { APIPromise } from '../../core/api-promise';
@@ -162,7 +161,33 @@ export interface Letter {
162
161
  * The mailing class of this order. This determines the speed and cost of delivery.
163
162
  * See `OrderMailingClass` for more details.
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
  * Always `letter`.
@@ -184,7 +209,7 @@ export interface Letter {
184
209
  /**
185
210
  * See `OrderStatus` for more details on the status of this order.
186
211
  */
187
- status: BoxesAPI.OrderStatus;
212
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
188
213
 
189
214
  /**
190
215
  * The recipient of this order. This will be provided even if you delete the
@@ -206,7 +231,7 @@ export interface Letter {
206
231
  * The cancellation details of this order. Populated if the order has been
207
232
  * cancelled.
208
233
  */
209
- cancellation?: BoxesAPI.Cancellation;
234
+ cancellation?: Letter.Cancellation;
210
235
 
211
236
  /**
212
237
  * An optional string describing this resource. Will be visible in the API and the
@@ -230,7 +255,7 @@ export interface Letter {
230
255
  * US-printed and US-destined orders. This is the most detailed way to track
231
256
  * non-express/certified orders.
232
257
  */
233
- imbStatus?: BoxesAPI.OrderImbStatus;
258
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
234
259
 
235
260
  /**
236
261
  * The most recent ZIP code of the USPS facility that the order has been processed
@@ -303,6 +328,29 @@ export interface Letter {
303
328
  url?: string;
304
329
  }
305
330
 
331
+ export namespace Letter {
332
+ /**
333
+ * The cancellation details of this order. Populated if the order has been
334
+ * cancelled.
335
+ */
336
+ export interface Cancellation {
337
+ /**
338
+ * The reason for the cancellation.
339
+ */
340
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
341
+
342
+ /**
343
+ * The user ID who cancelled the order.
344
+ */
345
+ cancelledByUser?: string;
346
+
347
+ /**
348
+ * An optional note provided by the user who cancelled the order.
349
+ */
350
+ note?: string;
351
+ }
352
+ }
353
+
306
354
  /**
307
355
  * Enum representing the supported letter sizes.
308
356
  */
@@ -461,7 +509,33 @@ export declare namespace LetterCreateParams {
461
509
  * The mailing class of this order. If not provided, automatically set to
462
510
  * `first_class`.
463
511
  */
464
- mailingClass?: BoxesAPI.OrderMailingClass;
512
+ mailingClass?:
513
+ | 'first_class'
514
+ | 'standard_class'
515
+ | 'express'
516
+ | 'certified'
517
+ | 'certified_return_receipt'
518
+ | 'registered'
519
+ | 'usps_first_class'
520
+ | 'usps_standard_class'
521
+ | 'usps_eddm'
522
+ | 'usps_express_2_day'
523
+ | 'usps_express_3_day'
524
+ | 'usps_first_class_certified'
525
+ | 'usps_first_class_certified_return_receipt'
526
+ | 'usps_first_class_registered'
527
+ | 'usps_express_3_day_signature_confirmation'
528
+ | 'usps_express_3_day_certified'
529
+ | 'usps_express_3_day_certified_return_receipt'
530
+ | 'ca_post_lettermail'
531
+ | 'ca_post_personalized'
532
+ | 'ca_post_neighbourhood_mail'
533
+ | 'ups_express_overnight'
534
+ | 'ups_express_2_day'
535
+ | 'ups_express_3_day'
536
+ | 'royal_mail_first_class'
537
+ | 'royal_mail_second_class'
538
+ | 'au_post_second_class';
465
539
 
466
540
  /**
467
541
  * These will be merged with the variables in the template or HTML you create this
@@ -568,7 +642,33 @@ export declare namespace LetterCreateParams {
568
642
  * The mailing class of this order. If not provided, automatically set to
569
643
  * `first_class`.
570
644
  */
571
- mailingClass?: BoxesAPI.OrderMailingClass;
645
+ mailingClass?:
646
+ | 'first_class'
647
+ | 'standard_class'
648
+ | 'express'
649
+ | 'certified'
650
+ | 'certified_return_receipt'
651
+ | 'registered'
652
+ | 'usps_first_class'
653
+ | 'usps_standard_class'
654
+ | 'usps_eddm'
655
+ | 'usps_express_2_day'
656
+ | 'usps_express_3_day'
657
+ | 'usps_first_class_certified'
658
+ | 'usps_first_class_certified_return_receipt'
659
+ | 'usps_first_class_registered'
660
+ | 'usps_express_3_day_signature_confirmation'
661
+ | 'usps_express_3_day_certified'
662
+ | 'usps_express_3_day_certified_return_receipt'
663
+ | 'ca_post_lettermail'
664
+ | 'ca_post_personalized'
665
+ | 'ca_post_neighbourhood_mail'
666
+ | 'ups_express_overnight'
667
+ | 'ups_express_2_day'
668
+ | 'ups_express_3_day'
669
+ | 'royal_mail_first_class'
670
+ | 'royal_mail_second_class'
671
+ | 'au_post_second_class';
572
672
 
573
673
  /**
574
674
  * These will be merged with the variables in the template or HTML you create this
@@ -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 ChequesAPI from '../cheques';
6
5
  import { APIPromise } from '../../../core/api-promise';
7
6
  import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
@@ -178,7 +177,33 @@ export interface ChequeProfile {
178
177
  * Mailing class. Generally must be first class (or equivalent for destination
179
178
  * country) for cheques.
180
179
  */
181
- mailingClass?: BoxesAPI.OrderMailingClass;
180
+ mailingClass?:
181
+ | 'first_class'
182
+ | 'standard_class'
183
+ | 'express'
184
+ | 'certified'
185
+ | 'certified_return_receipt'
186
+ | 'registered'
187
+ | 'usps_first_class'
188
+ | 'usps_standard_class'
189
+ | 'usps_eddm'
190
+ | 'usps_express_2_day'
191
+ | 'usps_express_3_day'
192
+ | 'usps_first_class_certified'
193
+ | 'usps_first_class_certified_return_receipt'
194
+ | 'usps_first_class_registered'
195
+ | 'usps_express_3_day_signature_confirmation'
196
+ | 'usps_express_3_day_certified'
197
+ | 'usps_express_3_day_certified_return_receipt'
198
+ | 'ca_post_lettermail'
199
+ | 'ca_post_personalized'
200
+ | 'ca_post_neighbourhood_mail'
201
+ | 'ups_express_overnight'
202
+ | 'ups_express_2_day'
203
+ | 'ups_express_3_day'
204
+ | 'royal_mail_first_class'
205
+ | 'royal_mail_second_class'
206
+ | 'au_post_second_class';
182
207
 
183
208
  /**
184
209
  * Memo line text for the cheque. Set to `null` to remove during update.
@@ -268,7 +293,33 @@ export interface ChequeListResponse {
268
293
  * Mailing class. Generally must be first class (or equivalent for destination
269
294
  * country) for cheques.
270
295
  */
271
- mailingClass?: BoxesAPI.OrderMailingClass;
296
+ mailingClass?:
297
+ | 'first_class'
298
+ | 'standard_class'
299
+ | 'express'
300
+ | 'certified'
301
+ | 'certified_return_receipt'
302
+ | 'registered'
303
+ | 'usps_first_class'
304
+ | 'usps_standard_class'
305
+ | 'usps_eddm'
306
+ | 'usps_express_2_day'
307
+ | 'usps_express_3_day'
308
+ | 'usps_first_class_certified'
309
+ | 'usps_first_class_certified_return_receipt'
310
+ | 'usps_first_class_registered'
311
+ | 'usps_express_3_day_signature_confirmation'
312
+ | 'usps_express_3_day_certified'
313
+ | 'usps_express_3_day_certified_return_receipt'
314
+ | 'ca_post_lettermail'
315
+ | 'ca_post_personalized'
316
+ | 'ca_post_neighbourhood_mail'
317
+ | 'ups_express_overnight'
318
+ | 'ups_express_2_day'
319
+ | 'ups_express_3_day'
320
+ | 'royal_mail_first_class'
321
+ | 'royal_mail_second_class'
322
+ | 'au_post_second_class';
272
323
 
273
324
  /**
274
325
  * Memo line text for the cheque. Set to `null` to remove during update.
@@ -354,7 +405,33 @@ export interface ChequeCreateParams {
354
405
  * Body param: Mailing class. Generally must be first class (or equivalent for
355
406
  * destination country) for cheques.
356
407
  */
357
- mailingClass?: BoxesAPI.OrderMailingClass;
408
+ mailingClass?:
409
+ | 'first_class'
410
+ | 'standard_class'
411
+ | 'express'
412
+ | 'certified'
413
+ | 'certified_return_receipt'
414
+ | 'registered'
415
+ | 'usps_first_class'
416
+ | 'usps_standard_class'
417
+ | 'usps_eddm'
418
+ | 'usps_express_2_day'
419
+ | 'usps_express_3_day'
420
+ | 'usps_first_class_certified'
421
+ | 'usps_first_class_certified_return_receipt'
422
+ | 'usps_first_class_registered'
423
+ | 'usps_express_3_day_signature_confirmation'
424
+ | 'usps_express_3_day_certified'
425
+ | 'usps_express_3_day_certified_return_receipt'
426
+ | 'ca_post_lettermail'
427
+ | 'ca_post_personalized'
428
+ | 'ca_post_neighbourhood_mail'
429
+ | 'ups_express_overnight'
430
+ | 'ups_express_2_day'
431
+ | 'ups_express_3_day'
432
+ | 'royal_mail_first_class'
433
+ | 'royal_mail_second_class'
434
+ | 'au_post_second_class';
358
435
 
359
436
  /**
360
437
  * Body param: Memo line text for the cheque. Set to `null` to remove during
@@ -435,7 +512,33 @@ export interface ChequeUpdateParams {
435
512
  * Body param: Mailing class. Generally must be first class (or equivalent for
436
513
  * destination country) for cheques.
437
514
  */
438
- mailingClass?: BoxesAPI.OrderMailingClass;
515
+ mailingClass?:
516
+ | 'first_class'
517
+ | 'standard_class'
518
+ | 'express'
519
+ | 'certified'
520
+ | 'certified_return_receipt'
521
+ | 'registered'
522
+ | 'usps_first_class'
523
+ | 'usps_standard_class'
524
+ | 'usps_eddm'
525
+ | 'usps_express_2_day'
526
+ | 'usps_express_3_day'
527
+ | 'usps_first_class_certified'
528
+ | 'usps_first_class_certified_return_receipt'
529
+ | 'usps_first_class_registered'
530
+ | 'usps_express_3_day_signature_confirmation'
531
+ | 'usps_express_3_day_certified'
532
+ | 'usps_express_3_day_certified_return_receipt'
533
+ | 'ca_post_lettermail'
534
+ | 'ca_post_personalized'
535
+ | 'ca_post_neighbourhood_mail'
536
+ | 'ups_express_overnight'
537
+ | 'ups_express_2_day'
538
+ | 'ups_express_3_day'
539
+ | 'royal_mail_first_class'
540
+ | 'royal_mail_second_class'
541
+ | 'au_post_second_class';
439
542
 
440
543
  /**
441
544
  * Body param: Memo line text for the cheque. Set to `null` to remove during
@@ -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 LettersAPI from '../letters';
6
5
  import { APIPromise } from '../../../core/api-promise';
7
6
  import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
@@ -182,7 +181,33 @@ export interface LetterProfile {
182
181
  /**
183
182
  * Mailing class.
184
183
  */
185
- mailingClass?: BoxesAPI.OrderMailingClass;
184
+ mailingClass?:
185
+ | 'first_class'
186
+ | 'standard_class'
187
+ | 'express'
188
+ | 'certified'
189
+ | 'certified_return_receipt'
190
+ | 'registered'
191
+ | 'usps_first_class'
192
+ | 'usps_standard_class'
193
+ | 'usps_eddm'
194
+ | 'usps_express_2_day'
195
+ | 'usps_express_3_day'
196
+ | 'usps_first_class_certified'
197
+ | 'usps_first_class_certified_return_receipt'
198
+ | 'usps_first_class_registered'
199
+ | 'usps_express_3_day_signature_confirmation'
200
+ | 'usps_express_3_day_certified'
201
+ | 'usps_express_3_day_certified_return_receipt'
202
+ | 'ca_post_lettermail'
203
+ | 'ca_post_personalized'
204
+ | 'ca_post_neighbourhood_mail'
205
+ | 'ups_express_overnight'
206
+ | 'ups_express_2_day'
207
+ | 'ups_express_3_day'
208
+ | 'royal_mail_first_class'
209
+ | 'royal_mail_second_class'
210
+ | 'au_post_second_class';
186
211
 
187
212
  /**
188
213
  * Default merge variables for orders created using this profile.
@@ -270,7 +295,33 @@ export interface LetterCreateParams {
270
295
  /**
271
296
  * Body param: Mailing class.
272
297
  */
273
- mailingClass?: BoxesAPI.OrderMailingClass;
298
+ mailingClass?:
299
+ | 'first_class'
300
+ | 'standard_class'
301
+ | 'express'
302
+ | 'certified'
303
+ | 'certified_return_receipt'
304
+ | 'registered'
305
+ | 'usps_first_class'
306
+ | 'usps_standard_class'
307
+ | 'usps_eddm'
308
+ | 'usps_express_2_day'
309
+ | 'usps_express_3_day'
310
+ | 'usps_first_class_certified'
311
+ | 'usps_first_class_certified_return_receipt'
312
+ | 'usps_first_class_registered'
313
+ | 'usps_express_3_day_signature_confirmation'
314
+ | 'usps_express_3_day_certified'
315
+ | 'usps_express_3_day_certified_return_receipt'
316
+ | 'ca_post_lettermail'
317
+ | 'ca_post_personalized'
318
+ | 'ca_post_neighbourhood_mail'
319
+ | 'ups_express_overnight'
320
+ | 'ups_express_2_day'
321
+ | 'ups_express_3_day'
322
+ | 'royal_mail_first_class'
323
+ | 'royal_mail_second_class'
324
+ | 'au_post_second_class';
274
325
 
275
326
  /**
276
327
  * Body param: Default merge variables for orders created using this profile.
@@ -353,7 +404,33 @@ export interface LetterUpdateParams {
353
404
  /**
354
405
  * Body param: Mailing class.
355
406
  */
356
- mailingClass?: BoxesAPI.OrderMailingClass;
407
+ mailingClass?:
408
+ | 'first_class'
409
+ | 'standard_class'
410
+ | 'express'
411
+ | 'certified'
412
+ | 'certified_return_receipt'
413
+ | 'registered'
414
+ | 'usps_first_class'
415
+ | 'usps_standard_class'
416
+ | 'usps_eddm'
417
+ | 'usps_express_2_day'
418
+ | 'usps_express_3_day'
419
+ | 'usps_first_class_certified'
420
+ | 'usps_first_class_certified_return_receipt'
421
+ | 'usps_first_class_registered'
422
+ | 'usps_express_3_day_signature_confirmation'
423
+ | 'usps_express_3_day_certified'
424
+ | 'usps_express_3_day_certified_return_receipt'
425
+ | 'ca_post_lettermail'
426
+ | 'ca_post_personalized'
427
+ | 'ca_post_neighbourhood_mail'
428
+ | 'ups_express_overnight'
429
+ | 'ups_express_2_day'
430
+ | 'ups_express_3_day'
431
+ | 'royal_mail_first_class'
432
+ | 'royal_mail_second_class'
433
+ | 'au_post_second_class';
357
434
 
358
435
  /**
359
436
  * Body param: Default merge variables for orders created using this profile.