@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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Super Durable
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,92 @@
1
- # Temporary Holding Version
1
+ # QuickBooks Online TypeScript connector
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `@superdurable/connector-intuit-quickbooks` v0.2.0 supplies seven QuickBooks Online
4
+ operations and the `invoiceChanged` poll Trigger for Dex TypeScript Flows. `connector.yaml` generates the models,
5
+ validators, Step factories, OAuth refresh declaration, named connection, and
6
+ scripted mocks. The package implements the provider client and operation
7
+ invocations. Amounts are exact base-ten strings in the public models and are
8
+ sent as JSON number literals to QuickBooks.
9
+
10
+ ## Connect
11
+
12
+ Install the connector, `@superdurable/connectors-sdk` 0.12.0, and
13
+ `@superdurable/dex` 1.45.4 or later on Node.js 22 or 24. Configure the
14
+ `quickbooks-accounting` connection in Dex Web with an Intuit app and the
15
+ QuickBooks Online Accounting API. Follow the authorization guide in the
16
+ manifest: add Dex Web's exact redirect URI in the Intuit app, select the
17
+ matching Development or Production keys, and authorize the company. Dex
18
+ requests `com.intuit.quickbooks.accounting` and `openid`. The access token,
19
+ rotating refresh token, client secret, and ID token stay in host-owned
20
+ credentials, outside Flow state and output.
21
+
22
+ At Worker startup, call `loadFromEnvironment()` and bind the static
23
+ `ConnectionName` with `newProjectConnection(project, ConnectionName)`. The
24
+ [checked-in example](examples/get-invoice/) is the runnable application. The
25
+ client reads `environment`, `realmId`, `maxResponseBytes`, and `pollInterval` from
26
+ the project connection. If Intuit's ID token names a company, its realm ID must agree with
27
+ an explicitly configured `realmId`.
28
+
29
+ ## Operations
30
+
31
+ | Factory | Provider call | Happy branch |
32
+ | --- | --- | --- |
33
+ | `newFindCustomerStep` | Query Customer by email or display name | `found` |
34
+ | `newCreateCustomerStep` | `POST /customer` | `created` |
35
+ | `newCreateInvoiceStep` | `POST /invoice` | `created` |
36
+ | `newGetInvoiceStep` | `GET /invoice/{id}` | `found` |
37
+ | `newListInvoicesStep` | Query a bounded Invoice page | `listed` |
38
+ | `newSendInvoiceStep` | `POST /invoice/{id}/send` | `sent` |
39
+ | `newRecordPaymentStep` | `POST /payment` | `recorded` |
40
+
41
+ All other declared branches are optional; an unwired optional branch fails
42
+ the Flow. Mutations use the Dex Call ID as QuickBooks `requestid` across
43
+ attempts. An accepted write with an unusable response is read back by
44
+ provider ID when possible; otherwise it selects `uncertain`.
45
+
46
+ ## invoiceChanged Trigger
47
+
48
+ `invoiceChanged` delivers one `InvoiceChangedEvent` per invoice version created or
49
+ changed in the connected company: `realmId`, `environment`, `changeKind` (`created`
50
+ for SyncToken 0, otherwise `updated`, which includes payments, emails, and voids), and
51
+ the polled `invoice`. It polls the invoice query by `MetaData.LastUpdatedTime`, at
52
+ most 100 invoices per request, at parity with the Go connector; see the
53
+ [connector README](../README.md#invoicechanged-trigger) for the 30-second lookback
54
+ window, the 1,000-version bound, and limitations. The first poll records a baseline
55
+ and delivers no existing invoice, and deleted invoices are never reported. The
56
+ binding has no configuration fields.
57
+
58
+ - `newProjectInvoiceTriggerRunner(project, connection, { invoiceChangedRoutes })`
59
+ records each change in the binding's project Trigger inbox before its watermark
60
+ commits in the binding's project poll cursor, so a restarted or replaced replica
61
+ neither misses nor repeats a change.
62
+ - `newInvoiceTriggerRunner({ connection, invoiceChangedRoutes })` takes targets and
63
+ cursor stores directly; a route without a cursor store keeps it in memory.
64
+ - `newInvoiceChangedTrigger(...)` is one Trigger with an in-memory cursor, as Go's
65
+ `NewInvoiceChangedTrigger`; it records a new baseline on every start.
66
+ - `defineInvoiceChangedTriggerBinding` declares the binding in a Flow's
67
+ `getConnectorTriggerBindings`.
68
+
69
+ The `pollInterval` connection setting (at least 5 seconds) sets the delay between
70
+ polls, and the client's `logger` option receives the runner's records. A 429 pauses
71
+ every binding of the connection for `Retry-After`, or 60 seconds without it. A cursor
72
+ for another company or environment, or a QuickBooks validation Fault for the
73
+ watermark query, records a new baseline and logs a WARN record; changes in that gap
74
+ are not delivered. Delivery is at least once, and each invoice version keeps one
75
+ Trigger event ID. Cursor documents match the Go connector's byte for byte, so Go and
76
+ TypeScript replicas share one binding. The
77
+ [invoice change example](examples/invoice-changed/) wires the project runner to a
78
+ Flow that reads each changed invoice back and records whether it is paid.
79
+
80
+ ## Verify
81
+
82
+ From this package run `npm ci`, `npm run check`, and, with `dexcli dev` and
83
+ `DEX_FLOW_SERVICE_ADDRESS` set, `npm run test:integration`. The integration
84
+ test uses a loopback QuickBooks stand-in and a real Dex Worker and Client.
85
+ The shared Go-recorded conformance fixture covers provider branches, retries,
86
+ transport failures, stable request IDs, and accepted-write read-back.
87
+ `test/fixtures/go-invoice-change-cases.json`, recorded from the Go fetcher, is
88
+ replayed against the same invoice fake and compares every request, cursor token,
89
+ event ID, and stored payload. The invoice change example's integration test runs
90
+ through a real Dex Worker and Client against the in-process invoice fake. Live
91
+ Intuit app authorization, token refresh, realm claim delivery, QuickBooks API
92
+ calls, and live invoice polling remain unverified.
@@ -0,0 +1,559 @@
1
+ {
2
+ "connectorId": "quickbooks",
3
+ "releaseTag": "connectors/intuit/quickbooks/go/v0.25.0",
4
+ "package": {
5
+ "ecosystem": "npm",
6
+ "name": "@superdurable/connector-intuit-quickbooks",
7
+ "version": "0.2.0"
8
+ },
9
+ "factories": [
10
+ {
11
+ "name": "newFindCustomerStep",
12
+ "kind": "query",
13
+ "operationId": "findCustomer",
14
+ "inputType": "FindCustomerInput",
15
+ "description": "Resolve one customer by exact primary email address or exact display name with a QuickBooks query, distinguishing one match, none, and several.",
16
+ "fields": {
17
+ "stepType": "stepType",
18
+ "annotations": "annotations",
19
+ "connectionName": "connectionName",
20
+ "resultAttribute": "resultAttribute"
21
+ },
22
+ "branches": [
23
+ {
24
+ "id": "found",
25
+ "field": "found",
26
+ "optional": false
27
+ },
28
+ {
29
+ "id": "notFound",
30
+ "field": "notFound",
31
+ "optional": true
32
+ },
33
+ {
34
+ "id": "ambiguous",
35
+ "field": "ambiguous",
36
+ "optional": true
37
+ },
38
+ {
39
+ "id": "providerRejected",
40
+ "field": "providerRejected",
41
+ "optional": true
42
+ },
43
+ {
44
+ "id": "invalidResponse",
45
+ "field": "invalidResponse",
46
+ "optional": true
47
+ },
48
+ {
49
+ "id": "defect",
50
+ "field": "defect",
51
+ "optional": true
52
+ }
53
+ ],
54
+ "inputSchema": {
55
+ "additionalProperties": false,
56
+ "description": "FindCustomerInput identifies a customer by exactly one of its primary email address or display name.",
57
+ "properties": {
58
+ "displayName": {
59
+ "description": "DisplayName is the customer's exact display name, which QuickBooks keeps unique.",
60
+ "type": "string"
61
+ },
62
+ "emailAddress": {
63
+ "description": "EmailAddress is one bare address such as jane@example.com, matched against PrimaryEmailAddr. QuickBooks does not require email addresses to be unique, so several customers can match.",
64
+ "type": "string"
65
+ },
66
+ "includesInactive": {
67
+ "description": "IncludesInactive also matches customers made inactive, which QuickBooks treats as deleted; false matches only active customers.",
68
+ "type": "boolean"
69
+ }
70
+ },
71
+ "type": "object"
72
+ }
73
+ },
74
+ {
75
+ "name": "newCreateCustomerStep",
76
+ "kind": "mutation",
77
+ "operationId": "createCustomer",
78
+ "inputType": "CreateCustomerInput",
79
+ "description": "Create one customer with a unique display name, email address, names, company, phone, and currency; every attempt of the Step sends the same QuickBooks requestid to request replay of an earlier result.",
80
+ "fields": {
81
+ "stepType": "stepType",
82
+ "annotations": "annotations",
83
+ "connectionName": "connectionName",
84
+ "resultAttribute": "resultAttribute"
85
+ },
86
+ "branches": [
87
+ {
88
+ "id": "created",
89
+ "field": "created",
90
+ "optional": false
91
+ },
92
+ {
93
+ "id": "nameConflict",
94
+ "field": "nameConflict",
95
+ "optional": true
96
+ },
97
+ {
98
+ "id": "providerRejected",
99
+ "field": "providerRejected",
100
+ "optional": true
101
+ },
102
+ {
103
+ "id": "uncertain",
104
+ "field": "uncertain",
105
+ "optional": true
106
+ },
107
+ {
108
+ "id": "defect",
109
+ "field": "defect",
110
+ "optional": true
111
+ }
112
+ ],
113
+ "inputSchema": {
114
+ "additionalProperties": false,
115
+ "description": "CreateCustomerInput describes one new customer.",
116
+ "properties": {
117
+ "companyName": {
118
+ "description": "CompanyName is the customer's company, at most 100 characters.",
119
+ "type": "string"
120
+ },
121
+ "currencyCode": {
122
+ "description": "CurrencyCode is the customer's ISO 4217 currency when the company uses multicurrency; blank uses the company's home currency. QuickBooks cannot change it later.",
123
+ "type": "string"
124
+ },
125
+ "displayName": {
126
+ "description": "DisplayName is required and must be unique across QuickBooks customers, vendors, and employees; a name in use selects nameConflict.",
127
+ "type": "string"
128
+ },
129
+ "emailAddress": {
130
+ "description": "EmailAddress is the primary email address, such as accounts@example.com; blank leaves it unset.",
131
+ "type": "string"
132
+ },
133
+ "familyName": {
134
+ "description": "FamilyName is the contact's last name, at most 100 characters.",
135
+ "type": "string"
136
+ },
137
+ "givenName": {
138
+ "description": "GivenName is the contact's first name, at most 100 characters.",
139
+ "type": "string"
140
+ },
141
+ "phone": {
142
+ "description": "Phone is the primary phone number exactly as it should appear, at most 30 characters.",
143
+ "type": "string"
144
+ }
145
+ },
146
+ "required": [
147
+ "displayName"
148
+ ],
149
+ "type": "object"
150
+ }
151
+ },
152
+ {
153
+ "name": "newCreateInvoiceStep",
154
+ "kind": "mutation",
155
+ "operationId": "createInvoice",
156
+ "inputType": "CreateInvoiceInput",
157
+ "description": "Create one invoice for a customer with exact decimal item lines, dates, an optional document number, and a billing email; every attempt sends the same QuickBooks requestid to request replay of an earlier result.",
158
+ "fields": {
159
+ "stepType": "stepType",
160
+ "annotations": "annotations",
161
+ "connectionName": "connectionName",
162
+ "resultAttribute": "resultAttribute"
163
+ },
164
+ "branches": [
165
+ {
166
+ "id": "created",
167
+ "field": "created",
168
+ "optional": false
169
+ },
170
+ {
171
+ "id": "providerRejected",
172
+ "field": "providerRejected",
173
+ "optional": true
174
+ },
175
+ {
176
+ "id": "uncertain",
177
+ "field": "uncertain",
178
+ "optional": true
179
+ },
180
+ {
181
+ "id": "defect",
182
+ "field": "defect",
183
+ "optional": true
184
+ }
185
+ ],
186
+ "inputSchema": {
187
+ "$defs": {
188
+ "InvoiceLineInput": {
189
+ "additionalProperties": false,
190
+ "description": "InvoiceLineInput is one item line of a new invoice.",
191
+ "properties": {
192
+ "amount": {
193
+ "description": "Amount is the line amount with at most two decimal places. Blank computes Quantity times UnitPrice exactly, rounded half away from zero to two places; both are then required.",
194
+ "type": "string"
195
+ },
196
+ "description": {
197
+ "description": "Description is the line text, at most 4000 characters; blank uses the item's description.",
198
+ "type": "string"
199
+ },
200
+ "itemId": {
201
+ "description": "ItemID is the product or service item's Id, which supplies the income account.",
202
+ "type": "string"
203
+ },
204
+ "quantity": {
205
+ "description": "Quantity is the item quantity, up to five decimal places.",
206
+ "type": "string"
207
+ },
208
+ "serviceDate": {
209
+ "description": "ServiceDate is the date of service, YYYY-MM-DD; blank leaves it unset.",
210
+ "type": "string"
211
+ },
212
+ "taxCodeId": {
213
+ "description": "TaxCodeID is the line's tax code, such as TAX or NON in a US company; blank uses the item's.",
214
+ "type": "string"
215
+ },
216
+ "unitPrice": {
217
+ "description": "UnitPrice is the unit price, up to five decimal places.",
218
+ "type": "string"
219
+ }
220
+ },
221
+ "required": [
222
+ "itemId"
223
+ ],
224
+ "type": "object"
225
+ }
226
+ },
227
+ "additionalProperties": false,
228
+ "description": "CreateInvoiceInput describes one new invoice. Amounts are exact Decimals in the customer's currency.",
229
+ "properties": {
230
+ "billEmail": {
231
+ "description": "BillEmail is the address sendInvoice uses by default; blank uses none.",
232
+ "type": "string"
233
+ },
234
+ "currencyCode": {
235
+ "description": "CurrencyCode is the invoice's ISO 4217 currency, which must be the customer's; blank uses the customer's currency.",
236
+ "type": "string"
237
+ },
238
+ "customerId": {
239
+ "description": "CustomerID is the invoiced customer's Id, such as from findCustomer or createCustomer.",
240
+ "type": "string"
241
+ },
242
+ "customerMemo": {
243
+ "description": "CustomerMemo is the message shown to the customer on the invoice, at most 1000 characters.",
244
+ "type": "string"
245
+ },
246
+ "docNumber": {
247
+ "description": "DocNumber is the invoice number, at most 21 characters without a backslash, such as an order ID, so listInvoices can search for it; blank lets QuickBooks assign the next number when the company numbers invoices automatically.",
248
+ "type": "string"
249
+ },
250
+ "dueDate": {
251
+ "description": "DueDate is the payment due date, YYYY-MM-DD; blank applies the customer's or company's terms.",
252
+ "type": "string"
253
+ },
254
+ "lines": {
255
+ "description": "Lines are 1 to 100 item lines.",
256
+ "items": {
257
+ "$ref": "#/$defs/InvoiceLineInput"
258
+ },
259
+ "type": [
260
+ "array",
261
+ "null"
262
+ ]
263
+ },
264
+ "privateNote": {
265
+ "description": "PrivateNote is an internal memo, at most 4000 characters, such as the application's order ID.",
266
+ "type": "string"
267
+ },
268
+ "txnDate": {
269
+ "description": "TxnDate is the invoice date, YYYY-MM-DD; blank uses today in the company's time zone.",
270
+ "type": "string"
271
+ }
272
+ },
273
+ "required": [
274
+ "customerId",
275
+ "lines"
276
+ ],
277
+ "type": "object"
278
+ }
279
+ },
280
+ {
281
+ "name": "newGetInvoiceStep",
282
+ "kind": "query",
283
+ "operationId": "getInvoice",
284
+ "inputType": "GetInvoiceInput",
285
+ "description": "Read one invoice by Id with its lines, exact decimal total and balance, email status, and linked payments.",
286
+ "fields": {
287
+ "stepType": "stepType",
288
+ "annotations": "annotations",
289
+ "connectionName": "connectionName",
290
+ "resultAttribute": "resultAttribute"
291
+ },
292
+ "branches": [
293
+ {
294
+ "id": "found",
295
+ "field": "found",
296
+ "optional": false
297
+ },
298
+ {
299
+ "id": "notFound",
300
+ "field": "notFound",
301
+ "optional": true
302
+ },
303
+ {
304
+ "id": "providerRejected",
305
+ "field": "providerRejected",
306
+ "optional": true
307
+ },
308
+ {
309
+ "id": "invalidResponse",
310
+ "field": "invalidResponse",
311
+ "optional": true
312
+ },
313
+ {
314
+ "id": "defect",
315
+ "field": "defect",
316
+ "optional": true
317
+ }
318
+ ],
319
+ "inputSchema": {
320
+ "additionalProperties": false,
321
+ "description": "GetInvoiceInput identifies one invoice.",
322
+ "properties": {
323
+ "invoiceId": {
324
+ "description": "InvoiceID is the invoice's QuickBooks Id, such as 130.",
325
+ "type": "string"
326
+ }
327
+ },
328
+ "required": [
329
+ "invoiceId"
330
+ ],
331
+ "type": "object"
332
+ }
333
+ },
334
+ {
335
+ "name": "newListInvoicesStep",
336
+ "kind": "query",
337
+ "operationId": "listInvoices",
338
+ "inputType": "ListInvoicesInput",
339
+ "description": "List one bounded page of invoices, at most 100, filtered by customer, document number, open balance, invoice date, and last update, in a stable order with the next start position.",
340
+ "fields": {
341
+ "stepType": "stepType",
342
+ "annotations": "annotations",
343
+ "connectionName": "connectionName",
344
+ "resultAttribute": "resultAttribute"
345
+ },
346
+ "branches": [
347
+ {
348
+ "id": "listed",
349
+ "field": "listed",
350
+ "optional": false
351
+ },
352
+ {
353
+ "id": "providerRejected",
354
+ "field": "providerRejected",
355
+ "optional": true
356
+ },
357
+ {
358
+ "id": "invalidResponse",
359
+ "field": "invalidResponse",
360
+ "optional": true
361
+ },
362
+ {
363
+ "id": "defect",
364
+ "field": "defect",
365
+ "optional": true
366
+ }
367
+ ],
368
+ "inputSchema": {
369
+ "additionalProperties": false,
370
+ "description": "ListInvoicesInput filters one page of invoices. Every filter is optional, and filters combine with AND.",
371
+ "properties": {
372
+ "customerId": {
373
+ "description": "CustomerID keeps invoices of one customer, by Id.",
374
+ "type": "string"
375
+ },
376
+ "docNumber": {
377
+ "description": "DocNumber keeps invoices whose invoice number equals this value.",
378
+ "type": "string"
379
+ },
380
+ "isOpenOnly": {
381
+ "description": "IsOpenOnly keeps invoices whose Balance is above zero, that is, not fully paid.",
382
+ "type": "boolean"
383
+ },
384
+ "maxResults": {
385
+ "description": "MaxResults is 1 to 100 invoices; zero uses DefaultInvoicesPerPage.",
386
+ "type": "integer"
387
+ },
388
+ "startPosition": {
389
+ "description": "StartPosition is the 1-based position of the first invoice to read, such as the previous page's NextStartPosition; zero reads from the first invoice.",
390
+ "type": "integer"
391
+ },
392
+ "txnDateFrom": {
393
+ "description": "TxnDateFrom keeps invoices dated on or after this date, YYYY-MM-DD.",
394
+ "type": "string"
395
+ },
396
+ "txnDateTo": {
397
+ "description": "TxnDateTo keeps invoices dated on or before this date, YYYY-MM-DD.",
398
+ "type": "string"
399
+ },
400
+ "updatedSince": {
401
+ "description": "UpdatedSince keeps invoices created or changed at or after this instant, to the second.",
402
+ "format": "date-time",
403
+ "type": [
404
+ "string",
405
+ "null"
406
+ ]
407
+ }
408
+ },
409
+ "type": "object"
410
+ }
411
+ },
412
+ {
413
+ "name": "newSendInvoiceStep",
414
+ "kind": "mutation",
415
+ "operationId": "sendInvoice",
416
+ "inputType": "SendInvoiceInput",
417
+ "description": "Email one invoice to its billing address or a given address; every attempt sends the same QuickBooks requestid, though replay support on /send is unverified.",
418
+ "fields": {
419
+ "stepType": "stepType",
420
+ "annotations": "annotations",
421
+ "connectionName": "connectionName",
422
+ "resultAttribute": "resultAttribute"
423
+ },
424
+ "branches": [
425
+ {
426
+ "id": "sent",
427
+ "field": "sent",
428
+ "optional": false
429
+ },
430
+ {
431
+ "id": "providerRejected",
432
+ "field": "providerRejected",
433
+ "optional": true
434
+ },
435
+ {
436
+ "id": "uncertain",
437
+ "field": "uncertain",
438
+ "optional": true
439
+ },
440
+ {
441
+ "id": "defect",
442
+ "field": "defect",
443
+ "optional": true
444
+ }
445
+ ],
446
+ "inputSchema": {
447
+ "additionalProperties": false,
448
+ "description": "SendInvoiceInput identifies the invoice to email and, optionally, its recipient.",
449
+ "properties": {
450
+ "invoiceId": {
451
+ "description": "InvoiceID is the invoice's QuickBooks Id, such as 130.",
452
+ "type": "string"
453
+ },
454
+ "sendTo": {
455
+ "description": "SendTo is the recipient address; QuickBooks also stores it as the invoice's BillEmail. Blank sends to the invoice's BillEmail, and QuickBooks rejects an invoice without one.",
456
+ "type": "string"
457
+ }
458
+ },
459
+ "required": [
460
+ "invoiceId"
461
+ ],
462
+ "type": "object"
463
+ }
464
+ },
465
+ {
466
+ "name": "newRecordPaymentStep",
467
+ "kind": "mutation",
468
+ "operationId": "recordPayment",
469
+ "inputType": "RecordPaymentInput",
470
+ "description": "Record one received payment of an exact decimal amount and apply it to an invoice; every attempt sends the same QuickBooks requestid to request replay of an earlier result.",
471
+ "fields": {
472
+ "stepType": "stepType",
473
+ "annotations": "annotations",
474
+ "connectionName": "connectionName",
475
+ "resultAttribute": "resultAttribute"
476
+ },
477
+ "branches": [
478
+ {
479
+ "id": "recorded",
480
+ "field": "recorded",
481
+ "optional": false
482
+ },
483
+ {
484
+ "id": "providerRejected",
485
+ "field": "providerRejected",
486
+ "optional": true
487
+ },
488
+ {
489
+ "id": "uncertain",
490
+ "field": "uncertain",
491
+ "optional": true
492
+ },
493
+ {
494
+ "id": "defect",
495
+ "field": "defect",
496
+ "optional": true
497
+ }
498
+ ],
499
+ "inputSchema": {
500
+ "additionalProperties": false,
501
+ "description": "RecordPaymentInput describes one received payment applied in full to one invoice.",
502
+ "properties": {
503
+ "amount": {
504
+ "description": "Amount is the exact amount received and applied to the invoice, with at most two decimal places, such as the invoice's Balance.",
505
+ "type": "string"
506
+ },
507
+ "currencyCode": {
508
+ "description": "CurrencyCode is the payment's ISO 4217 currency, which must be the customer's; blank uses the customer's currency.",
509
+ "type": "string"
510
+ },
511
+ "customerId": {
512
+ "description": "CustomerID is the paying customer's Id; it must be the invoice's customer.",
513
+ "type": "string"
514
+ },
515
+ "depositAccountId": {
516
+ "description": "DepositAccountID is the bank or other current asset account's Id; blank deposits to QuickBooks's Undeposited Funds account.",
517
+ "type": "string"
518
+ },
519
+ "invoiceId": {
520
+ "description": "InvoiceID is the paid invoice's Id.",
521
+ "type": "string"
522
+ },
523
+ "paymentMethodId": {
524
+ "description": "PaymentMethodID is the payment method's Id, such as for Credit Card; blank leaves it unset.",
525
+ "type": "string"
526
+ },
527
+ "paymentReferenceNumber": {
528
+ "description": "PaymentReferenceNumber is QuickBooks's PaymentRefNum, such as a check or charge number, at most 21 characters.",
529
+ "type": "string"
530
+ },
531
+ "privateNote": {
532
+ "description": "PrivateNote is an internal memo, at most 4000 characters.",
533
+ "type": "string"
534
+ },
535
+ "txnDate": {
536
+ "description": "TxnDate is the payment date, YYYY-MM-DD; blank uses today in the company's time zone.",
537
+ "type": "string"
538
+ }
539
+ },
540
+ "required": [
541
+ "amount",
542
+ "customerId",
543
+ "invoiceId"
544
+ ],
545
+ "type": "object"
546
+ }
547
+ },
548
+ {
549
+ "name": "defineInvoiceChangedTriggerBinding",
550
+ "kind": "trigger",
551
+ "triggerName": "invoiceChanged",
552
+ "fields": {
553
+ "connectionName": "connectionName",
554
+ "bindingName": "bindingName",
555
+ "configurationUI": "configurationUI"
556
+ }
557
+ }
558
+ ]
559
+ }