@superdurable/connector-intuit-quickbooks 0.0.0-stage → 0.1.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.
@@ -0,0 +1,456 @@
1
+ import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
2
+ import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
3
+ import { Query, Call, QueryAttempt, Mutation, MutationAttempt, Failure, ReceiptDraft, MutationStepConfig, MutationResult, QueryStepConfig, QueryResult, MutationStep, QueryStep, MutationDefinition, QueryDefinition } from '@superdurable/connectors-sdk';
4
+ import { F as FindCustomerInput, a as FindCustomerOutput, C as CreateCustomerInput, b as CreateCustomerOutput, c as CreateInvoiceInput, d as CreateInvoiceOutput, G as GetInvoiceInput, I as Invoice, L as ListInvoicesInput, e as InvoicePage, S as SendInvoiceInput, R as RecordPaymentInput, P as Payment, f as Config, g as CredentialSource, h as Connection, O as Operations } from './connection-DfEHGjAp.js';
5
+ export { i as ConfigSchema, j as CreateCustomerInputSchema, k as CreateCustomerOutputSchema, l as CreateInvoiceInputSchema, m as CreateInvoiceOutputSchema, n as Credentials, o as Customer, p as CustomerSchema, q as FindCustomerInputSchema, r as FindCustomerOutputSchema, s as GetInvoiceInputSchema, t as InvoiceLine, u as InvoiceLineInput, v as InvoiceLineInputSchema, w as InvoiceLineSchema, x as InvoicePageSchema, y as InvoiceSchema, z as ListInvoicesInputSchema, A as PaymentApplication, B as PaymentApplicationSchema, D as PaymentSchema, E as RecordPaymentInputSchema, H as SendInvoiceInputSchema, J as decodeCredentials, K as decodeSharedCredentials, M as newConnection, N as newConnectionWithOperations, Q as newProjectCredentialProvider } from './connection-DfEHGjAp.js';
6
+ import { StepTarget } from '@superdurable/dex';
7
+ import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
8
+ import 'zod';
9
+
10
+ /** Resolve one customer by exact email or display name. */
11
+ declare class FindCustomerOperation implements Query<FindCustomerInput, FindCustomerOutput> {
12
+ private readonly client;
13
+ /** Bind one client. */ constructor(client: QuickBooksClient);
14
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
15
+ /** Execute one bounded QuickBooks customer query. */
16
+ invoke(call: Call, input: FindCustomerInput): Promise<QueryAttempt<FindCustomerOutput>>;
17
+ }
18
+ /** Read one invoice by its QuickBooks ID. */
19
+ declare class GetInvoiceOperation implements Query<GetInvoiceInput, Invoice> {
20
+ private readonly client;
21
+ /** Bind one client. */ constructor(client: QuickBooksClient);
22
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
23
+ /** Validate and read one invoice. */
24
+ invoke(call: Call, input: GetInvoiceInput): Promise<QueryAttempt<Invoice>>;
25
+ }
26
+ /** Read one bounded page of invoices. */
27
+ declare class ListInvoicesOperation implements Query<ListInvoicesInput, InvoicePage> {
28
+ private readonly client;
29
+ /** Bind one client. */ constructor(client: QuickBooksClient);
30
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
31
+ /** Build and execute the invoice page query. */
32
+ invoke(call: Call, input: ListInvoicesInput): Promise<QueryAttempt<InvoicePage>>;
33
+ }
34
+ /** Create one QuickBooks customer under a stable requestid. */
35
+ declare class CreateCustomerOperation implements Mutation<CreateCustomerInput, CreateCustomerOutput> {
36
+ private readonly client;
37
+ /** Bind one client. */ constructor(client: QuickBooksClient);
38
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
39
+ /** Use Dex Call ID as QuickBooks requestid. */ idempotencyKey(callID: string): string;
40
+ /** Validate, create, and confirm an accepted write if necessary. */
41
+ invoke(call: Call, input: CreateCustomerInput): Promise<MutationAttempt<CreateCustomerOutput>>;
42
+ }
43
+ /** Create one invoice with exact decimal line amounts. */
44
+ declare class CreateInvoiceOperation implements Mutation<CreateInvoiceInput, CreateInvoiceOutput> {
45
+ private readonly client;
46
+ /** Bind one client. */ constructor(client: QuickBooksClient);
47
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
48
+ /** Use Dex Call ID as QuickBooks requestid. */ idempotencyKey(callID: string): string;
49
+ /** Validate, create, and read back an accepted invoice if necessary. */
50
+ invoke(call: Call, input: CreateInvoiceInput): Promise<MutationAttempt<CreateInvoiceOutput>>;
51
+ }
52
+ /** Email one invoice under the Step requestid. */
53
+ declare class SendInvoiceOperation implements Mutation<SendInvoiceInput, Invoice> {
54
+ private readonly client;
55
+ /** Bind one client. */ constructor(client: QuickBooksClient);
56
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
57
+ /** Use Dex Call ID as QuickBooks requestid. */ idempotencyKey(callID: string): string;
58
+ /** Send and confirm one invoice delivery. */
59
+ invoke(call: Call, input: SendInvoiceInput): Promise<MutationAttempt<Invoice>>;
60
+ }
61
+ /** Record one invoice payment under the Step requestid. */
62
+ declare class RecordPaymentOperation implements Mutation<RecordPaymentInput, Payment> {
63
+ private readonly client;
64
+ /** Bind one client. */ constructor(client: QuickBooksClient);
65
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
66
+ /** Use Dex Call ID as QuickBooks requestid. */ idempotencyKey(callID: string): string;
67
+ /** Record and confirm one payment. */
68
+ invoke(call: Call, input: RecordPaymentInput): Promise<MutationAttempt<Payment>>;
69
+ }
70
+
71
+ /** Injectable sender and clock for deterministic provider verification. */
72
+ interface QuickBooksClientOptions {
73
+ /** Caller-owned transport; production uses the SDK provider transport. */
74
+ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
75
+ /** UTC receipt and Retry-After clock. */
76
+ now?: () => Date;
77
+ /** Loopback HTTP endpoint for the connector's runnable example. */
78
+ localProviderURL?: string;
79
+ }
80
+ /** One classified provider exchange. */
81
+ interface QuickBooksExchange {
82
+ /** Classified provider outcome. */
83
+ disposition: 'succeeded' | 'notFound' | 'retry' | 'interrupted' | 'rejected' | 'nameConflict' | 'invalid' | 'defect';
84
+ /** Successful body, when available. */
85
+ body?: Uint8Array;
86
+ /** Failure, when unsuccessful. */
87
+ failure?: Failure;
88
+ /** Delay for a retry in milliseconds. */
89
+ retryAfterMs: number;
90
+ /** Safe correlation receipt. */
91
+ receipt: ReceiptDraft;
92
+ /** HTTP status, when the provider answered. */
93
+ status: number;
94
+ }
95
+ /** One QuickBooks request below the connected company's API path. */
96
+ interface QuickBooksRequest {
97
+ /** HTTP method. */ method: 'GET' | 'POST';
98
+ /** Path below the company. */ path: string;
99
+ /** Additional query values. */ query?: Record<string, string>;
100
+ /** Encoded JSON payload supplied by an operation. */ body?: Uint8Array;
101
+ /** Whether the operation uses QuickBooks requestid. */ mutation?: boolean;
102
+ }
103
+ /** QuickBooks client with manifest-driven OAuth renewal and company identity validation. */
104
+ declare class QuickBooksClient {
105
+ private readonly credentials;
106
+ private readonly endpoint;
107
+ private readonly environment;
108
+ private readonly configuredRealmID;
109
+ private readonly maxResponseBytes;
110
+ private readonly send;
111
+ private readonly now;
112
+ private readonly refreshDriver;
113
+ /** Validate immutable connection configuration without contacting Intuit. */
114
+ constructor(config: Config, credentials: CredentialSource, options?: QuickBooksClientOptions);
115
+ /** Bind the customer lookup. */ findCustomer(): FindCustomerOperation;
116
+ /** Bind customer creation. */ createCustomer(): CreateCustomerOperation;
117
+ /** Bind invoice creation. */ createInvoice(): CreateInvoiceOperation;
118
+ /** Bind invoice lookup. */ getInvoice(): GetInvoiceOperation;
119
+ /** Bind invoice paging. */ listInvoices(): ListInvoicesOperation;
120
+ /** Bind invoice delivery. */ sendInvoice(): SendInvoiceOperation;
121
+ /** Bind payment recording. */ recordPayment(): RecordPaymentOperation;
122
+ /** Return a secret-safe failure. */
123
+ failure(kind: Failure['kind'], operation: string, message: string): Failure;
124
+ /** Send and classify one request, preserving the original requestid after a credential refresh. */
125
+ exchange(call: Call, operation: string, request: QuickBooksRequest, objectID?: string): Promise<QuickBooksExchange>;
126
+ private localFailure;
127
+ /** Create a receipt after a provider attempt. */
128
+ receipt(call: Call, objectID: string): ReceiptDraft;
129
+ private sendRequest;
130
+ private classifyStatus;
131
+ }
132
+
133
+ /** Configuration for the findCustomer connector Step. */
134
+ interface FindCustomerStepConfig<StepInput, OperationInput = FindCustomerInput, OperationOutput = FindCustomerOutput> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
135
+ /** Named connection supplying this operation. */
136
+ connection: Connection<{
137
+ findCustomer(): Query<OperationInput, OperationOutput>;
138
+ }>;
139
+ /** Name matching the bound connection. */
140
+ connectionName: string;
141
+ /** Exactly one customer matches. */
142
+ found: StepTarget<QueryResult<OperationOutput>>;
143
+ /** No customer matches; inactive customers count only when the input includes them. */
144
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
145
+ /** Several customers share the email address; the output lists them so the application can choose. */
146
+ ambiguous?: StepTarget<QueryResult<OperationOutput>>;
147
+ /** QuickBooks conclusively rejected the query, such as a revoked connection or a company the app can no longer reach. */
148
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
149
+ /** QuickBooks returned an invalid or oversized customer list. */
150
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
151
+ /** Local input, connection configuration, or connector definition is invalid. */
152
+ defect?: StepTarget<QueryResult<OperationOutput>>;
153
+ }
154
+ /** Build the findCustomer Step from a named connection. */
155
+ declare function newFindCustomerStep<StepInput, OperationInput = FindCustomerInput, OperationOutput = FindCustomerOutput>(configuration: FindCustomerStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
156
+ /** Configuration for the createCustomer connector Step. */
157
+ interface CreateCustomerStepConfig<StepInput, OperationInput = CreateCustomerInput, OperationOutput = CreateCustomerOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
158
+ /** Named connection supplying this operation. */
159
+ connection: Connection<{
160
+ createCustomer(): Mutation<OperationInput, OperationOutput>;
161
+ }>;
162
+ /** Name matching the bound connection. */
163
+ connectionName: string;
164
+ /** QuickBooks created the customer, or returned the customer this Step already created. */
165
+ created: StepTarget<MutationResult<OperationOutput>>;
166
+ /** A customer, vendor, or employee already uses the display name (QuickBooks error 6240); resolve it with findCustomer by display name, including a possible earlier attempt. */
167
+ nameConflict?: StepTarget<MutationResult<OperationOutput>>;
168
+ /** QuickBooks conclusively rejected the customer, such as an invalid field or a revoked connection; nothing was created. */
169
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
170
+ /** QuickBooks accepted the request but returned an unusable customer that read-back could not confirm; look it up with findCustomer before creating again. */
171
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
172
+ /** Local input, connection configuration, or connector definition is invalid. */
173
+ defect?: StepTarget<MutationResult<OperationOutput>>;
174
+ }
175
+ /** Build the createCustomer Step from a named connection. */
176
+ declare function newCreateCustomerStep<StepInput, OperationInput = CreateCustomerInput, OperationOutput = CreateCustomerOutput>(configuration: CreateCustomerStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
177
+ /** Configuration for the createInvoice connector Step. */
178
+ interface CreateInvoiceStepConfig<StepInput, OperationInput = CreateInvoiceInput, OperationOutput = CreateInvoiceOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
179
+ /** Named connection supplying this operation. */
180
+ connection: Connection<{
181
+ createInvoice(): Mutation<OperationInput, OperationOutput>;
182
+ }>;
183
+ /** Name matching the bound connection. */
184
+ connectionName: string;
185
+ /** QuickBooks created the invoice, or returned the invoice this Step already created, with its number, total, and balance. */
186
+ created: StepTarget<MutationResult<OperationOutput>>;
187
+ /** QuickBooks conclusively rejected the invoice, such as an unknown or inactive customer or item, a duplicate document number, a closed period, or a revoked connection; nothing was created. */
188
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
189
+ /** QuickBooks accepted the request but returned an unusable invoice that read-back could not confirm; look it up by document number before creating again. */
190
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
191
+ /** Local input, connection configuration, or connector definition is invalid. */
192
+ defect?: StepTarget<MutationResult<OperationOutput>>;
193
+ }
194
+ /** Build the createInvoice Step from a named connection. */
195
+ declare function newCreateInvoiceStep<StepInput, OperationInput = CreateInvoiceInput, OperationOutput = CreateInvoiceOutput>(configuration: CreateInvoiceStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
196
+ /** Configuration for the getInvoice connector Step. */
197
+ interface GetInvoiceStepConfig<StepInput, OperationInput = GetInvoiceInput, OperationOutput = Invoice> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
198
+ /** Named connection supplying this operation. */
199
+ connection: Connection<{
200
+ getInvoice(): Query<OperationInput, OperationOutput>;
201
+ }>;
202
+ /** Name matching the bound connection. */
203
+ connectionName: string;
204
+ /** The invoice was read. */
205
+ found: StepTarget<QueryResult<OperationOutput>>;
206
+ /** The invoice does not exist in the company or was deleted. */
207
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
208
+ /** QuickBooks conclusively rejected the read, such as a revoked connection. */
209
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
210
+ /** QuickBooks returned an invalid or oversized invoice. */
211
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
212
+ /** Local input, connection configuration, or connector definition is invalid. */
213
+ defect?: StepTarget<QueryResult<OperationOutput>>;
214
+ }
215
+ /** Build the getInvoice Step from a named connection. */
216
+ declare function newGetInvoiceStep<StepInput, OperationInput = GetInvoiceInput, OperationOutput = Invoice>(configuration: GetInvoiceStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
217
+ /** Configuration for the listInvoices connector Step. */
218
+ interface ListInvoicesStepConfig<StepInput, OperationInput = ListInvoicesInput, OperationOutput = InvoicePage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
219
+ /** Named connection supplying this operation. */
220
+ connection: Connection<{
221
+ listInvoices(): Query<OperationInput, OperationOutput>;
222
+ }>;
223
+ /** Name matching the bound connection. */
224
+ connectionName: string;
225
+ /** One page of matching invoices was read; it can be empty. */
226
+ listed: StepTarget<QueryResult<OperationOutput>>;
227
+ /** QuickBooks conclusively rejected the query, such as a revoked connection. */
228
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
229
+ /** QuickBooks returned an invalid or oversized page of invoices. */
230
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
231
+ /** Local input, connection configuration, or connector definition is invalid. */
232
+ defect?: StepTarget<QueryResult<OperationOutput>>;
233
+ }
234
+ /** Build the listInvoices Step from a named connection. */
235
+ declare function newListInvoicesStep<StepInput, OperationInput = ListInvoicesInput, OperationOutput = InvoicePage>(configuration: ListInvoicesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
236
+ /** Configuration for the sendInvoice connector Step. */
237
+ interface SendInvoiceStepConfig<StepInput, OperationInput = SendInvoiceInput, OperationOutput = Invoice> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
238
+ /** Named connection supplying this operation. */
239
+ connection: Connection<{
240
+ sendInvoice(): Mutation<OperationInput, OperationOutput>;
241
+ }>;
242
+ /** Name matching the bound connection. */
243
+ connectionName: string;
244
+ /** QuickBooks emailed the invoice, or returned the delivery this Step already made, with EmailStatus EmailSent. */
245
+ sent: StepTarget<MutationResult<OperationOutput>>;
246
+ /** QuickBooks conclusively rejected the delivery, such as an invoice without an address, a deleted invoice, or a revoked connection; nothing was sent. */
247
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
248
+ /** QuickBooks accepted the request but returned an unusable invoice that read-back could not confirm; check its EmailStatus with getInvoice before sending again. */
249
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
250
+ /** Local input, connection configuration, or connector definition is invalid. */
251
+ defect?: StepTarget<MutationResult<OperationOutput>>;
252
+ }
253
+ /** Build the sendInvoice Step from a named connection. */
254
+ declare function newSendInvoiceStep<StepInput, OperationInput = SendInvoiceInput, OperationOutput = Invoice>(configuration: SendInvoiceStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
255
+ /** Configuration for the recordPayment connector Step. */
256
+ interface RecordPaymentStepConfig<StepInput, OperationInput = RecordPaymentInput, OperationOutput = Payment> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
257
+ /** Named connection supplying this operation. */
258
+ connection: Connection<{
259
+ recordPayment(): Mutation<OperationInput, OperationOutput>;
260
+ }>;
261
+ /** Name matching the bound connection. */
262
+ connectionName: string;
263
+ /** QuickBooks recorded the payment, or returned the payment this Step already recorded, with the invoices it applies to. */
264
+ recorded: StepTarget<MutationResult<OperationOutput>>;
265
+ /** QuickBooks conclusively rejected the payment, such as an invoice of another customer, an amount above the balance, an invalid deposit account, a closed period, or a revoked connection; nothing was recorded. */
266
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
267
+ /** QuickBooks accepted the request but returned an unusable payment that read-back could not confirm; inspect the invoice before paying again. */
268
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
269
+ /** Local input, connection configuration, or connector definition is invalid. */
270
+ defect?: StepTarget<MutationResult<OperationOutput>>;
271
+ }
272
+ /** Build the recordPayment Step from a named connection. */
273
+ declare function newRecordPaymentStep<StepInput, OperationInput = RecordPaymentInput, OperationOutput = Payment>(configuration: RecordPaymentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
274
+
275
+ /** Stable connector identity. */
276
+ declare const ConnectorID = "quickbooks";
277
+ /** Provider identity for named connections. */
278
+ declare const ProviderID = "quickbooks";
279
+ /** Branch IDs for findCustomer. */
280
+ declare const FindCustomerBranch: {
281
+ readonly Found: "found";
282
+ readonly NotFound: "notFound";
283
+ readonly Ambiguous: "ambiguous";
284
+ readonly ProviderRejected: "providerRejected";
285
+ readonly InvalidResponse: "invalidResponse";
286
+ readonly Defect: "defect";
287
+ };
288
+ /** Exactly one customer matches. */
289
+ declare const FindCustomerBranchFound: "found";
290
+ /** No customer matches; inactive customers count only when the input includes them. */
291
+ declare const FindCustomerBranchNotFound: "notFound";
292
+ /** Several customers share the email address; the output lists them so the application can choose. */
293
+ declare const FindCustomerBranchAmbiguous: "ambiguous";
294
+ /** QuickBooks conclusively rejected the query, such as a revoked connection or a company the app can no longer reach. */
295
+ declare const FindCustomerBranchProviderRejected: "providerRejected";
296
+ /** QuickBooks returned an invalid or oversized customer list. */
297
+ declare const FindCustomerBranchInvalidResponse: "invalidResponse";
298
+ /** Local input, connection configuration, or connector definition is invalid. */
299
+ declare const FindCustomerBranchDefect: "defect";
300
+ /** Manifest definition for findCustomer. */
301
+ declare const FindCustomerDefinition: QueryDefinition;
302
+ /** Manifest metadata for findCustomer. */
303
+ declare const FindCustomerMetadata: {
304
+ readonly kind: "query";
305
+ readonly idempotency: "none";
306
+ readonly authorization: "required";
307
+ };
308
+ /** Branch IDs for createCustomer. */
309
+ declare const CreateCustomerBranch: {
310
+ readonly Created: "created";
311
+ readonly NameConflict: "nameConflict";
312
+ readonly ProviderRejected: "providerRejected";
313
+ readonly Uncertain: "uncertain";
314
+ readonly Defect: "defect";
315
+ };
316
+ /** QuickBooks created the customer, or returned the customer this Step already created. */
317
+ declare const CreateCustomerBranchCreated: "created";
318
+ /** A customer, vendor, or employee already uses the display name (QuickBooks error 6240); resolve it with findCustomer by display name, including a possible earlier attempt. */
319
+ declare const CreateCustomerBranchNameConflict: "nameConflict";
320
+ /** QuickBooks conclusively rejected the customer, such as an invalid field or a revoked connection; nothing was created. */
321
+ declare const CreateCustomerBranchProviderRejected: "providerRejected";
322
+ /** QuickBooks accepted the request but returned an unusable customer that read-back could not confirm; look it up with findCustomer before creating again. */
323
+ declare const CreateCustomerBranchUncertain: "uncertain";
324
+ /** Local input, connection configuration, or connector definition is invalid. */
325
+ declare const CreateCustomerBranchDefect: "defect";
326
+ /** Manifest definition for createCustomer. */
327
+ declare const CreateCustomerDefinition: MutationDefinition;
328
+ /** Manifest metadata for createCustomer. */
329
+ declare const CreateCustomerMetadata: {
330
+ readonly kind: "mutation";
331
+ readonly idempotency: "required";
332
+ readonly authorization: "required";
333
+ };
334
+ /** Branch IDs for createInvoice. */
335
+ declare const CreateInvoiceBranch: {
336
+ readonly Created: "created";
337
+ readonly ProviderRejected: "providerRejected";
338
+ readonly Uncertain: "uncertain";
339
+ readonly Defect: "defect";
340
+ };
341
+ /** QuickBooks created the invoice, or returned the invoice this Step already created, with its number, total, and balance. */
342
+ declare const CreateInvoiceBranchCreated: "created";
343
+ /** QuickBooks conclusively rejected the invoice, such as an unknown or inactive customer or item, a duplicate document number, a closed period, or a revoked connection; nothing was created. */
344
+ declare const CreateInvoiceBranchProviderRejected: "providerRejected";
345
+ /** QuickBooks accepted the request but returned an unusable invoice that read-back could not confirm; look it up by document number before creating again. */
346
+ declare const CreateInvoiceBranchUncertain: "uncertain";
347
+ /** Local input, connection configuration, or connector definition is invalid. */
348
+ declare const CreateInvoiceBranchDefect: "defect";
349
+ /** Manifest definition for createInvoice. */
350
+ declare const CreateInvoiceDefinition: MutationDefinition;
351
+ /** Manifest metadata for createInvoice. */
352
+ declare const CreateInvoiceMetadata: {
353
+ readonly kind: "mutation";
354
+ readonly idempotency: "required";
355
+ readonly authorization: "required";
356
+ };
357
+ /** Branch IDs for getInvoice. */
358
+ declare const GetInvoiceBranch: {
359
+ readonly Found: "found";
360
+ readonly NotFound: "notFound";
361
+ readonly ProviderRejected: "providerRejected";
362
+ readonly InvalidResponse: "invalidResponse";
363
+ readonly Defect: "defect";
364
+ };
365
+ /** The invoice was read. */
366
+ declare const GetInvoiceBranchFound: "found";
367
+ /** The invoice does not exist in the company or was deleted. */
368
+ declare const GetInvoiceBranchNotFound: "notFound";
369
+ /** QuickBooks conclusively rejected the read, such as a revoked connection. */
370
+ declare const GetInvoiceBranchProviderRejected: "providerRejected";
371
+ /** QuickBooks returned an invalid or oversized invoice. */
372
+ declare const GetInvoiceBranchInvalidResponse: "invalidResponse";
373
+ /** Local input, connection configuration, or connector definition is invalid. */
374
+ declare const GetInvoiceBranchDefect: "defect";
375
+ /** Manifest definition for getInvoice. */
376
+ declare const GetInvoiceDefinition: QueryDefinition;
377
+ /** Manifest metadata for getInvoice. */
378
+ declare const GetInvoiceMetadata: {
379
+ readonly kind: "query";
380
+ readonly idempotency: "none";
381
+ readonly authorization: "required";
382
+ };
383
+ /** Branch IDs for listInvoices. */
384
+ declare const ListInvoicesBranch: {
385
+ readonly Listed: "listed";
386
+ readonly ProviderRejected: "providerRejected";
387
+ readonly InvalidResponse: "invalidResponse";
388
+ readonly Defect: "defect";
389
+ };
390
+ /** One page of matching invoices was read; it can be empty. */
391
+ declare const ListInvoicesBranchListed: "listed";
392
+ /** QuickBooks conclusively rejected the query, such as a revoked connection. */
393
+ declare const ListInvoicesBranchProviderRejected: "providerRejected";
394
+ /** QuickBooks returned an invalid or oversized page of invoices. */
395
+ declare const ListInvoicesBranchInvalidResponse: "invalidResponse";
396
+ /** Local input, connection configuration, or connector definition is invalid. */
397
+ declare const ListInvoicesBranchDefect: "defect";
398
+ /** Manifest definition for listInvoices. */
399
+ declare const ListInvoicesDefinition: QueryDefinition;
400
+ /** Manifest metadata for listInvoices. */
401
+ declare const ListInvoicesMetadata: {
402
+ readonly kind: "query";
403
+ readonly idempotency: "none";
404
+ readonly authorization: "required";
405
+ };
406
+ /** Branch IDs for sendInvoice. */
407
+ declare const SendInvoiceBranch: {
408
+ readonly Sent: "sent";
409
+ readonly ProviderRejected: "providerRejected";
410
+ readonly Uncertain: "uncertain";
411
+ readonly Defect: "defect";
412
+ };
413
+ /** QuickBooks emailed the invoice, or returned the delivery this Step already made, with EmailStatus EmailSent. */
414
+ declare const SendInvoiceBranchSent: "sent";
415
+ /** QuickBooks conclusively rejected the delivery, such as an invoice without an address, a deleted invoice, or a revoked connection; nothing was sent. */
416
+ declare const SendInvoiceBranchProviderRejected: "providerRejected";
417
+ /** QuickBooks accepted the request but returned an unusable invoice that read-back could not confirm; check its EmailStatus with getInvoice before sending again. */
418
+ declare const SendInvoiceBranchUncertain: "uncertain";
419
+ /** Local input, connection configuration, or connector definition is invalid. */
420
+ declare const SendInvoiceBranchDefect: "defect";
421
+ /** Manifest definition for sendInvoice. */
422
+ declare const SendInvoiceDefinition: MutationDefinition;
423
+ /** Manifest metadata for sendInvoice. */
424
+ declare const SendInvoiceMetadata: {
425
+ readonly kind: "mutation";
426
+ readonly idempotency: "required";
427
+ readonly authorization: "required";
428
+ };
429
+ /** Branch IDs for recordPayment. */
430
+ declare const RecordPaymentBranch: {
431
+ readonly Recorded: "recorded";
432
+ readonly ProviderRejected: "providerRejected";
433
+ readonly Uncertain: "uncertain";
434
+ readonly Defect: "defect";
435
+ };
436
+ /** QuickBooks recorded the payment, or returned the payment this Step already recorded, with the invoices it applies to. */
437
+ declare const RecordPaymentBranchRecorded: "recorded";
438
+ /** QuickBooks conclusively rejected the payment, such as an invoice of another customer, an amount above the balance, an invalid deposit account, a closed period, or a revoked connection; nothing was recorded. */
439
+ declare const RecordPaymentBranchProviderRejected: "providerRejected";
440
+ /** QuickBooks accepted the request but returned an unusable payment that read-back could not confirm; inspect the invoice before paying again. */
441
+ declare const RecordPaymentBranchUncertain: "uncertain";
442
+ /** Local input, connection configuration, or connector definition is invalid. */
443
+ declare const RecordPaymentBranchDefect: "defect";
444
+ /** Manifest definition for recordPayment. */
445
+ declare const RecordPaymentDefinition: MutationDefinition;
446
+ /** Manifest metadata for recordPayment. */
447
+ declare const RecordPaymentMetadata: {
448
+ readonly kind: "mutation";
449
+ readonly idempotency: "required";
450
+ readonly authorization: "required";
451
+ };
452
+
453
+ /** Open a named QuickBooks project connection with generated OAuth credential decoders. */
454
+ declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: QuickBooksClientOptions): Connection<Operations>;
455
+
456
+ export { Config, Connection, ConnectorID, CreateCustomerBranch, CreateCustomerBranchCreated, CreateCustomerBranchDefect, CreateCustomerBranchNameConflict, CreateCustomerBranchProviderRejected, CreateCustomerBranchUncertain, CreateCustomerDefinition, CreateCustomerInput, CreateCustomerMetadata, CreateCustomerOutput, type CreateCustomerStepConfig, CreateInvoiceBranch, CreateInvoiceBranchCreated, CreateInvoiceBranchDefect, CreateInvoiceBranchProviderRejected, CreateInvoiceBranchUncertain, CreateInvoiceDefinition, CreateInvoiceInput, CreateInvoiceMetadata, CreateInvoiceOutput, type CreateInvoiceStepConfig, CredentialSource, FindCustomerBranch, FindCustomerBranchAmbiguous, FindCustomerBranchDefect, FindCustomerBranchFound, FindCustomerBranchInvalidResponse, FindCustomerBranchNotFound, FindCustomerBranchProviderRejected, FindCustomerDefinition, FindCustomerInput, FindCustomerMetadata, FindCustomerOutput, type FindCustomerStepConfig, GetInvoiceBranch, GetInvoiceBranchDefect, GetInvoiceBranchFound, GetInvoiceBranchInvalidResponse, GetInvoiceBranchNotFound, GetInvoiceBranchProviderRejected, GetInvoiceDefinition, GetInvoiceInput, GetInvoiceMetadata, type GetInvoiceStepConfig, Invoice, InvoicePage, ListInvoicesBranch, ListInvoicesBranchDefect, ListInvoicesBranchInvalidResponse, ListInvoicesBranchListed, ListInvoicesBranchProviderRejected, ListInvoicesDefinition, ListInvoicesInput, ListInvoicesMetadata, type ListInvoicesStepConfig, Payment, ProviderID, QuickBooksClient, type QuickBooksClientOptions, RecordPaymentBranch, RecordPaymentBranchDefect, RecordPaymentBranchProviderRejected, RecordPaymentBranchRecorded, RecordPaymentBranchUncertain, RecordPaymentDefinition, RecordPaymentInput, RecordPaymentMetadata, type RecordPaymentStepConfig, SendInvoiceBranch, SendInvoiceBranchDefect, SendInvoiceBranchProviderRejected, SendInvoiceBranchSent, SendInvoiceBranchUncertain, SendInvoiceDefinition, SendInvoiceInput, SendInvoiceMetadata, type SendInvoiceStepConfig, newCreateCustomerStep, newCreateInvoiceStep, newFindCustomerStep, newGetInvoiceStep, newListInvoicesStep, newProjectConnection, newRecordPaymentStep, newSendInvoiceStep };