postgrid-node 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/LICENSE +201 -0
- package/README.md +346 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +241 -0
- package/core.d.ts.map +1 -0
- package/core.js +914 -0
- package/core.js.map +1 -0
- package/core.mjs +882 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +47 -0
- package/error.d.ts.map +1 -0
- package/error.js +113 -0
- package/error.js.map +1 -0
- package/error.mjs +97 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +144 -0
- package/index.d.ts +144 -0
- package/index.d.ts.map +1 -0
- package/index.js +161 -0
- package/index.js.map +1 -0
- package/index.mjs +118 -0
- package/index.mjs.map +1 -0
- package/package.json +124 -0
- package/pagination.d.ts +24 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +45 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +41 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/bank-accounts.d.ts +285 -0
- package/resources/bank-accounts.d.ts.map +1 -0
- package/resources/bank-accounts.js +45 -0
- package/resources/bank-accounts.js.map +1 -0
- package/resources/bank-accounts.mjs +40 -0
- package/resources/bank-accounts.mjs.map +1 -0
- package/resources/boxes.d.ts +683 -0
- package/resources/boxes.d.ts.map +1 -0
- package/resources/boxes.js +54 -0
- package/resources/boxes.js.map +1 -0
- package/resources/boxes.mjs +49 -0
- package/resources/boxes.mjs.map +1 -0
- package/resources/campaigns.d.ts +644 -0
- package/resources/campaigns.d.ts.map +1 -0
- package/resources/campaigns.js +67 -0
- package/resources/campaigns.js.map +1 -0
- package/resources/campaigns.mjs +62 -0
- package/resources/campaigns.mjs.map +1 -0
- package/resources/cheques/cheques.d.ts +349 -0
- package/resources/cheques/cheques.d.ts.map +1 -0
- package/resources/cheques/cheques.js +95 -0
- package/resources/cheques/cheques.js.map +1 -0
- package/resources/cheques/cheques.mjs +67 -0
- package/resources/cheques/cheques.mjs.map +1 -0
- package/resources/cheques/index.d.ts +4 -0
- package/resources/cheques/index.d.ts.map +1 -0
- package/resources/cheques/index.js +12 -0
- package/resources/cheques/index.js.map +1 -0
- package/resources/cheques/index.mjs +5 -0
- package/resources/cheques/index.mjs.map +1 -0
- package/resources/cheques/url.d.ts +29 -0
- package/resources/cheques/url.d.ts.map +1 -0
- package/resources/cheques/url.js +20 -0
- package/resources/cheques/url.js.map +1 -0
- package/resources/cheques/url.mjs +16 -0
- package/resources/cheques/url.mjs.map +1 -0
- package/resources/cheques/with-deposit-ready-pdf.d.ts +13 -0
- package/resources/cheques/with-deposit-ready-pdf.d.ts.map +1 -0
- package/resources/cheques/with-deposit-ready-pdf.js +18 -0
- package/resources/cheques/with-deposit-ready-pdf.js.map +1 -0
- package/resources/cheques/with-deposit-ready-pdf.mjs +14 -0
- package/resources/cheques/with-deposit-ready-pdf.mjs.map +1 -0
- package/resources/contacts.d.ts +295 -0
- package/resources/contacts.d.ts.map +1 -0
- package/resources/contacts.js +52 -0
- package/resources/contacts.js.map +1 -0
- package/resources/contacts.mjs +47 -0
- package/resources/contacts.mjs.map +1 -0
- package/resources/index.d.ts +12 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +50 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +13 -0
- package/resources/index.mjs.map +1 -0
- package/resources/letters.d.ts +639 -0
- package/resources/letters.d.ts.map +1 -0
- package/resources/letters.js +55 -0
- package/resources/letters.js.map +1 -0
- package/resources/letters.mjs +50 -0
- package/resources/letters.mjs.map +1 -0
- package/resources/postcards.d.ts +346 -0
- package/resources/postcards.d.ts.map +1 -0
- package/resources/postcards.js +56 -0
- package/resources/postcards.js.map +1 -0
- package/resources/postcards.mjs +51 -0
- package/resources/postcards.mjs.map +1 -0
- package/resources/reports/exports.d.ts +207 -0
- package/resources/reports/exports.d.ts.map +1 -0
- package/resources/reports/exports.js +33 -0
- package/resources/reports/exports.js.map +1 -0
- package/resources/reports/exports.mjs +29 -0
- package/resources/reports/exports.mjs.map +1 -0
- package/resources/reports/index.d.ts +4 -0
- package/resources/reports/index.d.ts.map +1 -0
- package/resources/reports/index.js +12 -0
- package/resources/reports/index.js.map +1 -0
- package/resources/reports/index.mjs +5 -0
- package/resources/reports/index.mjs.map +1 -0
- package/resources/reports/reports.d.ts +245 -0
- package/resources/reports/reports.d.ts.map +1 -0
- package/resources/reports/reports.js +85 -0
- package/resources/reports/reports.js.map +1 -0
- package/resources/reports/reports.mjs +57 -0
- package/resources/reports/reports.mjs.map +1 -0
- package/resources/reports/samples.d.ts +81 -0
- package/resources/reports/samples.d.ts.map +1 -0
- package/resources/reports/samples.js +26 -0
- package/resources/reports/samples.js.map +1 -0
- package/resources/reports/samples.mjs +22 -0
- package/resources/reports/samples.mjs.map +1 -0
- package/resources/self-mailers.d.ts +622 -0
- package/resources/self-mailers.d.ts.map +1 -0
- package/resources/self-mailers.js +45 -0
- package/resources/self-mailers.js.map +1 -0
- package/resources/self-mailers.mjs +40 -0
- package/resources/self-mailers.mjs.map +1 -0
- package/resources/shared.d.ts +147 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/templates.d.ts +126 -0
- package/resources/templates.d.ts.map +1 -0
- package/resources/templates.js +46 -0
- package/resources/templates.js.map +1 -0
- package/resources/templates.mjs +41 -0
- package/resources/templates.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1208 -0
- package/src/error.ts +130 -0
- package/src/index.ts +428 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +69 -0
- package/src/resource.ts +11 -0
- package/src/resources/bank-accounts.ts +382 -0
- package/src/resources/boxes.ts +982 -0
- package/src/resources/campaigns.ts +853 -0
- package/src/resources/cheques/cheques.ts +493 -0
- package/src/resources/cheques/index.ts +12 -0
- package/src/resources/cheques/url.ts +37 -0
- package/src/resources/cheques/with-deposit-ready-pdf.ts +17 -0
- package/src/resources/contacts.ts +387 -0
- package/src/resources/index.ts +102 -0
- package/src/resources/letters.ts +870 -0
- package/src/resources/postcards.ts +548 -0
- package/src/resources/reports/exports.ts +272 -0
- package/src/resources/reports/index.ts +28 -0
- package/src/resources/reports/reports.ts +359 -0
- package/src/resources/reports/samples.ts +109 -0
- package/src/resources/self-mailers.ts +958 -0
- package/src/resources/shared.ts +182 -0
- package/src/resources/templates.ts +184 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import { isRequestOptions } from '../core';
|
|
5
|
+
import * as Core from '../core';
|
|
6
|
+
import { List, type ListParams } from '../pagination';
|
|
7
|
+
|
|
8
|
+
export class Contacts extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a contact. This will also verify the contact's address **if you create
|
|
11
|
+
* it using a live API key**. To sucessfully create a contact, either a
|
|
12
|
+
* `firstName`, a `companyName`, or both are required. You can supply both, but you
|
|
13
|
+
* **cannot** supply neither.
|
|
14
|
+
*
|
|
15
|
+
* You have the option to supply the entire address (except for `countryCode`) via
|
|
16
|
+
* `addressLine1`, in which case PostGrid will parse it automatically. However,
|
|
17
|
+
* this is **not guaranteed to be correct**, so we recommend passing along the
|
|
18
|
+
* structured address fields (`city`, `provinceOrState`, etc) if you have them.
|
|
19
|
+
*
|
|
20
|
+
* _Note that if you create a contact that has identical information to another
|
|
21
|
+
* contact, this will simply update the description of the existing contact and
|
|
22
|
+
* return it. This avoids creating duplicate contacts._
|
|
23
|
+
*/
|
|
24
|
+
create(body: ContactCreateParams, options?: Core.RequestOptions): Core.APIPromise<Contact> {
|
|
25
|
+
return this._client.post('/contacts', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Retrieve a contact.
|
|
30
|
+
*/
|
|
31
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Contact> {
|
|
32
|
+
return this._client.get(`/contacts/${id}`, options);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get a list of contacts.
|
|
37
|
+
*/
|
|
38
|
+
list(query?: ContactListParams, options?: Core.RequestOptions): Core.PagePromise<ContactsList, Contact>;
|
|
39
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ContactsList, Contact>;
|
|
40
|
+
list(
|
|
41
|
+
query: ContactListParams | Core.RequestOptions = {},
|
|
42
|
+
options?: Core.RequestOptions,
|
|
43
|
+
): Core.PagePromise<ContactsList, Contact> {
|
|
44
|
+
if (isRequestOptions(query)) {
|
|
45
|
+
return this.list({}, query);
|
|
46
|
+
}
|
|
47
|
+
return this._client.getAPIList('/contacts', ContactsList, { query, ...options });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Delete a contact. Note that this will not affect orders that were sent to this
|
|
52
|
+
* contact.
|
|
53
|
+
*/
|
|
54
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<ContactDeleteResponse> {
|
|
55
|
+
return this._client.delete(`/contacts/${id}`, options);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export class ContactsList extends List<Contact> {}
|
|
60
|
+
|
|
61
|
+
export interface Contact {
|
|
62
|
+
/**
|
|
63
|
+
* A unique ID prefixed with contact\_
|
|
64
|
+
*/
|
|
65
|
+
id: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The first line of the contact's address.
|
|
69
|
+
*/
|
|
70
|
+
addressLine1: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* One of `verified`, `corrected`, or `failed`.
|
|
74
|
+
*/
|
|
75
|
+
addressStatus: 'verified' | 'corrected' | 'failed';
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The ISO 3611-1 country code of the contact's address.
|
|
79
|
+
*/
|
|
80
|
+
countryCode: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The UTC time at which this resource was created.
|
|
84
|
+
*/
|
|
85
|
+
createdAt: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* `true` if this is a live mode resource else `false`.
|
|
89
|
+
*/
|
|
90
|
+
live: boolean;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Always `contact`.
|
|
94
|
+
*/
|
|
95
|
+
object: 'contact';
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The UTC time at which this resource was last updated.
|
|
99
|
+
*/
|
|
100
|
+
updatedAt: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A series of human-readable errors/warnings that were raised when running the
|
|
104
|
+
* provided address through our address verification.
|
|
105
|
+
*/
|
|
106
|
+
addressErrors?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Second line of the contact's address, if applicable.
|
|
110
|
+
*/
|
|
111
|
+
addressLine2?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The city of the contact's address.
|
|
115
|
+
*/
|
|
116
|
+
city?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Company name of the contact.
|
|
120
|
+
*/
|
|
121
|
+
companyName?: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* An optional string describing this resource. Will be visible in the API and the
|
|
125
|
+
* dashboard.
|
|
126
|
+
*/
|
|
127
|
+
description?: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Email of the contact.
|
|
131
|
+
*/
|
|
132
|
+
email?: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* First name of the contact.
|
|
136
|
+
*/
|
|
137
|
+
firstName?: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* If `true`, PostGrid will force this contact to have an `addressStatus` of
|
|
141
|
+
* `verified` even if our address verification system says otherwise.
|
|
142
|
+
*/
|
|
143
|
+
forceVerifiedStatus?: boolean;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Job title of the contact.
|
|
147
|
+
*/
|
|
148
|
+
jobTitle?: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Last name of the contact.
|
|
152
|
+
*/
|
|
153
|
+
lastName?: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* See the section on Metadata.
|
|
157
|
+
*/
|
|
158
|
+
metadata?: Record<string, unknown>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Phone number of the contact.
|
|
162
|
+
*/
|
|
163
|
+
phoneNumber?: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The postal or ZIP code of the contact's address.
|
|
167
|
+
*/
|
|
168
|
+
postalOrZip?: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Province or state of the contact's address.
|
|
172
|
+
*/
|
|
173
|
+
provinceOrState?: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* If `true`, PostGrid will skip running this contact's address through our address
|
|
177
|
+
* verification system.
|
|
178
|
+
*/
|
|
179
|
+
skipVerification?: boolean;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface ContactDeleteResponse {
|
|
183
|
+
/**
|
|
184
|
+
* A unique ID prefixed with contact\_
|
|
185
|
+
*/
|
|
186
|
+
id: string;
|
|
187
|
+
|
|
188
|
+
deleted: true;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Always `contact`.
|
|
192
|
+
*/
|
|
193
|
+
object: 'contact';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type ContactCreateParams =
|
|
197
|
+
| ContactCreateParams.ContactCreateWithFirstName
|
|
198
|
+
| ContactCreateParams.ContactCreateWithCompanyName;
|
|
199
|
+
|
|
200
|
+
export declare namespace ContactCreateParams {
|
|
201
|
+
export interface ContactCreateWithFirstName {
|
|
202
|
+
/**
|
|
203
|
+
* The first line of the contact's address.
|
|
204
|
+
*/
|
|
205
|
+
addressLine1: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The ISO 3611-1 country code of the contact's address.
|
|
209
|
+
*/
|
|
210
|
+
countryCode: string;
|
|
211
|
+
|
|
212
|
+
firstName: string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Second line of the contact's address, if applicable.
|
|
216
|
+
*/
|
|
217
|
+
addressLine2?: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The city of the contact's address.
|
|
221
|
+
*/
|
|
222
|
+
city?: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Company name of the contact.
|
|
226
|
+
*/
|
|
227
|
+
companyName?: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* An optional string describing this resource. Will be visible in the API and the
|
|
231
|
+
* dashboard.
|
|
232
|
+
*/
|
|
233
|
+
description?: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Email of the contact.
|
|
237
|
+
*/
|
|
238
|
+
email?: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* If `true`, PostGrid will force this contact to have an `addressStatus` of
|
|
242
|
+
* `verified` even if our address verification system says otherwise.
|
|
243
|
+
*/
|
|
244
|
+
forceVerifiedStatus?: boolean;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Job title of the contact.
|
|
248
|
+
*/
|
|
249
|
+
jobTitle?: string;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Last name of the contact.
|
|
253
|
+
*/
|
|
254
|
+
lastName?: string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* See the section on Metadata.
|
|
258
|
+
*/
|
|
259
|
+
metadata?: Record<string, unknown>;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Phone number of the contact.
|
|
263
|
+
*/
|
|
264
|
+
phoneNumber?: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The postal or ZIP code of the contact's address.
|
|
268
|
+
*/
|
|
269
|
+
postalOrZip?: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Province or state of the contact's address.
|
|
273
|
+
*/
|
|
274
|
+
provinceOrState?: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* If `true`, PostGrid will skip running this contact's address through our address
|
|
278
|
+
* verification system.
|
|
279
|
+
*/
|
|
280
|
+
skipVerification?: boolean;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export interface ContactCreateWithCompanyName {
|
|
284
|
+
/**
|
|
285
|
+
* The first line of the contact's address.
|
|
286
|
+
*/
|
|
287
|
+
addressLine1: string;
|
|
288
|
+
|
|
289
|
+
companyName: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The ISO 3611-1 country code of the contact's address.
|
|
293
|
+
*/
|
|
294
|
+
countryCode: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Second line of the contact's address, if applicable.
|
|
298
|
+
*/
|
|
299
|
+
addressLine2?: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* The city of the contact's address.
|
|
303
|
+
*/
|
|
304
|
+
city?: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* An optional string describing this resource. Will be visible in the API and the
|
|
308
|
+
* dashboard.
|
|
309
|
+
*/
|
|
310
|
+
description?: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Email of the contact.
|
|
314
|
+
*/
|
|
315
|
+
email?: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* First name of the contact.
|
|
319
|
+
*/
|
|
320
|
+
firstName?: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* If `true`, PostGrid will force this contact to have an `addressStatus` of
|
|
324
|
+
* `verified` even if our address verification system says otherwise.
|
|
325
|
+
*/
|
|
326
|
+
forceVerifiedStatus?: boolean;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Job title of the contact.
|
|
330
|
+
*/
|
|
331
|
+
jobTitle?: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Last name of the contact.
|
|
335
|
+
*/
|
|
336
|
+
lastName?: string;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* See the section on Metadata.
|
|
340
|
+
*/
|
|
341
|
+
metadata?: Record<string, unknown>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Phone number of the contact.
|
|
345
|
+
*/
|
|
346
|
+
phoneNumber?: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* The postal or ZIP code of the contact's address.
|
|
350
|
+
*/
|
|
351
|
+
postalOrZip?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Province or state of the contact's address.
|
|
355
|
+
*/
|
|
356
|
+
provinceOrState?: string;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* If `true`, PostGrid will skip running this contact's address through our address
|
|
360
|
+
* verification system.
|
|
361
|
+
*/
|
|
362
|
+
skipVerification?: boolean;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface ContactListParams extends ListParams {
|
|
367
|
+
/**
|
|
368
|
+
* You can supply any string to help narrow down the list of resources. For
|
|
369
|
+
* example, if you pass `"New York"` (quoted), it will return resources that have
|
|
370
|
+
* that string present somewhere in their response. Alternatively, you can supply a
|
|
371
|
+
* structured search query. See the documentation on `StructuredSearchQuery` for
|
|
372
|
+
* more details.
|
|
373
|
+
*/
|
|
374
|
+
search?: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
Contacts.ContactsList = ContactsList;
|
|
378
|
+
|
|
379
|
+
export declare namespace Contacts {
|
|
380
|
+
export {
|
|
381
|
+
type Contact as Contact,
|
|
382
|
+
type ContactDeleteResponse as ContactDeleteResponse,
|
|
383
|
+
ContactsList as ContactsList,
|
|
384
|
+
type ContactCreateParams as ContactCreateParams,
|
|
385
|
+
type ContactListParams as ContactListParams,
|
|
386
|
+
};
|
|
387
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export * from './shared';
|
|
4
|
+
export {
|
|
5
|
+
BankAccountsList,
|
|
6
|
+
BankAccounts,
|
|
7
|
+
type BankAccount,
|
|
8
|
+
type BankAccountList,
|
|
9
|
+
type BankAccountDeleteResponse,
|
|
10
|
+
type BankAccountCreateParams,
|
|
11
|
+
type BankAccountListParams,
|
|
12
|
+
} from './bank-accounts';
|
|
13
|
+
export {
|
|
14
|
+
BoxListResponsesList,
|
|
15
|
+
Boxes,
|
|
16
|
+
type BoxCreateResponse,
|
|
17
|
+
type BoxRetrieveResponse,
|
|
18
|
+
type BoxListResponse,
|
|
19
|
+
type BoxCancelResponse,
|
|
20
|
+
type BoxCreateParams,
|
|
21
|
+
type BoxListParams,
|
|
22
|
+
} from './boxes';
|
|
23
|
+
export {
|
|
24
|
+
CampaignListResponsesList,
|
|
25
|
+
Campaigns,
|
|
26
|
+
type CampaignCreateResponse,
|
|
27
|
+
type CampaignRetrieveResponse,
|
|
28
|
+
type CampaignUpdateResponse,
|
|
29
|
+
type CampaignListResponse,
|
|
30
|
+
type CampaignDeleteResponse,
|
|
31
|
+
type CampaignSendResponse,
|
|
32
|
+
type CampaignCreateParams,
|
|
33
|
+
type CampaignUpdateParams,
|
|
34
|
+
type CampaignListParams,
|
|
35
|
+
type CampaignSendParams,
|
|
36
|
+
} from './campaigns';
|
|
37
|
+
export {
|
|
38
|
+
ChequesList,
|
|
39
|
+
Cheques,
|
|
40
|
+
type Cheque,
|
|
41
|
+
type ChequeList,
|
|
42
|
+
type ChequeCreateParams,
|
|
43
|
+
type ChequeListParams,
|
|
44
|
+
} from './cheques/cheques';
|
|
45
|
+
export {
|
|
46
|
+
ContactsList,
|
|
47
|
+
Contacts,
|
|
48
|
+
type Contact,
|
|
49
|
+
type ContactDeleteResponse,
|
|
50
|
+
type ContactCreateParams,
|
|
51
|
+
type ContactListParams,
|
|
52
|
+
} from './contacts';
|
|
53
|
+
export {
|
|
54
|
+
LettersList,
|
|
55
|
+
Letters,
|
|
56
|
+
type Letter,
|
|
57
|
+
type LetterList,
|
|
58
|
+
type LetterURLResponse,
|
|
59
|
+
type LetterCreateParams,
|
|
60
|
+
type LetterListParams,
|
|
61
|
+
} from './letters';
|
|
62
|
+
export {
|
|
63
|
+
PostcardsList,
|
|
64
|
+
Postcards,
|
|
65
|
+
type Postcard,
|
|
66
|
+
type PostcardList,
|
|
67
|
+
type PostcardURLResponse,
|
|
68
|
+
type PostcardCreateParams,
|
|
69
|
+
type PostcardListParams,
|
|
70
|
+
} from './postcards';
|
|
71
|
+
export {
|
|
72
|
+
ReportListResponsesList,
|
|
73
|
+
Reports,
|
|
74
|
+
type ReportCreateResponse,
|
|
75
|
+
type ReportRetrieveResponse,
|
|
76
|
+
type ReportUpdateResponse,
|
|
77
|
+
type ReportListResponse,
|
|
78
|
+
type ReportDeleteResponse,
|
|
79
|
+
type ReportCreateParams,
|
|
80
|
+
type ReportUpdateParams,
|
|
81
|
+
type ReportListParams,
|
|
82
|
+
} from './reports/reports';
|
|
83
|
+
export {
|
|
84
|
+
SelfMailerListResponsesList,
|
|
85
|
+
SelfMailers,
|
|
86
|
+
type SelfMailerCreateResponse,
|
|
87
|
+
type SelfMailerRetrieveResponse,
|
|
88
|
+
type SelfMailerListResponse,
|
|
89
|
+
type SelfMailerCancelResponse,
|
|
90
|
+
type SelfMailerCreateParams,
|
|
91
|
+
type SelfMailerListParams,
|
|
92
|
+
} from './self-mailers';
|
|
93
|
+
export {
|
|
94
|
+
TemplatesList,
|
|
95
|
+
Templates,
|
|
96
|
+
type Template,
|
|
97
|
+
type TemplateList,
|
|
98
|
+
type TemplateDeleteResponse,
|
|
99
|
+
type TemplateCreateParams,
|
|
100
|
+
type TemplateUpdateParams,
|
|
101
|
+
type TemplateListParams,
|
|
102
|
+
} from './templates';
|