postgrid-node 0.1.0-alpha.2 → 0.1.0-alpha.4
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 +60 -0
- package/README.md +26 -40
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +25 -15
- package/core.js.map +1 -1
- package/core.mjs +26 -16
- package/core.mjs.map +1 -1
- package/index.d.mts +21 -8
- package/index.d.ts +21 -8
- package/index.d.ts.map +1 -1
- package/index.js +28 -5
- package/index.js.map +1 -1
- package/index.mjs +28 -5
- package/index.mjs.map +1 -1
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +280 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/package.json +8 -29
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +2 -1
- package/pagination.js.map +1 -1
- package/pagination.mjs +2 -1
- package/pagination.mjs.map +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/bank-accounts.d.ts +61 -4
- package/resources/bank-accounts.d.ts.map +1 -1
- package/resources/bank-accounts.js +25 -0
- package/resources/bank-accounts.js.map +1 -1
- package/resources/bank-accounts.mjs +25 -0
- package/resources/bank-accounts.mjs.map +1 -1
- package/resources/boxes.d.ts +80 -15
- package/resources/boxes.d.ts.map +1 -1
- package/resources/boxes.js +27 -0
- package/resources/boxes.js.map +1 -1
- package/resources/boxes.mjs +27 -0
- package/resources/boxes.mjs.map +1 -1
- package/resources/campaigns.d.ts +22 -8
- package/resources/campaigns.d.ts.map +1 -1
- package/resources/cheques/cheques.d.ts +43 -4
- package/resources/cheques/cheques.d.ts.map +1 -1
- package/resources/cheques/cheques.js +23 -0
- package/resources/cheques/cheques.js.map +1 -1
- package/resources/cheques/cheques.mjs +23 -0
- package/resources/cheques/cheques.mjs.map +1 -1
- package/resources/cheques/url.d.ts +5 -0
- package/resources/cheques/url.d.ts.map +1 -1
- package/resources/cheques/url.js +5 -0
- package/resources/cheques/url.js.map +1 -1
- package/resources/cheques/url.mjs +5 -0
- package/resources/cheques/url.mjs.map +1 -1
- package/resources/cheques/with-deposit-ready-pdf.d.ts +6 -0
- package/resources/cheques/with-deposit-ready-pdf.d.ts.map +1 -1
- package/resources/cheques/with-deposit-ready-pdf.js +6 -0
- package/resources/cheques/with-deposit-ready-pdf.js.map +1 -1
- package/resources/cheques/with-deposit-ready-pdf.mjs +6 -0
- package/resources/cheques/with-deposit-ready-pdf.mjs.map +1 -1
- package/resources/cheques.d.ts +2 -0
- package/resources/cheques.d.ts.map +1 -0
- package/resources/cheques.js +19 -0
- package/resources/cheques.js.map +1 -0
- package/resources/cheques.mjs +3 -0
- package/resources/cheques.mjs.map +1 -0
- package/resources/contacts.d.ts +37 -3
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +20 -0
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +20 -0
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.ts +5 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +12 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/letters.d.ts +50 -6
- package/resources/letters.d.ts.map +1 -1
- package/resources/letters.js +24 -0
- package/resources/letters.js.map +1 -1
- package/resources/letters.mjs +24 -0
- package/resources/letters.mjs.map +1 -1
- package/resources/mailing-list-imports.d.ts +919 -0
- package/resources/mailing-list-imports.d.ts.map +1 -0
- package/resources/mailing-list-imports.js +95 -0
- package/resources/mailing-list-imports.js.map +1 -0
- package/resources/mailing-list-imports.mjs +90 -0
- package/resources/mailing-list-imports.mjs.map +1 -0
- package/resources/mailing-lists.d.ts +398 -0
- package/resources/mailing-lists.d.ts.map +1 -0
- package/resources/mailing-lists.js +101 -0
- package/resources/mailing-lists.js.map +1 -0
- package/resources/mailing-lists.mjs +96 -0
- package/resources/mailing-lists.mjs.map +1 -0
- package/resources/order-profiles/cheques.d.ts +588 -0
- package/resources/order-profiles/cheques.d.ts.map +1 -0
- package/resources/order-profiles/cheques.js +74 -0
- package/resources/order-profiles/cheques.js.map +1 -0
- package/resources/order-profiles/cheques.mjs +69 -0
- package/resources/order-profiles/cheques.mjs.map +1 -0
- package/resources/order-profiles/index.d.ts +6 -0
- package/resources/order-profiles/index.d.ts.map +1 -0
- package/resources/order-profiles/index.js +19 -0
- package/resources/order-profiles/index.js.map +1 -0
- package/resources/order-profiles/index.mjs +7 -0
- package/resources/order-profiles/index.mjs.map +1 -0
- package/resources/order-profiles/letters.d.ts +647 -0
- package/resources/order-profiles/letters.d.ts.map +1 -0
- package/resources/order-profiles/letters.js +80 -0
- package/resources/order-profiles/letters.js.map +1 -0
- package/resources/order-profiles/letters.mjs +75 -0
- package/resources/order-profiles/letters.mjs.map +1 -0
- package/resources/order-profiles/order-profiles.d.ts +22 -0
- package/resources/order-profiles/order-profiles.d.ts.map +1 -0
- package/resources/order-profiles/order-profiles.js +55 -0
- package/resources/order-profiles/order-profiles.js.map +1 -0
- package/resources/order-profiles/order-profiles.mjs +28 -0
- package/resources/order-profiles/order-profiles.mjs.map +1 -0
- package/resources/order-profiles/postcards.d.ts +423 -0
- package/resources/order-profiles/postcards.d.ts.map +1 -0
- package/resources/order-profiles/postcards.js +73 -0
- package/resources/order-profiles/postcards.js.map +1 -0
- package/resources/order-profiles/postcards.mjs +68 -0
- package/resources/order-profiles/postcards.mjs.map +1 -0
- package/resources/order-profiles/self-mailers.d.ts +435 -0
- package/resources/order-profiles/self-mailers.d.ts.map +1 -0
- package/resources/order-profiles/self-mailers.js +75 -0
- package/resources/order-profiles/self-mailers.js.map +1 -0
- package/resources/order-profiles/self-mailers.mjs +70 -0
- package/resources/order-profiles/self-mailers.mjs.map +1 -0
- package/resources/order-profiles.d.ts +2 -0
- package/resources/order-profiles.d.ts.map +1 -0
- package/resources/order-profiles.js +19 -0
- package/resources/order-profiles.js.map +1 -0
- package/resources/order-profiles.mjs +3 -0
- package/resources/order-profiles.mjs.map +1 -0
- package/resources/postcards.d.ts +58 -8
- package/resources/postcards.d.ts.map +1 -1
- package/resources/postcards.js +26 -0
- package/resources/postcards.js.map +1 -1
- package/resources/postcards.mjs +26 -0
- package/resources/postcards.mjs.map +1 -1
- package/resources/reports/exports.d.ts +36 -3
- package/resources/reports/exports.d.ts.map +1 -1
- package/resources/reports/exports.js +27 -0
- package/resources/reports/exports.js.map +1 -1
- package/resources/reports/exports.mjs +27 -0
- package/resources/reports/exports.mjs.map +1 -1
- package/resources/reports/reports.d.ts +76 -8
- package/resources/reports/reports.d.ts.map +1 -1
- package/resources/reports/reports.js +44 -0
- package/resources/reports/reports.js.map +1 -1
- package/resources/reports/reports.mjs +44 -0
- package/resources/reports/reports.mjs.map +1 -1
- package/resources/reports.d.ts +2 -0
- package/resources/reports.d.ts.map +1 -0
- package/resources/reports.js +19 -0
- package/resources/reports.js.map +1 -0
- package/resources/reports.mjs +3 -0
- package/resources/reports.mjs.map +1 -0
- package/resources/self-mailers.d.ts +99 -15
- package/resources/self-mailers.d.ts.map +1 -1
- package/resources/self-mailers.js +38 -0
- package/resources/self-mailers.js.map +1 -1
- package/resources/self-mailers.mjs +38 -0
- package/resources/self-mailers.mjs.map +1 -1
- package/resources/shared.d.ts +6 -2
- package/resources/shared.d.ts.map +1 -1
- package/resources/sub-organizations.d.ts +394 -0
- package/resources/sub-organizations.d.ts.map +1 -0
- package/resources/sub-organizations.js +63 -0
- package/resources/sub-organizations.js.map +1 -0
- package/resources/sub-organizations.mjs +58 -0
- package/resources/sub-organizations.mjs.map +1 -0
- package/resources/templates.d.ts +43 -3
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +26 -0
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +26 -0
- package/resources/templates.mjs.map +1 -1
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +44 -16
- package/src/index.ts +112 -11
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/pagination.ts +6 -1
- package/src/resource.ts +1 -1
- package/src/resources/bank-accounts.ts +57 -4
- package/src/resources/boxes.ts +50 -15
- package/src/resources/campaigns.ts +8 -8
- package/src/resources/cheques/cheques.ts +35 -4
- package/src/resources/cheques/url.ts +5 -0
- package/src/resources/cheques/with-deposit-ready-pdf.ts +6 -0
- package/src/resources/cheques.ts +3 -0
- package/src/resources/contacts.ts +31 -3
- package/src/resources/index.ts +39 -0
- package/src/resources/letters.ts +38 -6
- package/src/resources/mailing-list-imports.ts +1076 -0
- package/src/resources/mailing-lists.ts +511 -0
- package/src/resources/order-profiles/cheques.ts +888 -0
- package/src/resources/order-profiles/index.ts +55 -0
- package/src/resources/order-profiles/letters.ts +956 -0
- package/src/resources/order-profiles/order-profiles.ts +133 -0
- package/src/resources/order-profiles/postcards.ts +694 -0
- package/src/resources/order-profiles/self-mailers.ts +707 -0
- package/src/resources/order-profiles.ts +3 -0
- package/src/resources/postcards.ts +42 -8
- package/src/resources/reports/exports.ts +30 -3
- package/src/resources/reports/reports.ts +60 -8
- package/src/resources/reports.ts +3 -0
- package/src/resources/self-mailers.ts +80 -14
- package/src/resources/shared.ts +2 -2
- package/src/resources/sub-organizations.ts +518 -0
- package/src/resources/templates.ts +37 -3
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
import { List, type ListParams } from "../../pagination.js";
|
|
4
|
+
export declare class Postcards extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new Postcard Profile. Provide either `frontTemplate` and
|
|
7
|
+
* `backTemplate` IDs, or upload a 2-page `pdf`. If providing a `pdf`, the request
|
|
8
|
+
* `Content-Type` must be `multipart/form-data`.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const postcard =
|
|
13
|
+
* await client.orderProfiles.postcards.create({
|
|
14
|
+
* size: '6x4',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
create(params: PostcardCreateParams, options?: Core.RequestOptions): Core.APIPromise<PostcardCreateResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the details of a specific Postcard Profile.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const postcard =
|
|
25
|
+
* await client.orderProfiles.postcards.retrieve('id');
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
retrieve(id: string, query?: PostcardRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<PostcardRetrieveResponse>;
|
|
29
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<PostcardRetrieveResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates specific fields of an existing Postcard Profile. If providing a `pdf`,
|
|
32
|
+
* the request `Content-Type` must be `multipart/form-data`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const postcard =
|
|
37
|
+
* await client.orderProfiles.postcards.update('id');
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(id: string, params: PostcardUpdateParams, options?: Core.RequestOptions): Core.APIPromise<PostcardUpdateResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves a list of Postcard Profiles.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Automatically fetches more pages as needed.
|
|
47
|
+
* for await (const postcardListResponse of client.orderProfiles.postcards.list()) {
|
|
48
|
+
* // ...
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
list(query?: PostcardListParams, options?: Core.RequestOptions): Core.PagePromise<PostcardListResponsesList, PostcardListResponse>;
|
|
53
|
+
list(options?: Core.RequestOptions): Core.PagePromise<PostcardListResponsesList, PostcardListResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes a Postcard Profile.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const postcard =
|
|
60
|
+
* await client.orderProfiles.postcards.delete('id');
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<PostcardDeleteResponse>;
|
|
64
|
+
}
|
|
65
|
+
export declare class PostcardListResponsesList extends List<PostcardListResponse> {
|
|
66
|
+
}
|
|
67
|
+
export interface PostcardCreateResponse {
|
|
68
|
+
/**
|
|
69
|
+
* Unique identifier for the order profile.
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
/**
|
|
73
|
+
* Timestamp when the profile was created.
|
|
74
|
+
*/
|
|
75
|
+
createdAt: string;
|
|
76
|
+
/**
|
|
77
|
+
* Indicates if the profile is associated with the live or test environment.
|
|
78
|
+
*/
|
|
79
|
+
live: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Always `postcard_profile`.
|
|
82
|
+
*/
|
|
83
|
+
object: 'postcard_profile';
|
|
84
|
+
/**
|
|
85
|
+
* Enum representing the supported postcard sizes.
|
|
86
|
+
*/
|
|
87
|
+
size: '6x4' | '9x6' | '11x6';
|
|
88
|
+
/**
|
|
89
|
+
* Timestamp when the profile was last updated.
|
|
90
|
+
*/
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
/**
|
|
93
|
+
* ID of the template for the back side. Required unless `pdf` is provided.
|
|
94
|
+
*/
|
|
95
|
+
backTemplate?: string;
|
|
96
|
+
/**
|
|
97
|
+
* An optional description for the profile. Set to `null` to remove during update.
|
|
98
|
+
*/
|
|
99
|
+
description?: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* ID of the template for the front side. Required unless `pdf` is provided.
|
|
102
|
+
*/
|
|
103
|
+
frontTemplate?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Mailing class (cannot include extra services like `certified` or `registered`
|
|
106
|
+
* for postcards, though).
|
|
107
|
+
*/
|
|
108
|
+
mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
|
|
109
|
+
/**
|
|
110
|
+
* Default merge variables for orders created using this profile.
|
|
111
|
+
*/
|
|
112
|
+
mergeVariables?: {
|
|
113
|
+
[key: string]: unknown;
|
|
114
|
+
} | null;
|
|
115
|
+
/**
|
|
116
|
+
* Optional key-value metadata.
|
|
117
|
+
*/
|
|
118
|
+
metadata?: {
|
|
119
|
+
[key: string]: string;
|
|
120
|
+
} | null;
|
|
121
|
+
/**
|
|
122
|
+
* A temporary, signed URL to view the uploaded PDF content, if any.
|
|
123
|
+
*/
|
|
124
|
+
uploadedPDF?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface PostcardRetrieveResponse {
|
|
127
|
+
/**
|
|
128
|
+
* Unique identifier for the order profile.
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* Timestamp when the profile was created.
|
|
133
|
+
*/
|
|
134
|
+
createdAt: string;
|
|
135
|
+
/**
|
|
136
|
+
* Indicates if the profile is associated with the live or test environment.
|
|
137
|
+
*/
|
|
138
|
+
live: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Always `postcard_profile`.
|
|
141
|
+
*/
|
|
142
|
+
object: 'postcard_profile';
|
|
143
|
+
/**
|
|
144
|
+
* Enum representing the supported postcard sizes.
|
|
145
|
+
*/
|
|
146
|
+
size: '6x4' | '9x6' | '11x6';
|
|
147
|
+
/**
|
|
148
|
+
* Timestamp when the profile was last updated.
|
|
149
|
+
*/
|
|
150
|
+
updatedAt: string;
|
|
151
|
+
/**
|
|
152
|
+
* ID of the template for the back side. Required unless `pdf` is provided.
|
|
153
|
+
*/
|
|
154
|
+
backTemplate?: string;
|
|
155
|
+
/**
|
|
156
|
+
* An optional description for the profile. Set to `null` to remove during update.
|
|
157
|
+
*/
|
|
158
|
+
description?: string | null;
|
|
159
|
+
/**
|
|
160
|
+
* ID of the template for the front side. Required unless `pdf` is provided.
|
|
161
|
+
*/
|
|
162
|
+
frontTemplate?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Mailing class (cannot include extra services like `certified` or `registered`
|
|
165
|
+
* for postcards, though).
|
|
166
|
+
*/
|
|
167
|
+
mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
|
|
168
|
+
/**
|
|
169
|
+
* Default merge variables for orders created using this profile.
|
|
170
|
+
*/
|
|
171
|
+
mergeVariables?: {
|
|
172
|
+
[key: string]: unknown;
|
|
173
|
+
} | null;
|
|
174
|
+
/**
|
|
175
|
+
* Optional key-value metadata.
|
|
176
|
+
*/
|
|
177
|
+
metadata?: {
|
|
178
|
+
[key: string]: string;
|
|
179
|
+
} | null;
|
|
180
|
+
/**
|
|
181
|
+
* A temporary, signed URL to view the uploaded PDF content, if any.
|
|
182
|
+
*/
|
|
183
|
+
uploadedPDF?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface PostcardUpdateResponse {
|
|
186
|
+
/**
|
|
187
|
+
* Unique identifier for the order profile.
|
|
188
|
+
*/
|
|
189
|
+
id: string;
|
|
190
|
+
/**
|
|
191
|
+
* Timestamp when the profile was created.
|
|
192
|
+
*/
|
|
193
|
+
createdAt: string;
|
|
194
|
+
/**
|
|
195
|
+
* Indicates if the profile is associated with the live or test environment.
|
|
196
|
+
*/
|
|
197
|
+
live: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Always `postcard_profile`.
|
|
200
|
+
*/
|
|
201
|
+
object: 'postcard_profile';
|
|
202
|
+
/**
|
|
203
|
+
* Enum representing the supported postcard sizes.
|
|
204
|
+
*/
|
|
205
|
+
size: '6x4' | '9x6' | '11x6';
|
|
206
|
+
/**
|
|
207
|
+
* Timestamp when the profile was last updated.
|
|
208
|
+
*/
|
|
209
|
+
updatedAt: string;
|
|
210
|
+
/**
|
|
211
|
+
* ID of the template for the back side. Required unless `pdf` is provided.
|
|
212
|
+
*/
|
|
213
|
+
backTemplate?: string;
|
|
214
|
+
/**
|
|
215
|
+
* An optional description for the profile. Set to `null` to remove during update.
|
|
216
|
+
*/
|
|
217
|
+
description?: string | null;
|
|
218
|
+
/**
|
|
219
|
+
* ID of the template for the front side. Required unless `pdf` is provided.
|
|
220
|
+
*/
|
|
221
|
+
frontTemplate?: string;
|
|
222
|
+
/**
|
|
223
|
+
* Mailing class (cannot include extra services like `certified` or `registered`
|
|
224
|
+
* for postcards, though).
|
|
225
|
+
*/
|
|
226
|
+
mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
|
|
227
|
+
/**
|
|
228
|
+
* Default merge variables for orders created using this profile.
|
|
229
|
+
*/
|
|
230
|
+
mergeVariables?: {
|
|
231
|
+
[key: string]: unknown;
|
|
232
|
+
} | null;
|
|
233
|
+
/**
|
|
234
|
+
* Optional key-value metadata.
|
|
235
|
+
*/
|
|
236
|
+
metadata?: {
|
|
237
|
+
[key: string]: string;
|
|
238
|
+
} | null;
|
|
239
|
+
/**
|
|
240
|
+
* A temporary, signed URL to view the uploaded PDF content, if any.
|
|
241
|
+
*/
|
|
242
|
+
uploadedPDF?: string;
|
|
243
|
+
}
|
|
244
|
+
export interface PostcardListResponse {
|
|
245
|
+
/**
|
|
246
|
+
* Unique identifier for the order profile.
|
|
247
|
+
*/
|
|
248
|
+
id: string;
|
|
249
|
+
/**
|
|
250
|
+
* Timestamp when the profile was created.
|
|
251
|
+
*/
|
|
252
|
+
createdAt: string;
|
|
253
|
+
/**
|
|
254
|
+
* Indicates if the profile is associated with the live or test environment.
|
|
255
|
+
*/
|
|
256
|
+
live: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Always `postcard_profile`.
|
|
259
|
+
*/
|
|
260
|
+
object: 'postcard_profile';
|
|
261
|
+
/**
|
|
262
|
+
* Enum representing the supported postcard sizes.
|
|
263
|
+
*/
|
|
264
|
+
size: '6x4' | '9x6' | '11x6';
|
|
265
|
+
/**
|
|
266
|
+
* Timestamp when the profile was last updated.
|
|
267
|
+
*/
|
|
268
|
+
updatedAt: string;
|
|
269
|
+
/**
|
|
270
|
+
* ID of the template for the back side. Required unless `pdf` is provided.
|
|
271
|
+
*/
|
|
272
|
+
backTemplate?: string;
|
|
273
|
+
/**
|
|
274
|
+
* An optional description for the profile. Set to `null` to remove during update.
|
|
275
|
+
*/
|
|
276
|
+
description?: string | null;
|
|
277
|
+
/**
|
|
278
|
+
* ID of the template for the front side. Required unless `pdf` is provided.
|
|
279
|
+
*/
|
|
280
|
+
frontTemplate?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Mailing class (cannot include extra services like `certified` or `registered`
|
|
283
|
+
* for postcards, though).
|
|
284
|
+
*/
|
|
285
|
+
mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
|
|
286
|
+
/**
|
|
287
|
+
* Default merge variables for orders created using this profile.
|
|
288
|
+
*/
|
|
289
|
+
mergeVariables?: {
|
|
290
|
+
[key: string]: unknown;
|
|
291
|
+
} | null;
|
|
292
|
+
/**
|
|
293
|
+
* Optional key-value metadata.
|
|
294
|
+
*/
|
|
295
|
+
metadata?: {
|
|
296
|
+
[key: string]: string;
|
|
297
|
+
} | null;
|
|
298
|
+
/**
|
|
299
|
+
* A temporary, signed URL to view the uploaded PDF content, if any.
|
|
300
|
+
*/
|
|
301
|
+
uploadedPDF?: string;
|
|
302
|
+
}
|
|
303
|
+
export interface PostcardDeleteResponse {
|
|
304
|
+
/**
|
|
305
|
+
* Unique identifier for the order profile.
|
|
306
|
+
*/
|
|
307
|
+
id: string;
|
|
308
|
+
deleted: true;
|
|
309
|
+
/**
|
|
310
|
+
* Always `postcard_profile`.
|
|
311
|
+
*/
|
|
312
|
+
object: 'postcard_profile';
|
|
313
|
+
}
|
|
314
|
+
export interface PostcardCreateParams {
|
|
315
|
+
/**
|
|
316
|
+
* Body param: Enum representing the supported postcard sizes.
|
|
317
|
+
*/
|
|
318
|
+
size: '6x4' | '9x6' | '11x6';
|
|
319
|
+
/**
|
|
320
|
+
* Query param: Optional list of related resources to expand in the response.
|
|
321
|
+
*/
|
|
322
|
+
expand?: Array<string>;
|
|
323
|
+
/**
|
|
324
|
+
* Body param: ID of the template for the back side. Required unless `pdf` is
|
|
325
|
+
* provided.
|
|
326
|
+
*/
|
|
327
|
+
backTemplate?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Body param: An optional description for the profile. Set to `null` to remove
|
|
330
|
+
* during update.
|
|
331
|
+
*/
|
|
332
|
+
description?: string | null;
|
|
333
|
+
/**
|
|
334
|
+
* Body param: ID of the template for the front side. Required unless `pdf` is
|
|
335
|
+
* provided.
|
|
336
|
+
*/
|
|
337
|
+
frontTemplate?: string;
|
|
338
|
+
/**
|
|
339
|
+
* Body param: Mailing class (cannot include extra services like `certified` or
|
|
340
|
+
* `registered` for postcards, though).
|
|
341
|
+
*/
|
|
342
|
+
mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
|
|
343
|
+
/**
|
|
344
|
+
* Body param: Default merge variables for orders created using this profile.
|
|
345
|
+
*/
|
|
346
|
+
mergeVariables?: {
|
|
347
|
+
[key: string]: unknown;
|
|
348
|
+
} | null;
|
|
349
|
+
/**
|
|
350
|
+
* Body param: Optional key-value metadata.
|
|
351
|
+
*/
|
|
352
|
+
metadata?: {
|
|
353
|
+
[key: string]: string;
|
|
354
|
+
} | null;
|
|
355
|
+
/**
|
|
356
|
+
* Body param: A 2-page PDF file containing the postcard content (front and back).
|
|
357
|
+
* Cannot be used with `frontTemplate`/`backTemplate`.
|
|
358
|
+
*/
|
|
359
|
+
pdf?: string;
|
|
360
|
+
}
|
|
361
|
+
export interface PostcardRetrieveParams {
|
|
362
|
+
/**
|
|
363
|
+
* Optional list of related resources to expand in the response.
|
|
364
|
+
*/
|
|
365
|
+
expand?: Array<string>;
|
|
366
|
+
}
|
|
367
|
+
export interface PostcardUpdateParams {
|
|
368
|
+
/**
|
|
369
|
+
* Query param: Optional list of related resources to expand in the response.
|
|
370
|
+
*/
|
|
371
|
+
expand?: Array<string>;
|
|
372
|
+
/**
|
|
373
|
+
* Body param: ID of the template for the back side. Required unless `pdf` is
|
|
374
|
+
* provided.
|
|
375
|
+
*/
|
|
376
|
+
backTemplate?: string;
|
|
377
|
+
/**
|
|
378
|
+
* Body param: An optional description for the profile. Set to `null` to remove
|
|
379
|
+
* during update.
|
|
380
|
+
*/
|
|
381
|
+
description?: string | null;
|
|
382
|
+
/**
|
|
383
|
+
* Body param: ID of the template for the front side. Required unless `pdf` is
|
|
384
|
+
* provided.
|
|
385
|
+
*/
|
|
386
|
+
frontTemplate?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Body param: Mailing class (cannot include extra services like `certified` or
|
|
389
|
+
* `registered` for postcards, though).
|
|
390
|
+
*/
|
|
391
|
+
mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
|
|
392
|
+
/**
|
|
393
|
+
* Body param: Default merge variables for orders created using this profile.
|
|
394
|
+
*/
|
|
395
|
+
mergeVariables?: {
|
|
396
|
+
[key: string]: unknown;
|
|
397
|
+
} | null;
|
|
398
|
+
/**
|
|
399
|
+
* Body param: Optional key-value metadata.
|
|
400
|
+
*/
|
|
401
|
+
metadata?: {
|
|
402
|
+
[key: string]: string;
|
|
403
|
+
} | null;
|
|
404
|
+
/**
|
|
405
|
+
* Body param: A 2-page PDF file containing the postcard content (front and back).
|
|
406
|
+
* Cannot be used with `frontTemplate`/`backTemplate`.
|
|
407
|
+
*/
|
|
408
|
+
pdf?: string;
|
|
409
|
+
}
|
|
410
|
+
export interface PostcardListParams extends ListParams {
|
|
411
|
+
/**
|
|
412
|
+
* You can supply any string to help narrow down the list of resources. For
|
|
413
|
+
* example, if you pass `"New York"` (quoted), it will return resources that have
|
|
414
|
+
* that string present somewhere in their response. Alternatively, you can supply a
|
|
415
|
+
* structured search query. See the documentation on `StructuredSearchQuery` for
|
|
416
|
+
* more details.
|
|
417
|
+
*/
|
|
418
|
+
search?: string;
|
|
419
|
+
}
|
|
420
|
+
export declare namespace Postcards {
|
|
421
|
+
export { type PostcardCreateResponse as PostcardCreateResponse, type PostcardRetrieveResponse as PostcardRetrieveResponse, type PostcardUpdateResponse as PostcardUpdateResponse, type PostcardListResponse as PostcardListResponse, type PostcardDeleteResponse as PostcardDeleteResponse, PostcardListResponsesList as PostcardListResponsesList, type PostcardCreateParams as PostcardCreateParams, type PostcardRetrieveParams as PostcardRetrieveParams, type PostcardUpdateParams as PostcardUpdateParams, type PostcardListParams as PostcardListParams, };
|
|
422
|
+
}
|
|
423
|
+
//# sourceMappingURL=postcards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcards.d.ts","sourceRoot":"","sources":["../../src/resources/order-profiles/postcards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,O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ONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PostcardListResponsesList = exports.Postcards = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
const core_1 = require("../../core.js");
|
|
7
|
+
const pagination_1 = require("../../pagination.js");
|
|
8
|
+
class Postcards extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new Postcard Profile. Provide either `frontTemplate` and
|
|
11
|
+
* `backTemplate` IDs, or upload a 2-page `pdf`. If providing a `pdf`, the request
|
|
12
|
+
* `Content-Type` must be `multipart/form-data`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const postcard =
|
|
17
|
+
* await client.orderProfiles.postcards.create({
|
|
18
|
+
* size: '6x4',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(params, options) {
|
|
23
|
+
const { expand, ...body } = params;
|
|
24
|
+
return this._client.post('/order_profiles/postcards', { query: { expand }, body, ...options });
|
|
25
|
+
}
|
|
26
|
+
retrieve(id, query = {}, options) {
|
|
27
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
28
|
+
return this.retrieve(id, {}, query);
|
|
29
|
+
}
|
|
30
|
+
return this._client.get(`/order_profiles/postcards/${id}`, { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Updates specific fields of an existing Postcard Profile. If providing a `pdf`,
|
|
34
|
+
* the request `Content-Type` must be `multipart/form-data`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const postcard =
|
|
39
|
+
* await client.orderProfiles.postcards.update('id');
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
update(id, params, options) {
|
|
43
|
+
const { expand, ...body } = params;
|
|
44
|
+
return this._client.post(`/order_profiles/postcards/${id}`, { query: { expand }, body, ...options });
|
|
45
|
+
}
|
|
46
|
+
list(query = {}, options) {
|
|
47
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
48
|
+
return this.list({}, query);
|
|
49
|
+
}
|
|
50
|
+
return this._client.getAPIList('/order_profiles/postcards', PostcardListResponsesList, {
|
|
51
|
+
query,
|
|
52
|
+
...options,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Deletes a Postcard Profile.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const postcard =
|
|
61
|
+
* await client.orderProfiles.postcards.delete('id');
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
delete(id, options) {
|
|
65
|
+
return this._client.delete(`/order_profiles/postcards/${id}`, options);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.Postcards = Postcards;
|
|
69
|
+
class PostcardListResponsesList extends pagination_1.List {
|
|
70
|
+
}
|
|
71
|
+
exports.PostcardListResponsesList = PostcardListResponsesList;
|
|
72
|
+
Postcards.PostcardListResponsesList = PostcardListResponsesList;
|
|
73
|
+
//# sourceMappingURL=postcards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcards.js","sourceRoot":"","sources":["../../src/resources/order-profiles/postcards.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAE9C,oDAAyD;AAEzD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,MAA4B,EAC5B,OAA6B;QAE7B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAiBD,QAAQ,CACN,EAAU,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|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import { isRequestOptions } from "../../core.mjs";
|
|
4
|
+
import { List } from "../../pagination.mjs";
|
|
5
|
+
export class Postcards extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new Postcard Profile. Provide either `frontTemplate` and
|
|
8
|
+
* `backTemplate` IDs, or upload a 2-page `pdf`. If providing a `pdf`, the request
|
|
9
|
+
* `Content-Type` must be `multipart/form-data`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const postcard =
|
|
14
|
+
* await client.orderProfiles.postcards.create({
|
|
15
|
+
* size: '6x4',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(params, options) {
|
|
20
|
+
const { expand, ...body } = params;
|
|
21
|
+
return this._client.post('/order_profiles/postcards', { query: { expand }, body, ...options });
|
|
22
|
+
}
|
|
23
|
+
retrieve(id, query = {}, options) {
|
|
24
|
+
if (isRequestOptions(query)) {
|
|
25
|
+
return this.retrieve(id, {}, query);
|
|
26
|
+
}
|
|
27
|
+
return this._client.get(`/order_profiles/postcards/${id}`, { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Updates specific fields of an existing Postcard Profile. If providing a `pdf`,
|
|
31
|
+
* the request `Content-Type` must be `multipart/form-data`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const postcard =
|
|
36
|
+
* await client.orderProfiles.postcards.update('id');
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
update(id, params, options) {
|
|
40
|
+
const { expand, ...body } = params;
|
|
41
|
+
return this._client.post(`/order_profiles/postcards/${id}`, { query: { expand }, body, ...options });
|
|
42
|
+
}
|
|
43
|
+
list(query = {}, options) {
|
|
44
|
+
if (isRequestOptions(query)) {
|
|
45
|
+
return this.list({}, query);
|
|
46
|
+
}
|
|
47
|
+
return this._client.getAPIList('/order_profiles/postcards', PostcardListResponsesList, {
|
|
48
|
+
query,
|
|
49
|
+
...options,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Deletes a Postcard Profile.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const postcard =
|
|
58
|
+
* await client.orderProfiles.postcards.delete('id');
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
delete(id, options) {
|
|
62
|
+
return this._client.delete(`/order_profiles/postcards/${id}`, options);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export class PostcardListResponsesList extends List {
|
|
66
|
+
}
|
|
67
|
+
Postcards.PostcardListResponsesList = PostcardListResponsesList;
|
|
68
|
+
//# sourceMappingURL=postcards.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcards.mjs","sourceRoot":"","sources":["../../src/resources/order-profiles/postcards.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,MAA4B,EAC5B,OAA6B;QAE7B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAiBD,QAAQ,CACN,EAAU,EACV,QAAsD,EAAE,EACxD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,QAAQ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