@superdurable/connector-intuit-quickbooks 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +91 -2
- package/dex-connector.json +559 -0
- package/dist/chunk-MBZ23PGI.js +514 -0
- package/dist/connection-yvzYeBut.d.ts +681 -0
- package/dist/index.d.ts +660 -0
- package/dist/index.js +1755 -0
- package/dist/mock.d.ts +190 -0
- package/dist/mock.js +455 -0
- package/package.json +63 -4
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
import * as _superdurable_connectors_sdk_projectconfig from '@superdurable/connectors-sdk/projectconfig';
|
|
2
|
+
import { LoadedProject, CredentialDecoder, CredentialEncoder, SharedCredentialDecoder } from '@superdurable/connectors-sdk/projectconfig';
|
|
3
|
+
import { RefreshingCredentialProvider, SecretString, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
7
|
+
interface Config {
|
|
8
|
+
/** Non-secret QuickBooks Online environment of the connected company, which selects the API host: production sends every request to https://quickbooks.api.intuit.com for a real company authorized with the app's Production keys, and sandbox sends to https://sandbox-quickbooks.api.intuit.com for a sandbox company authorized with the app's Development keys from https://developer.intuit.com. A token from one environment is rejected by the other, so every request then fails with HTTP 401. Blank uses the displayed environment. */
|
|
9
|
+
environment?: string;
|
|
10
|
+
/** Non-secret QuickBooks company ID, also called the realm ID, a number such as 9341453050298464, needed only when Intuit's ID token does not carry it. Intuit returns it in the ID token when you are signed in to the company while authorizing; otherwise find it in QuickBooks Online at https://qbo.intuit.com under Settings > Subscriptions and billing, at the top of the page, or, for a sandbox company, as the Realm ID shown by the OAuth 2.0 Playground at https://developer.intuit.com/app/developer/playground. Blank uses the ID token's company; when both are present they must match. */
|
|
11
|
+
realmId?: string;
|
|
12
|
+
/** Largest complete QuickBooks API response, in bytes, that one call reads. Leave blank to keep the displayed safety limit; enter a positive integer only to change it, for example when invoices carry hundreds of lines. An oversized read selects invalidResponse; an oversized accepted write is confirmed by ID when possible, otherwise it selects uncertain. */
|
|
13
|
+
maxResponseBytes?: number;
|
|
14
|
+
/** Non-secret delay between invoiceChanged Trigger polls of the company's invoices, as a Go duration of at least 5s such as 15s or 2m. Each poll sends one QuickBooks query, or up to ten while catching up, and QuickBooks allows 500 requests per minute per company across this connection's Steps and Triggers, so a shorter interval delivers changes sooner and uses more of that limit. Blank uses the displayed interval. Runtime value in milliseconds. */
|
|
15
|
+
pollIntervalMs?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Runtime schema for manifest configuration. */
|
|
18
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
19
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
20
|
+
realmId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
pollIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
/** Private connector credentials resolved by the host. */
|
|
25
|
+
interface Credentials {
|
|
26
|
+
/** Secret one-hour access token returned by Intuit after consent; Dex derives it automatically and refreshes it five minutes before it expires, so never enter it manually, and blank means Connect has not completed. */
|
|
27
|
+
accessToken: SecretString;
|
|
28
|
+
/** Non-secret Client ID of the Intuit app, copied from https://developer.intuit.com > My Hub > App dashboard > the app > Keys and credentials with Development (sandbox companies) or Production selected and Show credentials turned on; it is an opaque string of letters and digits, and blank means authorization and refresh cannot start. */
|
|
29
|
+
clientId: string;
|
|
30
|
+
/** Secret Client Secret shown beside the Client ID on the same Keys and credentials page at https://developer.intuit.com, for the same Development or Production keys; it is an opaque string of letters and digits. Dex Web stores it only in this credential field and sends it only to https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer, and blank means authorization and refresh cannot start. */
|
|
31
|
+
clientSecret: SecretString;
|
|
32
|
+
/** Secret OpenID Connect ID token returned by Intuit after consent because Dex requests openid; the connector reads only its issuer, audience, and realmid claim, the connected company's ID, so never enter it manually. Blank, or a token without realmid, means the company ID comes from the realmId field. */
|
|
33
|
+
idToken?: SecretString;
|
|
34
|
+
/** Secret refresh token returned by Intuit after consent; Intuit replaces it on a refresh and expires the previous value, and Dex stores the new one atomically, so never enter it manually. A blank token, one unused for 100 days, or one five years old means you must authorize again. */
|
|
35
|
+
refreshToken: SecretString;
|
|
36
|
+
}
|
|
37
|
+
/** Decode private credential fields for the connector. */
|
|
38
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
39
|
+
/** Decode shared credential fields for the connector. */
|
|
40
|
+
declare function decodeSharedCredentials(value: unknown): Credentials;
|
|
41
|
+
/** Host-owned source of private connector credentials. */
|
|
42
|
+
type CredentialSource = RefreshingCredentialProvider<Credentials>;
|
|
43
|
+
/** FindCustomerInput identifies a customer by exactly one of its primary email address or display name. */
|
|
44
|
+
interface FindCustomerInput {
|
|
45
|
+
/** EmailAddress is one bare address such as jane@example.com, matched against PrimaryEmailAddr.
|
|
46
|
+
* QuickBooks does not require email addresses to be unique, so several customers can match. */
|
|
47
|
+
"emailAddress"?: string | undefined;
|
|
48
|
+
/** DisplayName is the customer's exact display name, which QuickBooks keeps unique. */
|
|
49
|
+
"displayName"?: string | undefined;
|
|
50
|
+
/** IncludesInactive also matches customers made inactive, which QuickBooks treats as deleted;
|
|
51
|
+
* false matches only active customers. */
|
|
52
|
+
"includesInactive"?: boolean | undefined;
|
|
53
|
+
}
|
|
54
|
+
/** Customer is one QuickBooks Online customer. Amounts are exact Decimals in the customer's currency. */
|
|
55
|
+
interface Customer {
|
|
56
|
+
/** CustomerID is QuickBooks's Id for the customer, a decimal string such as 58. */
|
|
57
|
+
"customerId": string;
|
|
58
|
+
/** SyncToken is the version QuickBooks requires for an update of this customer. */
|
|
59
|
+
"syncToken"?: string | undefined;
|
|
60
|
+
/** DisplayName is the name QuickBooks shows; it is unique across customers, vendors, and employees. */
|
|
61
|
+
"displayName": string;
|
|
62
|
+
/** GivenName is the contact's first name, when set. */
|
|
63
|
+
"givenName"?: string | undefined;
|
|
64
|
+
/** FamilyName is the contact's last name, when set. */
|
|
65
|
+
"familyName"?: string | undefined;
|
|
66
|
+
/** CompanyName is the customer's company, when set. */
|
|
67
|
+
"companyName"?: string | undefined;
|
|
68
|
+
/** EmailAddress is the primary email address, when set. QuickBooks does not require it to be unique. */
|
|
69
|
+
"emailAddress"?: string | undefined;
|
|
70
|
+
/** Phone is the primary phone number exactly as entered, when set. */
|
|
71
|
+
"phone"?: string | undefined;
|
|
72
|
+
/** IsActive is false for a customer made inactive, which QuickBooks treats as deleted. */
|
|
73
|
+
"isActive": boolean;
|
|
74
|
+
/** Balance is the customer's open balance, when QuickBooks returns it. */
|
|
75
|
+
"balance"?: string | undefined;
|
|
76
|
+
/** CurrencyCode is the customer's ISO 4217 currency, when QuickBooks returns it. */
|
|
77
|
+
"currencyCode"?: string | undefined;
|
|
78
|
+
/** CreatedAt is when the customer was created, in UTC. */
|
|
79
|
+
"createdAt"?: string | null | undefined;
|
|
80
|
+
/** UpdatedAt is when the customer last changed, in UTC. */
|
|
81
|
+
"updatedAt"?: string | null | undefined;
|
|
82
|
+
}
|
|
83
|
+
/** FindCustomerOutput is the lookup result. */
|
|
84
|
+
interface FindCustomerOutput {
|
|
85
|
+
/** EmailAddress echoes the trimmed requested address. */
|
|
86
|
+
"emailAddress"?: string | undefined;
|
|
87
|
+
/** DisplayName echoes the trimmed requested display name. */
|
|
88
|
+
"displayName"?: string | undefined;
|
|
89
|
+
/** Customer is the one matching customer on the found branch, and nil otherwise. */
|
|
90
|
+
"customer"?: Customer | undefined;
|
|
91
|
+
/** Matches lists up to MaxCustomerMatches customers on the ambiguous branch. */
|
|
92
|
+
"matches"?: Array<Customer> | undefined;
|
|
93
|
+
}
|
|
94
|
+
/** CreateCustomerInput describes one new customer. */
|
|
95
|
+
interface CreateCustomerInput {
|
|
96
|
+
/** DisplayName is required and must be unique across QuickBooks customers, vendors, and
|
|
97
|
+
* employees; a name in use selects nameConflict. */
|
|
98
|
+
"displayName": string;
|
|
99
|
+
/** EmailAddress is the primary email address, such as accounts@example.com; blank leaves it unset. */
|
|
100
|
+
"emailAddress"?: string | undefined;
|
|
101
|
+
/** GivenName is the contact's first name, at most 100 characters. */
|
|
102
|
+
"givenName"?: string | undefined;
|
|
103
|
+
/** FamilyName is the contact's last name, at most 100 characters. */
|
|
104
|
+
"familyName"?: string | undefined;
|
|
105
|
+
/** CompanyName is the customer's company, at most 100 characters. */
|
|
106
|
+
"companyName"?: string | undefined;
|
|
107
|
+
/** Phone is the primary phone number exactly as it should appear, at most 30 characters. */
|
|
108
|
+
"phone"?: string | undefined;
|
|
109
|
+
/** CurrencyCode is the customer's ISO 4217 currency when the company uses multicurrency;
|
|
110
|
+
* blank uses the company's home currency. QuickBooks cannot change it later. */
|
|
111
|
+
"currencyCode"?: string | undefined;
|
|
112
|
+
}
|
|
113
|
+
/** CreateCustomerOutput is the created customer. On every other branch Customer is empty and
|
|
114
|
+
* DisplayName echoes the request, so an application can resolve it with findCustomer. */
|
|
115
|
+
interface CreateCustomerOutput {
|
|
116
|
+
/** Customer is the customer QuickBooks created or, for a replayed attempt, created earlier for this Step. */
|
|
117
|
+
"customer": Customer;
|
|
118
|
+
/** DisplayName echoes the requested display name. */
|
|
119
|
+
"displayName": string;
|
|
120
|
+
}
|
|
121
|
+
/** InvoiceLineInput is one item line of a new invoice. */
|
|
122
|
+
interface InvoiceLineInput {
|
|
123
|
+
/** ItemID is the product or service item's Id, which supplies the income account. */
|
|
124
|
+
"itemId": string;
|
|
125
|
+
/** Description is the line text, at most 4000 characters; blank uses the item's description. */
|
|
126
|
+
"description"?: string | undefined;
|
|
127
|
+
/** Quantity is the item quantity, up to five decimal places. */
|
|
128
|
+
"quantity"?: string | undefined;
|
|
129
|
+
/** UnitPrice is the unit price, up to five decimal places. */
|
|
130
|
+
"unitPrice"?: string | undefined;
|
|
131
|
+
/** Amount is the line amount with at most two decimal places. Blank computes Quantity times
|
|
132
|
+
* UnitPrice exactly, rounded half away from zero to two places; both are then required. */
|
|
133
|
+
"amount"?: string | undefined;
|
|
134
|
+
/** TaxCodeID is the line's tax code, such as TAX or NON in a US company; blank uses the item's. */
|
|
135
|
+
"taxCodeId"?: string | undefined;
|
|
136
|
+
/** ServiceDate is the date of service, YYYY-MM-DD; blank leaves it unset. */
|
|
137
|
+
"serviceDate"?: string | undefined;
|
|
138
|
+
}
|
|
139
|
+
/** CreateInvoiceInput describes one new invoice. Amounts are exact Decimals in the customer's currency. */
|
|
140
|
+
interface CreateInvoiceInput {
|
|
141
|
+
/** CustomerID is the invoiced customer's Id, such as from findCustomer or createCustomer. */
|
|
142
|
+
"customerId": string;
|
|
143
|
+
/** Lines are 1 to 100 item lines. */
|
|
144
|
+
"lines": Array<InvoiceLineInput> | null;
|
|
145
|
+
/** TxnDate is the invoice date, YYYY-MM-DD; blank uses today in the company's time zone. */
|
|
146
|
+
"txnDate"?: string | undefined;
|
|
147
|
+
/** DueDate is the payment due date, YYYY-MM-DD; blank applies the customer's or company's terms. */
|
|
148
|
+
"dueDate"?: string | undefined;
|
|
149
|
+
/** DocNumber is the invoice number, at most 21 characters without a backslash, such as an order ID,
|
|
150
|
+
* so listInvoices can search for it; blank lets QuickBooks assign the next number when the company
|
|
151
|
+
* numbers invoices automatically. */
|
|
152
|
+
"docNumber"?: string | undefined;
|
|
153
|
+
/** BillEmail is the address sendInvoice uses by default; blank uses none. */
|
|
154
|
+
"billEmail"?: string | undefined;
|
|
155
|
+
/** CurrencyCode is the invoice's ISO 4217 currency, which must be the customer's; blank uses
|
|
156
|
+
* the customer's currency. */
|
|
157
|
+
"currencyCode"?: string | undefined;
|
|
158
|
+
/** CustomerMemo is the message shown to the customer on the invoice, at most 1000 characters. */
|
|
159
|
+
"customerMemo"?: string | undefined;
|
|
160
|
+
/** PrivateNote is an internal memo, at most 4000 characters, such as the application's order ID. */
|
|
161
|
+
"privateNote"?: string | undefined;
|
|
162
|
+
}
|
|
163
|
+
/** InvoiceLine is one invoice line. Item fields are set only on a SalesItemLineDetail line. */
|
|
164
|
+
interface InvoiceLine {
|
|
165
|
+
/** LineID is QuickBooks's Id for the line, when returned. */
|
|
166
|
+
"lineId"?: string | undefined;
|
|
167
|
+
/** DetailType is QuickBooks's own line type, such as SalesItemLineDetail. */
|
|
168
|
+
"detailType": "DescriptionOnly" | "DiscountLineDetail" | "GroupLineDetail" | "SalesItemLineDetail" | "SubTotalLineDetail" | (string & {});
|
|
169
|
+
/** Description is the line text, when set. */
|
|
170
|
+
"description"?: string | undefined;
|
|
171
|
+
/** Amount is the line amount. */
|
|
172
|
+
"amount"?: string | undefined;
|
|
173
|
+
/** ItemID is the product or service item's Id. */
|
|
174
|
+
"itemId"?: string | undefined;
|
|
175
|
+
/** ItemName is the item's name as QuickBooks returns it. */
|
|
176
|
+
"itemName"?: string | undefined;
|
|
177
|
+
/** Quantity is the item quantity, when set. */
|
|
178
|
+
"quantity"?: string | undefined;
|
|
179
|
+
/** UnitPrice is the item's unit price, when set. */
|
|
180
|
+
"unitPrice"?: string | undefined;
|
|
181
|
+
/** TaxCodeID is the line's tax code, such as TAX or NON in a US company, when set. */
|
|
182
|
+
"taxCodeId"?: string | undefined;
|
|
183
|
+
/** ServiceDate is the date of service, YYYY-MM-DD, when set. */
|
|
184
|
+
"serviceDate"?: string | undefined;
|
|
185
|
+
}
|
|
186
|
+
/** Invoice is one QuickBooks Online invoice. QuickBooks has no invoice status field: Balance is the
|
|
187
|
+
* amount still open, and an invoice is paid when Balance is zero. Amounts are exact Decimals in
|
|
188
|
+
* the invoice's currency. */
|
|
189
|
+
interface Invoice {
|
|
190
|
+
/** InvoiceID is QuickBooks's Id for the invoice, a decimal string such as 130. */
|
|
191
|
+
"invoiceId": string;
|
|
192
|
+
/** SyncToken is the version QuickBooks requires for an update of this invoice. */
|
|
193
|
+
"syncToken"?: string | undefined;
|
|
194
|
+
/** DocNumber is the invoice number, when the company assigns or accepts one. */
|
|
195
|
+
"docNumber"?: string | undefined;
|
|
196
|
+
/** CustomerID is the invoiced customer's Id. */
|
|
197
|
+
"customerId": string;
|
|
198
|
+
/** CustomerName is the customer's display name as QuickBooks returns it. */
|
|
199
|
+
"customerName"?: string | undefined;
|
|
200
|
+
/** TxnDate is the invoice date, YYYY-MM-DD. */
|
|
201
|
+
"txnDate"?: string | undefined;
|
|
202
|
+
/** DueDate is the payment due date, YYYY-MM-DD. */
|
|
203
|
+
"dueDate"?: string | undefined;
|
|
204
|
+
/** CurrencyCode is the invoice's ISO 4217 currency, when QuickBooks returns it. */
|
|
205
|
+
"currencyCode"?: string | undefined;
|
|
206
|
+
/** ExchangeRate is the home-currency rate of a foreign-currency invoice, when returned. */
|
|
207
|
+
"exchangeRate"?: string | undefined;
|
|
208
|
+
/** Lines are the invoice lines in QuickBooks's order, including the SubTotalLineDetail line. */
|
|
209
|
+
"lines": Array<InvoiceLine> | null;
|
|
210
|
+
/** TotalAmount is QuickBooks's TotalAmt, the invoice total including tax. */
|
|
211
|
+
"totalAmount": string;
|
|
212
|
+
/** TotalTax is the tax QuickBooks calculated, when returned. */
|
|
213
|
+
"totalTax"?: string | undefined;
|
|
214
|
+
/** Balance is the amount still due; zero means the invoice is paid. */
|
|
215
|
+
"balance": string;
|
|
216
|
+
/** EmailStatus is NotSet, NeedToSend, or EmailSent, or a newer QuickBooks value. */
|
|
217
|
+
"emailStatus"?: "EmailSent" | "NeedToSend" | "NotSet" | (string & {}) | undefined;
|
|
218
|
+
/** BillEmail is the address QuickBooks sends the invoice to, when set. */
|
|
219
|
+
"billEmail"?: string | undefined;
|
|
220
|
+
/** DeliveredAt is when QuickBooks last delivered the invoice, in UTC, when it has. */
|
|
221
|
+
"deliveredAt"?: string | null | undefined;
|
|
222
|
+
/** CustomerMemo is the message shown to the customer, when set. */
|
|
223
|
+
"customerMemo"?: string | undefined;
|
|
224
|
+
/** PrivateNote is the internal memo, when set. */
|
|
225
|
+
"privateNote"?: string | undefined;
|
|
226
|
+
/** LinkedPaymentIDs are the payments QuickBooks lists against the invoice. */
|
|
227
|
+
"linkedPaymentIds"?: Array<string> | undefined;
|
|
228
|
+
/** CreatedAt is when the invoice was created, in UTC. */
|
|
229
|
+
"createdAt"?: string | null | undefined;
|
|
230
|
+
/** UpdatedAt is when the invoice last changed, in UTC. */
|
|
231
|
+
"updatedAt"?: string | null | undefined;
|
|
232
|
+
}
|
|
233
|
+
/** CreateInvoiceOutput is the created invoice. On every other branch Invoice is empty and
|
|
234
|
+
* DocNumber echoes the request, so an application can reconcile with listInvoices. */
|
|
235
|
+
interface CreateInvoiceOutput {
|
|
236
|
+
/** Invoice is the invoice QuickBooks created or, for a replayed attempt, created earlier for this Step. */
|
|
237
|
+
"invoice": Invoice;
|
|
238
|
+
/** DocNumber echoes the requested document number. */
|
|
239
|
+
"docNumber"?: string | undefined;
|
|
240
|
+
}
|
|
241
|
+
/** GetInvoiceInput identifies one invoice. */
|
|
242
|
+
interface GetInvoiceInput {
|
|
243
|
+
/** InvoiceID is the invoice's QuickBooks Id, such as 130. */
|
|
244
|
+
"invoiceId": string;
|
|
245
|
+
}
|
|
246
|
+
/** ListInvoicesInput filters one page of invoices. Every filter is optional, and filters combine with AND. */
|
|
247
|
+
interface ListInvoicesInput {
|
|
248
|
+
/** CustomerID keeps invoices of one customer, by Id. */
|
|
249
|
+
"customerId"?: string | undefined;
|
|
250
|
+
/** DocNumber keeps invoices whose invoice number equals this value. */
|
|
251
|
+
"docNumber"?: string | undefined;
|
|
252
|
+
/** IsOpenOnly keeps invoices whose Balance is above zero, that is, not fully paid. */
|
|
253
|
+
"isOpenOnly"?: boolean | undefined;
|
|
254
|
+
/** TxnDateFrom keeps invoices dated on or after this date, YYYY-MM-DD. */
|
|
255
|
+
"txnDateFrom"?: string | undefined;
|
|
256
|
+
/** TxnDateTo keeps invoices dated on or before this date, YYYY-MM-DD. */
|
|
257
|
+
"txnDateTo"?: string | undefined;
|
|
258
|
+
/** UpdatedSince keeps invoices created or changed at or after this instant, to the second. */
|
|
259
|
+
"updatedSince"?: string | null | undefined;
|
|
260
|
+
/** StartPosition is the 1-based position of the first invoice to read, such as the previous
|
|
261
|
+
* page's NextStartPosition; zero reads from the first invoice. */
|
|
262
|
+
"startPosition"?: number | undefined;
|
|
263
|
+
/** MaxResults is 1 to 100 invoices; zero uses DefaultInvoicesPerPage. */
|
|
264
|
+
"maxResults"?: number | undefined;
|
|
265
|
+
}
|
|
266
|
+
/** InvoicePage is one page of invoices in ascending creation order. */
|
|
267
|
+
interface InvoicePage {
|
|
268
|
+
/** Invoices are the page's invoices; the list can be empty. */
|
|
269
|
+
"invoices": Array<Invoice> | null;
|
|
270
|
+
/** StartPosition is the 1-based position of the first invoice on the page. */
|
|
271
|
+
"startPosition": number;
|
|
272
|
+
/** MaxResults is the requested page size. */
|
|
273
|
+
"maxResults": number;
|
|
274
|
+
/** HasMorePages reports a full page, after which more invoices can follow. */
|
|
275
|
+
"hasMorePages": boolean;
|
|
276
|
+
/** NextStartPosition is the StartPosition of the next page when HasMorePages is true, and zero otherwise. */
|
|
277
|
+
"nextStartPosition"?: number | undefined;
|
|
278
|
+
}
|
|
279
|
+
/** SendInvoiceInput identifies the invoice to email and, optionally, its recipient. */
|
|
280
|
+
interface SendInvoiceInput {
|
|
281
|
+
/** InvoiceID is the invoice's QuickBooks Id, such as 130. */
|
|
282
|
+
"invoiceId": string;
|
|
283
|
+
/** SendTo is the recipient address; QuickBooks also stores it as the invoice's BillEmail.
|
|
284
|
+
* Blank sends to the invoice's BillEmail, and QuickBooks rejects an invoice without one. */
|
|
285
|
+
"sendTo"?: string | undefined;
|
|
286
|
+
}
|
|
287
|
+
/** RecordPaymentInput describes one received payment applied in full to one invoice. */
|
|
288
|
+
interface RecordPaymentInput {
|
|
289
|
+
/** CustomerID is the paying customer's Id; it must be the invoice's customer. */
|
|
290
|
+
"customerId": string;
|
|
291
|
+
/** InvoiceID is the paid invoice's Id. */
|
|
292
|
+
"invoiceId": string;
|
|
293
|
+
/** Amount is the exact amount received and applied to the invoice, with at most two decimal
|
|
294
|
+
* places, such as the invoice's Balance. */
|
|
295
|
+
"amount": string;
|
|
296
|
+
/** TxnDate is the payment date, YYYY-MM-DD; blank uses today in the company's time zone. */
|
|
297
|
+
"txnDate"?: string | undefined;
|
|
298
|
+
/** PaymentReferenceNumber is QuickBooks's PaymentRefNum, such as a check or charge number, at
|
|
299
|
+
* most 21 characters. */
|
|
300
|
+
"paymentReferenceNumber"?: string | undefined;
|
|
301
|
+
/** DepositAccountID is the bank or other current asset account's Id; blank deposits to
|
|
302
|
+
* QuickBooks's Undeposited Funds account. */
|
|
303
|
+
"depositAccountId"?: string | undefined;
|
|
304
|
+
/** PaymentMethodID is the payment method's Id, such as for Credit Card; blank leaves it unset. */
|
|
305
|
+
"paymentMethodId"?: string | undefined;
|
|
306
|
+
/** CurrencyCode is the payment's ISO 4217 currency, which must be the customer's; blank uses
|
|
307
|
+
* the customer's currency. */
|
|
308
|
+
"currencyCode"?: string | undefined;
|
|
309
|
+
/** PrivateNote is an internal memo, at most 4000 characters. */
|
|
310
|
+
"privateNote"?: string | undefined;
|
|
311
|
+
}
|
|
312
|
+
/** PaymentApplication is the part of a payment applied to one invoice. */
|
|
313
|
+
interface PaymentApplication {
|
|
314
|
+
/** InvoiceID is the paid invoice's Id. */
|
|
315
|
+
"invoiceId": string;
|
|
316
|
+
/** Amount is the amount applied to the invoice. */
|
|
317
|
+
"amount": string;
|
|
318
|
+
}
|
|
319
|
+
/** Payment is one QuickBooks Online received payment. Amounts are exact Decimals in the payment's currency. */
|
|
320
|
+
interface Payment {
|
|
321
|
+
/** PaymentID is QuickBooks's Id for the payment, a decimal string such as 186. */
|
|
322
|
+
"paymentId": string;
|
|
323
|
+
/** SyncToken is the version QuickBooks requires for an update of this payment. */
|
|
324
|
+
"syncToken"?: string | undefined;
|
|
325
|
+
/** CustomerID is the paying customer's Id. */
|
|
326
|
+
"customerId": string;
|
|
327
|
+
/** TxnDate is the payment date, YYYY-MM-DD. */
|
|
328
|
+
"txnDate"?: string | undefined;
|
|
329
|
+
/** TotalAmount is QuickBooks's TotalAmt, the amount received. */
|
|
330
|
+
"totalAmount": string;
|
|
331
|
+
/** UnappliedAmount is the part of the payment not applied to any invoice, when returned. */
|
|
332
|
+
"unappliedAmount"?: string | undefined;
|
|
333
|
+
/** CurrencyCode is the payment's ISO 4217 currency, when QuickBooks returns it. */
|
|
334
|
+
"currencyCode"?: string | undefined;
|
|
335
|
+
/** PaymentReferenceNumber is QuickBooks's PaymentRefNum, such as a check number, when set. */
|
|
336
|
+
"paymentReferenceNumber"?: string | undefined;
|
|
337
|
+
/** DepositAccountID is the account the payment was deposited to, when returned. */
|
|
338
|
+
"depositAccountId"?: string | undefined;
|
|
339
|
+
/** AppliedInvoices are the invoices the payment pays and the amount applied to each. */
|
|
340
|
+
"appliedInvoices"?: Array<PaymentApplication> | undefined;
|
|
341
|
+
/** PrivateNote is the internal memo, when set. */
|
|
342
|
+
"privateNote"?: string | undefined;
|
|
343
|
+
/** CreatedAt is when the payment was created, in UTC. */
|
|
344
|
+
"createdAt"?: string | null | undefined;
|
|
345
|
+
/** UpdatedAt is when the payment last changed, in UTC. */
|
|
346
|
+
"updatedAt"?: string | null | undefined;
|
|
347
|
+
}
|
|
348
|
+
/** Runtime validator for FindCustomerInput. */
|
|
349
|
+
declare const FindCustomerInputSchema: z.ZodObject<{
|
|
350
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
351
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
352
|
+
includesInactive: z.ZodOptional<z.ZodBoolean>;
|
|
353
|
+
}, z.core.$strict>;
|
|
354
|
+
/** Runtime validator for Customer. */
|
|
355
|
+
declare const CustomerSchema: z.ZodObject<{
|
|
356
|
+
customerId: z.ZodString;
|
|
357
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
358
|
+
displayName: z.ZodString;
|
|
359
|
+
givenName: z.ZodOptional<z.ZodString>;
|
|
360
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
361
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
362
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
363
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
364
|
+
isActive: z.ZodBoolean;
|
|
365
|
+
balance: z.ZodOptional<z.ZodString>;
|
|
366
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
367
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
368
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
369
|
+
}, z.core.$strict>;
|
|
370
|
+
/** Runtime validator for FindCustomerOutput. */
|
|
371
|
+
declare const FindCustomerOutputSchema: z.ZodObject<{
|
|
372
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
373
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
374
|
+
customer: z.ZodOptional<z.ZodObject<{
|
|
375
|
+
customerId: z.ZodString;
|
|
376
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
377
|
+
displayName: z.ZodString;
|
|
378
|
+
givenName: z.ZodOptional<z.ZodString>;
|
|
379
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
380
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
381
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
382
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
383
|
+
isActive: z.ZodBoolean;
|
|
384
|
+
balance: z.ZodOptional<z.ZodString>;
|
|
385
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
386
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
387
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
388
|
+
}, z.core.$strict>>;
|
|
389
|
+
matches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
390
|
+
customerId: z.ZodString;
|
|
391
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
392
|
+
displayName: z.ZodString;
|
|
393
|
+
givenName: z.ZodOptional<z.ZodString>;
|
|
394
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
395
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
396
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
397
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
398
|
+
isActive: z.ZodBoolean;
|
|
399
|
+
balance: z.ZodOptional<z.ZodString>;
|
|
400
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
401
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
402
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
403
|
+
}, z.core.$strict>>>;
|
|
404
|
+
}, z.core.$strict>;
|
|
405
|
+
/** Runtime validator for CreateCustomerInput. */
|
|
406
|
+
declare const CreateCustomerInputSchema: z.ZodObject<{
|
|
407
|
+
displayName: z.ZodString;
|
|
408
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
409
|
+
givenName: z.ZodOptional<z.ZodString>;
|
|
410
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
411
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
412
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
413
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
414
|
+
}, z.core.$strict>;
|
|
415
|
+
/** Runtime validator for CreateCustomerOutput. */
|
|
416
|
+
declare const CreateCustomerOutputSchema: z.ZodObject<{
|
|
417
|
+
customer: z.ZodObject<{
|
|
418
|
+
customerId: z.ZodString;
|
|
419
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
420
|
+
displayName: z.ZodString;
|
|
421
|
+
givenName: z.ZodOptional<z.ZodString>;
|
|
422
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
423
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
424
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
425
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
426
|
+
isActive: z.ZodBoolean;
|
|
427
|
+
balance: z.ZodOptional<z.ZodString>;
|
|
428
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
429
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
430
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
431
|
+
}, z.core.$strict>;
|
|
432
|
+
displayName: z.ZodString;
|
|
433
|
+
}, z.core.$strict>;
|
|
434
|
+
/** Runtime validator for InvoiceLineInput. */
|
|
435
|
+
declare const InvoiceLineInputSchema: z.ZodObject<{
|
|
436
|
+
itemId: z.ZodString;
|
|
437
|
+
description: z.ZodOptional<z.ZodString>;
|
|
438
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
439
|
+
unitPrice: z.ZodOptional<z.ZodString>;
|
|
440
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
441
|
+
taxCodeId: z.ZodOptional<z.ZodString>;
|
|
442
|
+
serviceDate: z.ZodOptional<z.ZodString>;
|
|
443
|
+
}, z.core.$strict>;
|
|
444
|
+
/** Runtime validator for CreateInvoiceInput. */
|
|
445
|
+
declare const CreateInvoiceInputSchema: z.ZodObject<{
|
|
446
|
+
customerId: z.ZodString;
|
|
447
|
+
lines: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
448
|
+
itemId: z.ZodString;
|
|
449
|
+
description: z.ZodOptional<z.ZodString>;
|
|
450
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
451
|
+
unitPrice: z.ZodOptional<z.ZodString>;
|
|
452
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
453
|
+
taxCodeId: z.ZodOptional<z.ZodString>;
|
|
454
|
+
serviceDate: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strict>>>;
|
|
456
|
+
txnDate: z.ZodOptional<z.ZodString>;
|
|
457
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
458
|
+
docNumber: z.ZodOptional<z.ZodString>;
|
|
459
|
+
billEmail: z.ZodOptional<z.ZodString>;
|
|
460
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
461
|
+
customerMemo: z.ZodOptional<z.ZodString>;
|
|
462
|
+
privateNote: z.ZodOptional<z.ZodString>;
|
|
463
|
+
}, z.core.$strict>;
|
|
464
|
+
/** Runtime validator for InvoiceLine. */
|
|
465
|
+
declare const InvoiceLineSchema: z.ZodObject<{
|
|
466
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
467
|
+
detailType: z.ZodString;
|
|
468
|
+
description: z.ZodOptional<z.ZodString>;
|
|
469
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
470
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
471
|
+
itemName: z.ZodOptional<z.ZodString>;
|
|
472
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
473
|
+
unitPrice: z.ZodOptional<z.ZodString>;
|
|
474
|
+
taxCodeId: z.ZodOptional<z.ZodString>;
|
|
475
|
+
serviceDate: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strict>;
|
|
477
|
+
/** Runtime validator for Invoice. */
|
|
478
|
+
declare const InvoiceSchema: z.ZodObject<{
|
|
479
|
+
invoiceId: z.ZodString;
|
|
480
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
481
|
+
docNumber: z.ZodOptional<z.ZodString>;
|
|
482
|
+
customerId: z.ZodString;
|
|
483
|
+
customerName: z.ZodOptional<z.ZodString>;
|
|
484
|
+
txnDate: z.ZodOptional<z.ZodString>;
|
|
485
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
486
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
487
|
+
exchangeRate: z.ZodOptional<z.ZodString>;
|
|
488
|
+
lines: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
489
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
490
|
+
detailType: z.ZodString;
|
|
491
|
+
description: z.ZodOptional<z.ZodString>;
|
|
492
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
493
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
494
|
+
itemName: z.ZodOptional<z.ZodString>;
|
|
495
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
496
|
+
unitPrice: z.ZodOptional<z.ZodString>;
|
|
497
|
+
taxCodeId: z.ZodOptional<z.ZodString>;
|
|
498
|
+
serviceDate: z.ZodOptional<z.ZodString>;
|
|
499
|
+
}, z.core.$strict>>>;
|
|
500
|
+
totalAmount: z.ZodString;
|
|
501
|
+
totalTax: z.ZodOptional<z.ZodString>;
|
|
502
|
+
balance: z.ZodString;
|
|
503
|
+
emailStatus: z.ZodOptional<z.ZodString>;
|
|
504
|
+
billEmail: z.ZodOptional<z.ZodString>;
|
|
505
|
+
deliveredAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
506
|
+
customerMemo: z.ZodOptional<z.ZodString>;
|
|
507
|
+
privateNote: z.ZodOptional<z.ZodString>;
|
|
508
|
+
linkedPaymentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
509
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
510
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
511
|
+
}, z.core.$strict>;
|
|
512
|
+
/** Runtime validator for CreateInvoiceOutput. */
|
|
513
|
+
declare const CreateInvoiceOutputSchema: z.ZodObject<{
|
|
514
|
+
invoice: z.ZodObject<{
|
|
515
|
+
invoiceId: z.ZodString;
|
|
516
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
517
|
+
docNumber: z.ZodOptional<z.ZodString>;
|
|
518
|
+
customerId: z.ZodString;
|
|
519
|
+
customerName: z.ZodOptional<z.ZodString>;
|
|
520
|
+
txnDate: z.ZodOptional<z.ZodString>;
|
|
521
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
522
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
523
|
+
exchangeRate: z.ZodOptional<z.ZodString>;
|
|
524
|
+
lines: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
525
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
526
|
+
detailType: z.ZodString;
|
|
527
|
+
description: z.ZodOptional<z.ZodString>;
|
|
528
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
529
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
530
|
+
itemName: z.ZodOptional<z.ZodString>;
|
|
531
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
532
|
+
unitPrice: z.ZodOptional<z.ZodString>;
|
|
533
|
+
taxCodeId: z.ZodOptional<z.ZodString>;
|
|
534
|
+
serviceDate: z.ZodOptional<z.ZodString>;
|
|
535
|
+
}, z.core.$strict>>>;
|
|
536
|
+
totalAmount: z.ZodString;
|
|
537
|
+
totalTax: z.ZodOptional<z.ZodString>;
|
|
538
|
+
balance: z.ZodString;
|
|
539
|
+
emailStatus: z.ZodOptional<z.ZodString>;
|
|
540
|
+
billEmail: z.ZodOptional<z.ZodString>;
|
|
541
|
+
deliveredAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
542
|
+
customerMemo: z.ZodOptional<z.ZodString>;
|
|
543
|
+
privateNote: z.ZodOptional<z.ZodString>;
|
|
544
|
+
linkedPaymentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
545
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
546
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
547
|
+
}, z.core.$strict>;
|
|
548
|
+
docNumber: z.ZodOptional<z.ZodString>;
|
|
549
|
+
}, z.core.$strict>;
|
|
550
|
+
/** Runtime validator for GetInvoiceInput. */
|
|
551
|
+
declare const GetInvoiceInputSchema: z.ZodObject<{
|
|
552
|
+
invoiceId: z.ZodString;
|
|
553
|
+
}, z.core.$strict>;
|
|
554
|
+
/** Runtime validator for ListInvoicesInput. */
|
|
555
|
+
declare const ListInvoicesInputSchema: z.ZodObject<{
|
|
556
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
557
|
+
docNumber: z.ZodOptional<z.ZodString>;
|
|
558
|
+
isOpenOnly: z.ZodOptional<z.ZodBoolean>;
|
|
559
|
+
txnDateFrom: z.ZodOptional<z.ZodString>;
|
|
560
|
+
txnDateTo: z.ZodOptional<z.ZodString>;
|
|
561
|
+
updatedSince: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
562
|
+
startPosition: z.ZodOptional<z.ZodNumber>;
|
|
563
|
+
maxResults: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
}, z.core.$strict>;
|
|
565
|
+
/** Runtime validator for InvoicePage. */
|
|
566
|
+
declare const InvoicePageSchema: z.ZodObject<{
|
|
567
|
+
invoices: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
568
|
+
invoiceId: z.ZodString;
|
|
569
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
570
|
+
docNumber: z.ZodOptional<z.ZodString>;
|
|
571
|
+
customerId: z.ZodString;
|
|
572
|
+
customerName: z.ZodOptional<z.ZodString>;
|
|
573
|
+
txnDate: z.ZodOptional<z.ZodString>;
|
|
574
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
575
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
576
|
+
exchangeRate: z.ZodOptional<z.ZodString>;
|
|
577
|
+
lines: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
578
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
579
|
+
detailType: z.ZodString;
|
|
580
|
+
description: z.ZodOptional<z.ZodString>;
|
|
581
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
582
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
583
|
+
itemName: z.ZodOptional<z.ZodString>;
|
|
584
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
585
|
+
unitPrice: z.ZodOptional<z.ZodString>;
|
|
586
|
+
taxCodeId: z.ZodOptional<z.ZodString>;
|
|
587
|
+
serviceDate: z.ZodOptional<z.ZodString>;
|
|
588
|
+
}, z.core.$strict>>>;
|
|
589
|
+
totalAmount: z.ZodString;
|
|
590
|
+
totalTax: z.ZodOptional<z.ZodString>;
|
|
591
|
+
balance: z.ZodString;
|
|
592
|
+
emailStatus: z.ZodOptional<z.ZodString>;
|
|
593
|
+
billEmail: z.ZodOptional<z.ZodString>;
|
|
594
|
+
deliveredAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
595
|
+
customerMemo: z.ZodOptional<z.ZodString>;
|
|
596
|
+
privateNote: z.ZodOptional<z.ZodString>;
|
|
597
|
+
linkedPaymentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
598
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
599
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
600
|
+
}, z.core.$strict>>>;
|
|
601
|
+
startPosition: z.ZodNumber;
|
|
602
|
+
maxResults: z.ZodNumber;
|
|
603
|
+
hasMorePages: z.ZodBoolean;
|
|
604
|
+
nextStartPosition: z.ZodOptional<z.ZodNumber>;
|
|
605
|
+
}, z.core.$strict>;
|
|
606
|
+
/** Runtime validator for SendInvoiceInput. */
|
|
607
|
+
declare const SendInvoiceInputSchema: z.ZodObject<{
|
|
608
|
+
invoiceId: z.ZodString;
|
|
609
|
+
sendTo: z.ZodOptional<z.ZodString>;
|
|
610
|
+
}, z.core.$strict>;
|
|
611
|
+
/** Runtime validator for RecordPaymentInput. */
|
|
612
|
+
declare const RecordPaymentInputSchema: z.ZodObject<{
|
|
613
|
+
customerId: z.ZodString;
|
|
614
|
+
invoiceId: z.ZodString;
|
|
615
|
+
amount: z.ZodString;
|
|
616
|
+
txnDate: z.ZodOptional<z.ZodString>;
|
|
617
|
+
paymentReferenceNumber: z.ZodOptional<z.ZodString>;
|
|
618
|
+
depositAccountId: z.ZodOptional<z.ZodString>;
|
|
619
|
+
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
620
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
621
|
+
privateNote: z.ZodOptional<z.ZodString>;
|
|
622
|
+
}, z.core.$strict>;
|
|
623
|
+
/** Runtime validator for PaymentApplication. */
|
|
624
|
+
declare const PaymentApplicationSchema: z.ZodObject<{
|
|
625
|
+
invoiceId: z.ZodString;
|
|
626
|
+
amount: z.ZodString;
|
|
627
|
+
}, z.core.$strict>;
|
|
628
|
+
/** Runtime validator for Payment. */
|
|
629
|
+
declare const PaymentSchema: z.ZodObject<{
|
|
630
|
+
paymentId: z.ZodString;
|
|
631
|
+
syncToken: z.ZodOptional<z.ZodString>;
|
|
632
|
+
customerId: z.ZodString;
|
|
633
|
+
txnDate: z.ZodOptional<z.ZodString>;
|
|
634
|
+
totalAmount: z.ZodString;
|
|
635
|
+
unappliedAmount: z.ZodOptional<z.ZodString>;
|
|
636
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
637
|
+
paymentReferenceNumber: z.ZodOptional<z.ZodString>;
|
|
638
|
+
depositAccountId: z.ZodOptional<z.ZodString>;
|
|
639
|
+
appliedInvoices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
640
|
+
invoiceId: z.ZodString;
|
|
641
|
+
amount: z.ZodString;
|
|
642
|
+
}, z.core.$strict>>>;
|
|
643
|
+
privateNote: z.ZodOptional<z.ZodString>;
|
|
644
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
645
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
646
|
+
}, z.core.$strict>;
|
|
647
|
+
|
|
648
|
+
/** Typed operations supplied by a client or mock. */
|
|
649
|
+
interface Operations {
|
|
650
|
+
/** Invoke findCustomer through this connection. */
|
|
651
|
+
findCustomer(): Query<FindCustomerInput, FindCustomerOutput>;
|
|
652
|
+
/** Invoke createCustomer through this connection. */
|
|
653
|
+
createCustomer(): Mutation<CreateCustomerInput, CreateCustomerOutput>;
|
|
654
|
+
/** Invoke createInvoice through this connection. */
|
|
655
|
+
createInvoice(): Mutation<CreateInvoiceInput, CreateInvoiceOutput>;
|
|
656
|
+
/** Invoke getInvoice through this connection. */
|
|
657
|
+
getInvoice(): Query<GetInvoiceInput, Invoice>;
|
|
658
|
+
/** Invoke listInvoices through this connection. */
|
|
659
|
+
listInvoices(): Query<ListInvoicesInput, InvoicePage>;
|
|
660
|
+
/** Invoke sendInvoice through this connection. */
|
|
661
|
+
sendInvoice(): Mutation<SendInvoiceInput, Invoice>;
|
|
662
|
+
/** Invoke recordPayment through this connection. */
|
|
663
|
+
recordPayment(): Mutation<RecordPaymentInput, Payment>;
|
|
664
|
+
}
|
|
665
|
+
/** Named connector connection kept outside Flow state. */
|
|
666
|
+
declare class Connection<BoundOperations = Operations> {
|
|
667
|
+
/** Stable provider and connection name. */
|
|
668
|
+
readonly reference: ConnectionRef;
|
|
669
|
+
/** Bound provider operations. */
|
|
670
|
+
readonly operations: BoundOperations;
|
|
671
|
+
/** Validate a reference and bind operations. */
|
|
672
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
673
|
+
}
|
|
674
|
+
/** Bind a client to a named connection. */
|
|
675
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
676
|
+
/** Bind scripted operations to a named connection. */
|
|
677
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
678
|
+
/** Bind renewable project credentials, including shared connection material. */
|
|
679
|
+
declare function newProjectCredentialProvider<Credentials>(project: LoadedProject, connectionName: string, decode: CredentialDecoder<Credentials>, encode: CredentialEncoder<Credentials>, decodeShared: SharedCredentialDecoder<Credentials>): _superdurable_connectors_sdk_projectconfig.RefreshingCredentialProvider<Credentials>;
|
|
680
|
+
|
|
681
|
+
export { type PaymentApplication as A, PaymentApplicationSchema as B, type CreateCustomerInput as C, PaymentSchema as D, RecordPaymentInputSchema as E, type FindCustomerInput as F, type GetInvoiceInput as G, SendInvoiceInputSchema as H, type Invoice as I, decodeCredentials as J, decodeSharedCredentials as K, type ListInvoicesInput as L, newConnection as M, newConnectionWithOperations as N, type Operations as O, type Payment as P, newProjectCredentialProvider as Q, type RecordPaymentInput as R, type SendInvoiceInput as S, type FindCustomerOutput as a, type CreateCustomerOutput as b, type CreateInvoiceInput as c, type CreateInvoiceOutput as d, type InvoicePage as e, type Config as f, type CredentialSource as g, Connection as h, ConfigSchema as i, CreateCustomerInputSchema as j, CreateCustomerOutputSchema as k, CreateInvoiceInputSchema as l, CreateInvoiceOutputSchema as m, type Credentials as n, type Customer as o, CustomerSchema as p, FindCustomerInputSchema as q, FindCustomerOutputSchema as r, GetInvoiceInputSchema as s, type InvoiceLine as t, type InvoiceLineInput as u, InvoiceLineInputSchema as v, InvoiceLineSchema as w, InvoicePageSchema as x, InvoiceSchema as y, ListInvoicesInputSchema as z };
|