postgrid-node 0.3.0 → 0.4.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.
- package/CHANGELOG.md +21 -0
- package/README.md +31 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +8 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +60 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +60 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +107 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +101 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/print-mail/bank-accounts.d.mts +9 -14
- package/resources/print-mail/bank-accounts.d.mts.map +1 -1
- package/resources/print-mail/bank-accounts.d.ts +9 -14
- package/resources/print-mail/bank-accounts.d.ts.map +1 -1
- package/resources/print-mail/bank-accounts.js +9 -3
- package/resources/print-mail/bank-accounts.js.map +1 -1
- package/resources/print-mail/bank-accounts.mjs +9 -3
- package/resources/print-mail/bank-accounts.mjs.map +1 -1
- package/resources/print-mail/boxes.d.mts +14 -566
- package/resources/print-mail/boxes.d.mts.map +1 -1
- package/resources/print-mail/boxes.d.ts +14 -566
- package/resources/print-mail/boxes.d.ts.map +1 -1
- package/resources/print-mail/boxes.js +6 -2
- package/resources/print-mail/boxes.js.map +1 -1
- package/resources/print-mail/boxes.mjs +6 -2
- package/resources/print-mail/boxes.mjs.map +1 -1
- package/resources/print-mail/campaigns.d.mts +9 -16
- package/resources/print-mail/campaigns.d.mts.map +1 -1
- package/resources/print-mail/campaigns.d.ts +9 -16
- package/resources/print-mail/campaigns.d.ts.map +1 -1
- package/resources/print-mail/campaigns.js +6 -2
- package/resources/print-mail/campaigns.js.map +1 -1
- package/resources/print-mail/campaigns.mjs +6 -2
- package/resources/print-mail/campaigns.mjs.map +1 -1
- package/resources/print-mail/cheques.d.mts +13 -426
- package/resources/print-mail/cheques.d.mts.map +1 -1
- package/resources/print-mail/cheques.d.ts +13 -426
- package/resources/print-mail/cheques.d.ts.map +1 -1
- package/resources/print-mail/cheques.js +6 -2
- package/resources/print-mail/cheques.js.map +1 -1
- package/resources/print-mail/cheques.mjs +6 -2
- package/resources/print-mail/cheques.mjs.map +1 -1
- package/resources/print-mail/contacts.d.mts +11 -152
- package/resources/print-mail/contacts.d.mts.map +1 -1
- package/resources/print-mail/contacts.d.ts +11 -152
- package/resources/print-mail/contacts.d.ts.map +1 -1
- package/resources/print-mail/contacts.js +6 -2
- package/resources/print-mail/contacts.js.map +1 -1
- package/resources/print-mail/contacts.mjs +6 -2
- package/resources/print-mail/contacts.mjs.map +1 -1
- package/resources/print-mail/index.d.mts +14 -14
- package/resources/print-mail/index.d.mts.map +1 -1
- package/resources/print-mail/index.d.ts +14 -14
- package/resources/print-mail/index.d.ts.map +1 -1
- package/resources/print-mail/index.js.map +1 -1
- package/resources/print-mail/index.mjs.map +1 -1
- package/resources/print-mail/letters.d.mts +14 -565
- package/resources/print-mail/letters.d.mts.map +1 -1
- package/resources/print-mail/letters.d.ts +14 -565
- package/resources/print-mail/letters.d.ts.map +1 -1
- package/resources/print-mail/letters.js +6 -2
- package/resources/print-mail/letters.js.map +1 -1
- package/resources/print-mail/letters.mjs +6 -2
- package/resources/print-mail/letters.mjs.map +1 -1
- package/resources/print-mail/mailing-list-imports.d.mts +9 -17
- package/resources/print-mail/mailing-list-imports.d.mts.map +1 -1
- package/resources/print-mail/mailing-list-imports.d.ts +9 -17
- package/resources/print-mail/mailing-list-imports.d.ts.map +1 -1
- package/resources/print-mail/mailing-list-imports.js +6 -3
- package/resources/print-mail/mailing-list-imports.js.map +1 -1
- package/resources/print-mail/mailing-list-imports.mjs +6 -3
- package/resources/print-mail/mailing-list-imports.mjs.map +1 -1
- package/resources/print-mail/mailing-lists.d.mts +9 -17
- package/resources/print-mail/mailing-lists.d.mts.map +1 -1
- package/resources/print-mail/mailing-lists.d.ts +9 -17
- package/resources/print-mail/mailing-lists.d.ts.map +1 -1
- package/resources/print-mail/mailing-lists.js +9 -3
- package/resources/print-mail/mailing-lists.js.map +1 -1
- package/resources/print-mail/mailing-lists.mjs +9 -3
- package/resources/print-mail/mailing-lists.mjs.map +1 -1
- package/resources/print-mail/order-profiles/cheques.d.mts +80 -90
- package/resources/print-mail/order-profiles/cheques.d.mts.map +1 -1
- package/resources/print-mail/order-profiles/cheques.d.ts +80 -90
- package/resources/print-mail/order-profiles/cheques.d.ts.map +1 -1
- package/resources/print-mail/order-profiles/cheques.js +9 -3
- package/resources/print-mail/order-profiles/cheques.js.map +1 -1
- package/resources/print-mail/order-profiles/cheques.mjs +9 -3
- package/resources/print-mail/order-profiles/cheques.mjs.map +1 -1
- package/resources/print-mail/order-profiles/index.d.mts +4 -4
- package/resources/print-mail/order-profiles/index.d.mts.map +1 -1
- package/resources/print-mail/order-profiles/index.d.ts +4 -4
- package/resources/print-mail/order-profiles/index.d.ts.map +1 -1
- package/resources/print-mail/order-profiles/index.js.map +1 -1
- package/resources/print-mail/order-profiles/index.mjs.map +1 -1
- package/resources/print-mail/order-profiles/letters.d.mts +9 -17
- package/resources/print-mail/order-profiles/letters.d.mts.map +1 -1
- package/resources/print-mail/order-profiles/letters.d.ts +9 -17
- package/resources/print-mail/order-profiles/letters.d.ts.map +1 -1
- package/resources/print-mail/order-profiles/letters.js +9 -3
- package/resources/print-mail/order-profiles/letters.js.map +1 -1
- package/resources/print-mail/order-profiles/letters.mjs +9 -3
- package/resources/print-mail/order-profiles/letters.mjs.map +1 -1
- package/resources/print-mail/order-profiles/order-profiles.d.mts +8 -8
- package/resources/print-mail/order-profiles/order-profiles.d.mts.map +1 -1
- package/resources/print-mail/order-profiles/order-profiles.d.ts +8 -8
- package/resources/print-mail/order-profiles/order-profiles.d.ts.map +1 -1
- package/resources/print-mail/order-profiles/order-profiles.js.map +1 -1
- package/resources/print-mail/order-profiles/order-profiles.mjs.map +1 -1
- package/resources/print-mail/order-profiles/postcards.d.mts +9 -17
- package/resources/print-mail/order-profiles/postcards.d.mts.map +1 -1
- package/resources/print-mail/order-profiles/postcards.d.ts +9 -17
- package/resources/print-mail/order-profiles/postcards.d.ts.map +1 -1
- package/resources/print-mail/order-profiles/postcards.js +9 -3
- package/resources/print-mail/order-profiles/postcards.js.map +1 -1
- package/resources/print-mail/order-profiles/postcards.mjs +9 -3
- package/resources/print-mail/order-profiles/postcards.mjs.map +1 -1
- package/resources/print-mail/order-profiles/self-mailers.d.mts +9 -17
- package/resources/print-mail/order-profiles/self-mailers.d.mts.map +1 -1
- package/resources/print-mail/order-profiles/self-mailers.d.ts +9 -17
- package/resources/print-mail/order-profiles/self-mailers.d.ts.map +1 -1
- package/resources/print-mail/order-profiles/self-mailers.js +6 -3
- package/resources/print-mail/order-profiles/self-mailers.js.map +1 -1
- package/resources/print-mail/order-profiles/self-mailers.mjs +6 -3
- package/resources/print-mail/order-profiles/self-mailers.mjs.map +1 -1
- package/resources/print-mail/postcards.d.mts +16 -841
- package/resources/print-mail/postcards.d.mts.map +1 -1
- package/resources/print-mail/postcards.d.ts +16 -841
- package/resources/print-mail/postcards.d.ts.map +1 -1
- package/resources/print-mail/postcards.js +6 -2
- package/resources/print-mail/postcards.js.map +1 -1
- package/resources/print-mail/postcards.mjs +6 -2
- package/resources/print-mail/postcards.mjs.map +1 -1
- package/resources/print-mail/print-mail.d.mts +163 -26
- package/resources/print-mail/print-mail.d.mts.map +1 -1
- package/resources/print-mail/print-mail.d.ts +163 -26
- package/resources/print-mail/print-mail.d.ts.map +1 -1
- package/resources/print-mail/print-mail.js.map +1 -1
- package/resources/print-mail/print-mail.mjs.map +1 -1
- package/resources/print-mail/reports/index.d.mts +1 -1
- package/resources/print-mail/reports/index.d.mts.map +1 -1
- package/resources/print-mail/reports/index.d.ts +1 -1
- package/resources/print-mail/reports/index.d.ts.map +1 -1
- package/resources/print-mail/reports/reports.d.mts +9 -16
- package/resources/print-mail/reports/reports.d.mts.map +1 -1
- package/resources/print-mail/reports/reports.d.ts +9 -16
- package/resources/print-mail/reports/reports.d.ts.map +1 -1
- package/resources/print-mail/reports/reports.js +6 -2
- package/resources/print-mail/reports/reports.js.map +1 -1
- package/resources/print-mail/reports/reports.mjs +6 -2
- package/resources/print-mail/reports/reports.mjs.map +1 -1
- package/resources/print-mail/self-mailers.d.mts +16 -842
- package/resources/print-mail/self-mailers.d.mts.map +1 -1
- package/resources/print-mail/self-mailers.d.ts +16 -842
- package/resources/print-mail/self-mailers.d.ts.map +1 -1
- package/resources/print-mail/self-mailers.js +9 -3
- package/resources/print-mail/self-mailers.js.map +1 -1
- package/resources/print-mail/self-mailers.mjs +9 -3
- package/resources/print-mail/self-mailers.mjs.map +1 -1
- package/resources/print-mail/sub-organizations.d.mts +9 -14
- package/resources/print-mail/sub-organizations.d.mts.map +1 -1
- package/resources/print-mail/sub-organizations.d.ts +9 -14
- package/resources/print-mail/sub-organizations.d.ts.map +1 -1
- package/resources/print-mail/sub-organizations.js +9 -3
- package/resources/print-mail/sub-organizations.js.map +1 -1
- package/resources/print-mail/sub-organizations.mjs +9 -3
- package/resources/print-mail/sub-organizations.mjs.map +1 -1
- package/resources/print-mail/templates.d.mts +9 -13
- package/resources/print-mail/templates.d.mts.map +1 -1
- package/resources/print-mail/templates.d.ts +9 -13
- package/resources/print-mail/templates.d.ts.map +1 -1
- package/resources/print-mail/templates.js +6 -2
- package/resources/print-mail/templates.js.map +1 -1
- package/resources/print-mail/templates.mjs +6 -2
- package/resources/print-mail/templates.mjs.map +1 -1
- package/src/client.ts +34 -2
- package/src/core/pagination.ts +171 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/index.ts +5 -1
- package/src/resources/print-mail/bank-accounts.ts +14 -22
- package/src/resources/print-mail/boxes.ts +19 -686
- package/src/resources/print-mail/campaigns.ts +11 -24
- package/src/resources/print-mail/cheques.ts +15 -527
- package/src/resources/print-mail/contacts.ts +14 -189
- package/src/resources/print-mail/index.ts +14 -14
- package/src/resources/print-mail/letters.ts +16 -697
- package/src/resources/print-mail/mailing-list-imports.ts +15 -25
- package/src/resources/print-mail/mailing-lists.ts +14 -25
- package/src/resources/print-mail/order-profiles/cheques.ts +91 -103
- package/src/resources/print-mail/order-profiles/index.ts +4 -3
- package/src/resources/print-mail/order-profiles/letters.ts +14 -25
- package/src/resources/print-mail/order-profiles/order-profiles.ts +8 -6
- package/src/resources/print-mail/order-profiles/postcards.ts +14 -25
- package/src/resources/print-mail/order-profiles/self-mailers.ts +15 -25
- package/src/resources/print-mail/postcards.ts +18 -1035
- package/src/resources/print-mail/print-mail.ts +195 -26
- package/src/resources/print-mail/reports/index.ts +1 -1
- package/src/resources/print-mail/reports/reports.ts +11 -24
- package/src/resources/print-mail/self-mailers.ts +21 -1036
- package/src/resources/print-mail/sub-organizations.ts +14 -22
- package/src/resources/print-mail/templates.ts +11 -21
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as MailingListImportsAPI from './mailing-list-imports';
|
|
5
5
|
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
|
|
6
7
|
import { buildHeaders } from '../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
9
|
import { path } from '../../internal/utils/path';
|
|
@@ -90,15 +91,21 @@ export class MailingListImports extends APIResource {
|
|
|
90
91
|
*
|
|
91
92
|
* @example
|
|
92
93
|
* ```ts
|
|
93
|
-
*
|
|
94
|
-
*
|
|
94
|
+
* // Automatically fetches more pages as needed.
|
|
95
|
+
* for await (const mailingListImportResponse of client.printMail.mailingListImports.list()) {
|
|
96
|
+
* // ...
|
|
97
|
+
* }
|
|
95
98
|
* ```
|
|
96
99
|
*/
|
|
97
100
|
list(
|
|
98
101
|
query: MailingListImportListParams | null | undefined = {},
|
|
99
102
|
options?: RequestOptions,
|
|
100
|
-
):
|
|
101
|
-
return this._client.
|
|
103
|
+
): PagePromise<MailingListImportResponsesSkipLimit, MailingListImportResponse> {
|
|
104
|
+
return this._client.getAPIList(
|
|
105
|
+
'/print-mail/v1/mailing_list_imports',
|
|
106
|
+
SkipLimit<MailingListImportResponse>,
|
|
107
|
+
{ query, ...options },
|
|
108
|
+
);
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
/**
|
|
@@ -118,6 +125,8 @@ export class MailingListImports extends APIResource {
|
|
|
118
125
|
}
|
|
119
126
|
}
|
|
120
127
|
|
|
128
|
+
export type MailingListImportResponsesSkipLimit = SkipLimit<MailingListImportResponse>;
|
|
129
|
+
|
|
121
130
|
/**
|
|
122
131
|
* Type of file supported for mailing list imports.
|
|
123
132
|
*/
|
|
@@ -317,21 +326,6 @@ export interface VerificationStatusCount {
|
|
|
317
326
|
verifiedCount: number;
|
|
318
327
|
}
|
|
319
328
|
|
|
320
|
-
/**
|
|
321
|
-
* A list of mailing list imports.
|
|
322
|
-
*/
|
|
323
|
-
export interface MailingListImportListResponse {
|
|
324
|
-
data: Array<MailingListImportResponse>;
|
|
325
|
-
|
|
326
|
-
limit: number;
|
|
327
|
-
|
|
328
|
-
object: 'list';
|
|
329
|
-
|
|
330
|
-
skip: number;
|
|
331
|
-
|
|
332
|
-
totalCount: number;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
329
|
export interface MailingListImportDeleteResponse {
|
|
336
330
|
/**
|
|
337
331
|
* A unique ID prefixed with mailing*list_import*
|
|
@@ -404,9 +398,7 @@ export interface MailingListImportUpdateParams {
|
|
|
404
398
|
metadata?: { [key: string]: string } | null;
|
|
405
399
|
}
|
|
406
400
|
|
|
407
|
-
export interface MailingListImportListParams {
|
|
408
|
-
limit?: number;
|
|
409
|
-
|
|
401
|
+
export interface MailingListImportListParams extends SkipLimitParams {
|
|
410
402
|
/**
|
|
411
403
|
* You can supply any string to help narrow down the list of resources. For
|
|
412
404
|
* example, if you pass `"New York"` (quoted), it will return resources that have
|
|
@@ -415,8 +407,6 @@ export interface MailingListImportListParams {
|
|
|
415
407
|
* more details.
|
|
416
408
|
*/
|
|
417
409
|
search?: string;
|
|
418
|
-
|
|
419
|
-
skip?: number;
|
|
420
410
|
}
|
|
421
411
|
|
|
422
412
|
export declare namespace MailingListImports {
|
|
@@ -424,8 +414,8 @@ export declare namespace MailingListImports {
|
|
|
424
414
|
type FileType as FileType,
|
|
425
415
|
type MailingListImportResponse as MailingListImportResponse,
|
|
426
416
|
type VerificationStatusCount as VerificationStatusCount,
|
|
427
|
-
type MailingListImportListResponse as MailingListImportListResponse,
|
|
428
417
|
type MailingListImportDeleteResponse as MailingListImportDeleteResponse,
|
|
418
|
+
type MailingListImportResponsesSkipLimit as MailingListImportResponsesSkipLimit,
|
|
429
419
|
type MailingListImportCreateParams as MailingListImportCreateParams,
|
|
430
420
|
type MailingListImportUpdateParams as MailingListImportUpdateParams,
|
|
431
421
|
type MailingListImportListParams as MailingListImportListParams,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
|
|
5
6
|
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
@@ -67,15 +68,20 @@ export class MailingLists extends APIResource {
|
|
|
67
68
|
*
|
|
68
69
|
* @example
|
|
69
70
|
* ```ts
|
|
70
|
-
*
|
|
71
|
-
*
|
|
71
|
+
* // Automatically fetches more pages as needed.
|
|
72
|
+
* for await (const mailingList of client.printMail.mailingLists.list()) {
|
|
73
|
+
* // ...
|
|
74
|
+
* }
|
|
72
75
|
* ```
|
|
73
76
|
*/
|
|
74
77
|
list(
|
|
75
78
|
query: MailingListListParams | null | undefined = {},
|
|
76
79
|
options?: RequestOptions,
|
|
77
|
-
):
|
|
78
|
-
return this._client.
|
|
80
|
+
): PagePromise<MailingListsSkipLimit, MailingList> {
|
|
81
|
+
return this._client.getAPIList('/print-mail/v1/mailing_lists', SkipLimit<MailingList>, {
|
|
82
|
+
query,
|
|
83
|
+
...options,
|
|
84
|
+
});
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
/**
|
|
@@ -123,6 +129,8 @@ export class MailingLists extends APIResource {
|
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
|
|
132
|
+
export type MailingListsSkipLimit = SkipLimit<MailingList>;
|
|
133
|
+
|
|
126
134
|
/**
|
|
127
135
|
* Represents a mailing list.
|
|
128
136
|
*/
|
|
@@ -206,21 +214,6 @@ export interface MailingListUpdate {
|
|
|
206
214
|
metadata?: { [key: string]: unknown };
|
|
207
215
|
}
|
|
208
216
|
|
|
209
|
-
/**
|
|
210
|
-
* A list of mailing lists.
|
|
211
|
-
*/
|
|
212
|
-
export interface MailingListListResponse {
|
|
213
|
-
data: Array<MailingList>;
|
|
214
|
-
|
|
215
|
-
limit: number;
|
|
216
|
-
|
|
217
|
-
object: 'list';
|
|
218
|
-
|
|
219
|
-
skip: number;
|
|
220
|
-
|
|
221
|
-
totalCount: number;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
217
|
export interface MailingListDeleteResponse {
|
|
225
218
|
/**
|
|
226
219
|
* A unique ID prefixed with mailing*list*
|
|
@@ -261,9 +254,7 @@ export interface MailingListUpdateParams {
|
|
|
261
254
|
metadata?: { [key: string]: unknown };
|
|
262
255
|
}
|
|
263
256
|
|
|
264
|
-
export interface MailingListListParams {
|
|
265
|
-
limit?: number;
|
|
266
|
-
|
|
257
|
+
export interface MailingListListParams extends SkipLimitParams {
|
|
267
258
|
/**
|
|
268
259
|
* You can supply any string to help narrow down the list of resources. For
|
|
269
260
|
* example, if you pass `"New York"` (quoted), it will return resources that have
|
|
@@ -272,8 +263,6 @@ export interface MailingListListParams {
|
|
|
272
263
|
* more details.
|
|
273
264
|
*/
|
|
274
265
|
search?: string;
|
|
275
|
-
|
|
276
|
-
skip?: number;
|
|
277
266
|
}
|
|
278
267
|
|
|
279
268
|
export interface MailingListJobsParams {
|
|
@@ -306,8 +295,8 @@ export declare namespace MailingLists {
|
|
|
306
295
|
export {
|
|
307
296
|
type MailingList as MailingList,
|
|
308
297
|
type MailingListUpdate as MailingListUpdate,
|
|
309
|
-
type MailingListListResponse as MailingListListResponse,
|
|
310
298
|
type MailingListDeleteResponse as MailingListDeleteResponse,
|
|
299
|
+
type MailingListsSkipLimit as MailingListsSkipLimit,
|
|
311
300
|
type MailingListCreateParams as MailingListCreateParams,
|
|
312
301
|
type MailingListUpdateParams as MailingListUpdateParams,
|
|
313
302
|
type MailingListListParams as MailingListListParams,
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as BoxesAPI from '../boxes';
|
|
5
5
|
import * as ChequesAPI from '../cheques';
|
|
6
6
|
import { APIPromise } from '../../../core/api-promise';
|
|
7
|
+
import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
|
|
7
8
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
9
|
import { path } from '../../../internal/utils/path';
|
|
9
10
|
|
|
@@ -78,15 +79,20 @@ export class Cheques extends APIResource {
|
|
|
78
79
|
*
|
|
79
80
|
* @example
|
|
80
81
|
* ```ts
|
|
81
|
-
*
|
|
82
|
-
*
|
|
82
|
+
* // Automatically fetches more pages as needed.
|
|
83
|
+
* for await (const chequeListResponse of client.printMail.orderProfiles.cheques.list()) {
|
|
84
|
+
* // ...
|
|
85
|
+
* }
|
|
83
86
|
* ```
|
|
84
87
|
*/
|
|
85
88
|
list(
|
|
86
89
|
query: ChequeListParams | null | undefined = {},
|
|
87
90
|
options?: RequestOptions,
|
|
88
|
-
):
|
|
89
|
-
return this._client.
|
|
91
|
+
): PagePromise<ChequeListResponsesSkipLimit, ChequeListResponse> {
|
|
92
|
+
return this._client.getAPIList('/print-mail/v1/order_profiles/cheques', SkipLimit<ChequeListResponse>, {
|
|
93
|
+
query,
|
|
94
|
+
...options,
|
|
95
|
+
});
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
/**
|
|
@@ -103,6 +109,8 @@ export class Cheques extends APIResource {
|
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
111
|
|
|
112
|
+
export type ChequeListResponsesSkipLimit = SkipLimit<ChequeListResponse>;
|
|
113
|
+
|
|
106
114
|
export interface ChequeProfile {
|
|
107
115
|
/**
|
|
108
116
|
* Unique identifier for the order profile.
|
|
@@ -198,106 +206,89 @@ export interface ChequeProfile {
|
|
|
198
206
|
*/
|
|
199
207
|
export type CurrencyCode = 'CAD' | 'USD';
|
|
200
208
|
|
|
201
|
-
/**
|
|
202
|
-
* Represents a list of Cheque Profiles.
|
|
203
|
-
*/
|
|
204
209
|
export interface ChequeListResponse {
|
|
205
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Unique identifier for the order profile.
|
|
212
|
+
*/
|
|
213
|
+
id: string;
|
|
206
214
|
|
|
207
|
-
|
|
215
|
+
/**
|
|
216
|
+
* ID of the bank account to use for the cheque. Required for creation.
|
|
217
|
+
*/
|
|
218
|
+
bankAccount: string;
|
|
208
219
|
|
|
209
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Timestamp when the profile was created.
|
|
222
|
+
*/
|
|
223
|
+
createdAt: string;
|
|
210
224
|
|
|
211
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Indicates if the profile is associated with the live or test environment.
|
|
227
|
+
*/
|
|
228
|
+
live: boolean;
|
|
212
229
|
|
|
213
|
-
|
|
214
|
-
|
|
230
|
+
/**
|
|
231
|
+
* Always `cheque_profile`.
|
|
232
|
+
*/
|
|
233
|
+
object: 'cheque_profile';
|
|
215
234
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
logo?: string | null;
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Mailing class. Generally must be first class (or equivalent for destination
|
|
277
|
-
* country) for cheques.
|
|
278
|
-
*/
|
|
279
|
-
mailingClass?: BoxesAPI.OrderMailingClass;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Memo line text for the cheque. Set to `null` to remove during update.
|
|
283
|
-
*/
|
|
284
|
-
memo?: string | null;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Default merge variables for orders created using this profile.
|
|
288
|
-
*/
|
|
289
|
-
mergeVariables?: { [key: string]: unknown } | null;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Message included on the cheque stub. Set to `null` to remove during update.
|
|
293
|
-
*/
|
|
294
|
-
message?: string | null;
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Optional key-value metadata.
|
|
298
|
-
*/
|
|
299
|
-
metadata?: { [key: string]: string } | null;
|
|
300
|
-
}
|
|
235
|
+
/**
|
|
236
|
+
* Enum representing the supported cheque sizes.
|
|
237
|
+
*/
|
|
238
|
+
size: ChequesAPI.ChequeSize;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Timestamp when the profile was last updated.
|
|
242
|
+
*/
|
|
243
|
+
updatedAt: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* An optional description for the profile. Set to `null` to remove during update.
|
|
247
|
+
*/
|
|
248
|
+
description?: string | null;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* ID of a template for an optional attached letter. Cannot be used with
|
|
252
|
+
* `letterHTML` or `letterPDF`.
|
|
253
|
+
*/
|
|
254
|
+
letterTemplate?: string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* A temporary, signed URL to view the attached letter PDF, if any. Output only.
|
|
258
|
+
*/
|
|
259
|
+
letterUploadedPDF?: string;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* A publicly accessible URL for the logo to print on the cheque. Set to `null` to
|
|
263
|
+
* remove during update.
|
|
264
|
+
*/
|
|
265
|
+
logo?: string | null;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Mailing class. Generally must be first class (or equivalent for destination
|
|
269
|
+
* country) for cheques.
|
|
270
|
+
*/
|
|
271
|
+
mailingClass?: BoxesAPI.OrderMailingClass;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Memo line text for the cheque. Set to `null` to remove during update.
|
|
275
|
+
*/
|
|
276
|
+
memo?: string | null;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Default merge variables for orders created using this profile.
|
|
280
|
+
*/
|
|
281
|
+
mergeVariables?: { [key: string]: unknown } | null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Message included on the cheque stub. Set to `null` to remove during update.
|
|
285
|
+
*/
|
|
286
|
+
message?: string | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Optional key-value metadata.
|
|
290
|
+
*/
|
|
291
|
+
metadata?: { [key: string]: string } | null;
|
|
301
292
|
}
|
|
302
293
|
|
|
303
294
|
export interface ChequeDeleteResponse {
|
|
@@ -469,9 +460,7 @@ export interface ChequeUpdateParams {
|
|
|
469
460
|
metadata?: { [key: string]: string } | null;
|
|
470
461
|
}
|
|
471
462
|
|
|
472
|
-
export interface ChequeListParams {
|
|
473
|
-
limit?: number;
|
|
474
|
-
|
|
463
|
+
export interface ChequeListParams extends SkipLimitParams {
|
|
475
464
|
/**
|
|
476
465
|
* You can supply any string to help narrow down the list of resources. For
|
|
477
466
|
* example, if you pass `"New York"` (quoted), it will return resources that have
|
|
@@ -480,8 +469,6 @@ export interface ChequeListParams {
|
|
|
480
469
|
* more details.
|
|
481
470
|
*/
|
|
482
471
|
search?: string;
|
|
483
|
-
|
|
484
|
-
skip?: number;
|
|
485
472
|
}
|
|
486
473
|
|
|
487
474
|
export declare namespace Cheques {
|
|
@@ -490,6 +477,7 @@ export declare namespace Cheques {
|
|
|
490
477
|
type CurrencyCode as CurrencyCode,
|
|
491
478
|
type ChequeListResponse as ChequeListResponse,
|
|
492
479
|
type ChequeDeleteResponse as ChequeDeleteResponse,
|
|
480
|
+
type ChequeListResponsesSkipLimit as ChequeListResponsesSkipLimit,
|
|
493
481
|
type ChequeCreateParams as ChequeCreateParams,
|
|
494
482
|
type ChequeRetrieveParams as ChequeRetrieveParams,
|
|
495
483
|
type ChequeUpdateParams as ChequeUpdateParams,
|
|
@@ -10,37 +10,38 @@ export {
|
|
|
10
10
|
type ChequeRetrieveParams,
|
|
11
11
|
type ChequeUpdateParams,
|
|
12
12
|
type ChequeListParams,
|
|
13
|
+
type ChequeListResponsesSkipLimit,
|
|
13
14
|
} from './cheques';
|
|
14
15
|
export {
|
|
15
16
|
Letters,
|
|
16
17
|
type LetterProfile,
|
|
17
|
-
type LetterListResponse,
|
|
18
18
|
type LetterDeleteResponse,
|
|
19
19
|
type LetterCreateParams,
|
|
20
20
|
type LetterRetrieveParams,
|
|
21
21
|
type LetterUpdateParams,
|
|
22
22
|
type LetterListParams,
|
|
23
|
+
type LetterProfilesSkipLimit,
|
|
23
24
|
} from './letters';
|
|
24
25
|
export { OrderProfiles } from './order-profiles';
|
|
25
26
|
export {
|
|
26
27
|
Postcards,
|
|
27
28
|
type PostcardProfile,
|
|
28
29
|
type PostcardSize,
|
|
29
|
-
type PostcardListResponse,
|
|
30
30
|
type PostcardDeleteResponse,
|
|
31
31
|
type PostcardCreateParams,
|
|
32
32
|
type PostcardRetrieveParams,
|
|
33
33
|
type PostcardUpdateParams,
|
|
34
34
|
type PostcardListParams,
|
|
35
|
+
type PostcardProfilesSkipLimit,
|
|
35
36
|
} from './postcards';
|
|
36
37
|
export {
|
|
37
38
|
SelfMailers,
|
|
38
39
|
type SelfMailerProfile,
|
|
39
40
|
type SelfMailerSize,
|
|
40
|
-
type SelfMailerListResponse,
|
|
41
41
|
type SelfMailerDeleteResponse,
|
|
42
42
|
type SelfMailerCreateParams,
|
|
43
43
|
type SelfMailerRetrieveParams,
|
|
44
44
|
type SelfMailerUpdateParams,
|
|
45
45
|
type SelfMailerListParams,
|
|
46
|
+
type SelfMailerProfilesSkipLimit,
|
|
46
47
|
} from './self-mailers';
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as BoxesAPI from '../boxes';
|
|
5
5
|
import * as LettersAPI from '../letters';
|
|
6
6
|
import { APIPromise } from '../../../core/api-promise';
|
|
7
|
+
import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
|
|
7
8
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
9
|
import { path } from '../../../internal/utils/path';
|
|
9
10
|
|
|
@@ -84,15 +85,20 @@ export class Letters extends APIResource {
|
|
|
84
85
|
*
|
|
85
86
|
* @example
|
|
86
87
|
* ```ts
|
|
87
|
-
*
|
|
88
|
-
*
|
|
88
|
+
* // Automatically fetches more pages as needed.
|
|
89
|
+
* for await (const letterProfile of client.printMail.orderProfiles.letters.list()) {
|
|
90
|
+
* // ...
|
|
91
|
+
* }
|
|
89
92
|
* ```
|
|
90
93
|
*/
|
|
91
94
|
list(
|
|
92
95
|
query: LetterListParams | null | undefined = {},
|
|
93
96
|
options?: RequestOptions,
|
|
94
|
-
):
|
|
95
|
-
return this._client.
|
|
97
|
+
): PagePromise<LetterProfilesSkipLimit, LetterProfile> {
|
|
98
|
+
return this._client.getAPIList('/print-mail/v1/order_profiles/letters', SkipLimit<LetterProfile>, {
|
|
99
|
+
query,
|
|
100
|
+
...options,
|
|
101
|
+
});
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
@@ -110,6 +116,8 @@ export class Letters extends APIResource {
|
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
|
|
119
|
+
export type LetterProfilesSkipLimit = SkipLimit<LetterProfile>;
|
|
120
|
+
|
|
113
121
|
export interface LetterProfile {
|
|
114
122
|
/**
|
|
115
123
|
* Unique identifier for the order profile.
|
|
@@ -202,21 +210,6 @@ export interface LetterProfile {
|
|
|
202
210
|
uploadedPDF?: string;
|
|
203
211
|
}
|
|
204
212
|
|
|
205
|
-
/**
|
|
206
|
-
* Represents a list of Letter Profiles.
|
|
207
|
-
*/
|
|
208
|
-
export interface LetterListResponse {
|
|
209
|
-
data: Array<LetterProfile>;
|
|
210
|
-
|
|
211
|
-
limit: number;
|
|
212
|
-
|
|
213
|
-
object: 'list';
|
|
214
|
-
|
|
215
|
-
skip: number;
|
|
216
|
-
|
|
217
|
-
totalCount: number;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
213
|
export interface LetterDeleteResponse {
|
|
221
214
|
/**
|
|
222
215
|
* Unique identifier for the order profile.
|
|
@@ -395,9 +388,7 @@ export interface LetterUpdateParams {
|
|
|
395
388
|
template?: string;
|
|
396
389
|
}
|
|
397
390
|
|
|
398
|
-
export interface LetterListParams {
|
|
399
|
-
limit?: number;
|
|
400
|
-
|
|
391
|
+
export interface LetterListParams extends SkipLimitParams {
|
|
401
392
|
/**
|
|
402
393
|
* You can supply any string to help narrow down the list of resources. For
|
|
403
394
|
* example, if you pass `"New York"` (quoted), it will return resources that have
|
|
@@ -406,15 +397,13 @@ export interface LetterListParams {
|
|
|
406
397
|
* more details.
|
|
407
398
|
*/
|
|
408
399
|
search?: string;
|
|
409
|
-
|
|
410
|
-
skip?: number;
|
|
411
400
|
}
|
|
412
401
|
|
|
413
402
|
export declare namespace Letters {
|
|
414
403
|
export {
|
|
415
404
|
type LetterProfile as LetterProfile,
|
|
416
|
-
type LetterListResponse as LetterListResponse,
|
|
417
405
|
type LetterDeleteResponse as LetterDeleteResponse,
|
|
406
|
+
type LetterProfilesSkipLimit as LetterProfilesSkipLimit,
|
|
418
407
|
type LetterCreateParams as LetterCreateParams,
|
|
419
408
|
type LetterRetrieveParams as LetterRetrieveParams,
|
|
420
409
|
type LetterUpdateParams as LetterUpdateParams,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ChequeDeleteResponse,
|
|
8
8
|
ChequeListParams,
|
|
9
9
|
ChequeListResponse,
|
|
10
|
+
ChequeListResponsesSkipLimit,
|
|
10
11
|
ChequeProfile,
|
|
11
12
|
ChequeRetrieveParams,
|
|
12
13
|
ChequeUpdateParams,
|
|
@@ -18,8 +19,8 @@ import {
|
|
|
18
19
|
LetterCreateParams,
|
|
19
20
|
LetterDeleteResponse,
|
|
20
21
|
LetterListParams,
|
|
21
|
-
LetterListResponse,
|
|
22
22
|
LetterProfile,
|
|
23
|
+
LetterProfilesSkipLimit,
|
|
23
24
|
LetterRetrieveParams,
|
|
24
25
|
LetterUpdateParams,
|
|
25
26
|
Letters,
|
|
@@ -29,8 +30,8 @@ import {
|
|
|
29
30
|
PostcardCreateParams,
|
|
30
31
|
PostcardDeleteResponse,
|
|
31
32
|
PostcardListParams,
|
|
32
|
-
PostcardListResponse,
|
|
33
33
|
PostcardProfile,
|
|
34
|
+
PostcardProfilesSkipLimit,
|
|
34
35
|
PostcardRetrieveParams,
|
|
35
36
|
PostcardSize,
|
|
36
37
|
PostcardUpdateParams,
|
|
@@ -41,8 +42,8 @@ import {
|
|
|
41
42
|
SelfMailerCreateParams,
|
|
42
43
|
SelfMailerDeleteResponse,
|
|
43
44
|
SelfMailerListParams,
|
|
44
|
-
SelfMailerListResponse,
|
|
45
45
|
SelfMailerProfile,
|
|
46
|
+
SelfMailerProfilesSkipLimit,
|
|
46
47
|
SelfMailerRetrieveParams,
|
|
47
48
|
SelfMailerSize,
|
|
48
49
|
SelfMailerUpdateParams,
|
|
@@ -68,6 +69,7 @@ export declare namespace OrderProfiles {
|
|
|
68
69
|
type CurrencyCode as CurrencyCode,
|
|
69
70
|
type ChequeListResponse as ChequeListResponse,
|
|
70
71
|
type ChequeDeleteResponse as ChequeDeleteResponse,
|
|
72
|
+
type ChequeListResponsesSkipLimit as ChequeListResponsesSkipLimit,
|
|
71
73
|
type ChequeCreateParams as ChequeCreateParams,
|
|
72
74
|
type ChequeRetrieveParams as ChequeRetrieveParams,
|
|
73
75
|
type ChequeUpdateParams as ChequeUpdateParams,
|
|
@@ -77,8 +79,8 @@ export declare namespace OrderProfiles {
|
|
|
77
79
|
export {
|
|
78
80
|
Letters as Letters,
|
|
79
81
|
type LetterProfile as LetterProfile,
|
|
80
|
-
type LetterListResponse as LetterListResponse,
|
|
81
82
|
type LetterDeleteResponse as LetterDeleteResponse,
|
|
83
|
+
type LetterProfilesSkipLimit as LetterProfilesSkipLimit,
|
|
82
84
|
type LetterCreateParams as LetterCreateParams,
|
|
83
85
|
type LetterRetrieveParams as LetterRetrieveParams,
|
|
84
86
|
type LetterUpdateParams as LetterUpdateParams,
|
|
@@ -89,8 +91,8 @@ export declare namespace OrderProfiles {
|
|
|
89
91
|
Postcards as Postcards,
|
|
90
92
|
type PostcardProfile as PostcardProfile,
|
|
91
93
|
type PostcardSize as PostcardSize,
|
|
92
|
-
type PostcardListResponse as PostcardListResponse,
|
|
93
94
|
type PostcardDeleteResponse as PostcardDeleteResponse,
|
|
95
|
+
type PostcardProfilesSkipLimit as PostcardProfilesSkipLimit,
|
|
94
96
|
type PostcardCreateParams as PostcardCreateParams,
|
|
95
97
|
type PostcardRetrieveParams as PostcardRetrieveParams,
|
|
96
98
|
type PostcardUpdateParams as PostcardUpdateParams,
|
|
@@ -101,8 +103,8 @@ export declare namespace OrderProfiles {
|
|
|
101
103
|
SelfMailers as SelfMailers,
|
|
102
104
|
type SelfMailerProfile as SelfMailerProfile,
|
|
103
105
|
type SelfMailerSize as SelfMailerSize,
|
|
104
|
-
type SelfMailerListResponse as SelfMailerListResponse,
|
|
105
106
|
type SelfMailerDeleteResponse as SelfMailerDeleteResponse,
|
|
107
|
+
type SelfMailerProfilesSkipLimit as SelfMailerProfilesSkipLimit,
|
|
106
108
|
type SelfMailerCreateParams as SelfMailerCreateParams,
|
|
107
109
|
type SelfMailerRetrieveParams as SelfMailerRetrieveParams,
|
|
108
110
|
type SelfMailerUpdateParams as SelfMailerUpdateParams,
|