@superdurable/connector-intuit-quickbooks 0.1.0 → 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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # QuickBooks Online TypeScript connector
2
2
 
3
- `@superdurable/connector-intuit-quickbooks` supplies seven QuickBooks Online
4
- operations for Dex TypeScript Flows. `connector.yaml` generates the models,
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
5
  validators, Step factories, OAuth refresh declaration, named connection, and
6
6
  scripted mocks. The package implements the provider client and operation
7
7
  invocations. Amounts are exact base-ten strings in the public models and are
@@ -9,8 +9,8 @@ sent as JSON number literals to QuickBooks.
9
9
 
10
10
  ## Connect
11
11
 
12
- Install the connector, `@superdurable/connectors-sdk` 0.5.0, and
13
- `@superdurable/dex` 1.28.0 or later on Node.js 22 or 24. Configure the
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
14
  `quickbooks-accounting` connection in Dex Web with an Intuit app and the
15
15
  QuickBooks Online Accounting API. Follow the authorization guide in the
16
16
  manifest: add Dex Web's exact redirect URI in the Intuit app, select the
@@ -22,8 +22,8 @@ credentials, outside Flow state and output.
22
22
  At Worker startup, call `loadFromEnvironment()` and bind the static
23
23
  `ConnectionName` with `newProjectConnection(project, ConnectionName)`. The
24
24
  [checked-in example](examples/get-invoice/) is the runnable application. The
25
- client reads `environment`, `realmId`, and `maxResponseBytes` from the project
26
- connection. If Intuit's ID token names a company, its realm ID must agree with
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
27
  an explicitly configured `realmId`.
28
28
 
29
29
  ## Operations
@@ -43,12 +43,50 @@ the Flow. Mutations use the Dex Call ID as QuickBooks `requestid` across
43
43
  attempts. An accepted write with an unusable response is read back by
44
44
  provider ID when possible; otherwise it selects `uncertain`.
45
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
+
46
80
  ## Verify
47
81
 
48
82
  From this package run `npm ci`, `npm run check`, and, with `dexcli dev` and
49
83
  `DEX_FLOW_SERVICE_ADDRESS` set, `npm run test:integration`. The integration
50
84
  test uses a loopback QuickBooks stand-in and a real Dex Worker and Client.
51
85
  The shared Go-recorded conformance fixture covers provider branches, retries,
52
- transport failures, stable request IDs, and accepted-write read-back. Live
53
- Intuit app authorization, token refresh, realm claim delivery, and QuickBooks
54
- API calls remain unverified.
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.
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "connectorId": "quickbooks",
3
- "releaseTag": "connectors/intuit/quickbooks/go/v0.24.0",
3
+ "releaseTag": "connectors/intuit/quickbooks/go/v0.25.0",
4
4
  "package": {
5
5
  "ecosystem": "npm",
6
6
  "name": "@superdurable/connector-intuit-quickbooks",
7
- "version": "0.1.0"
7
+ "version": "0.2.0"
8
8
  },
9
9
  "factories": [
10
10
  {
11
11
  "name": "newFindCustomerStep",
12
12
  "kind": "query",
13
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.",
14
16
  "fields": {
15
17
  "stepType": "stepType",
16
18
  "annotations": "annotations",
@@ -48,12 +50,33 @@
48
50
  "field": "defect",
49
51
  "optional": true
50
52
  }
51
- ]
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
+ }
52
73
  },
53
74
  {
54
75
  "name": "newCreateCustomerStep",
55
76
  "kind": "mutation",
56
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.",
57
80
  "fields": {
58
81
  "stepType": "stepType",
59
82
  "annotations": "annotations",
@@ -86,12 +109,52 @@
86
109
  "field": "defect",
87
110
  "optional": true
88
111
  }
89
- ]
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
+ }
90
151
  },
91
152
  {
92
153
  "name": "newCreateInvoiceStep",
93
154
  "kind": "mutation",
94
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.",
95
158
  "fields": {
96
159
  "stepType": "stepType",
97
160
  "annotations": "annotations",
@@ -119,12 +182,107 @@
119
182
  "field": "defect",
120
183
  "optional": true
121
184
  }
122
- ]
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
+ }
123
279
  },
124
280
  {
125
281
  "name": "newGetInvoiceStep",
126
282
  "kind": "query",
127
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.",
128
286
  "fields": {
129
287
  "stepType": "stepType",
130
288
  "annotations": "annotations",
@@ -157,12 +315,28 @@
157
315
  "field": "defect",
158
316
  "optional": true
159
317
  }
160
- ]
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
+ }
161
333
  },
162
334
  {
163
335
  "name": "newListInvoicesStep",
164
336
  "kind": "query",
165
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.",
166
340
  "fields": {
167
341
  "stepType": "stepType",
168
342
  "annotations": "annotations",
@@ -190,12 +364,57 @@
190
364
  "field": "defect",
191
365
  "optional": true
192
366
  }
193
- ]
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
+ }
194
411
  },
195
412
  {
196
413
  "name": "newSendInvoiceStep",
197
414
  "kind": "mutation",
198
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.",
199
418
  "fields": {
200
419
  "stepType": "stepType",
201
420
  "annotations": "annotations",
@@ -223,12 +442,32 @@
223
442
  "field": "defect",
224
443
  "optional": true
225
444
  }
226
- ]
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
+ }
227
464
  },
228
465
  {
229
466
  "name": "newRecordPaymentStep",
230
467
  "kind": "mutation",
231
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.",
232
471
  "fields": {
233
472
  "stepType": "stepType",
234
473
  "annotations": "annotations",
@@ -256,7 +495,65 @@
256
495
  "field": "defect",
257
496
  "optional": true
258
497
  }
259
- ]
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
+ }
260
557
  }
261
558
  ]
262
559
  }
@@ -49,7 +49,9 @@ var CreateCustomerDefinition = {
49
49
  { id: "uncertain", description: "QuickBooks accepted the request but returned an unusable customer that read-back could not confirm; look it up with findCustomer before creating again.", optional: true },
50
50
  { id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
51
51
  ],
52
- stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
52
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
53
+ repeatOnUnknown: "limited",
54
+ maxSends: 3
53
55
  };
54
56
  var CreateCustomerMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
55
57
  var CreateInvoiceBranch = {
@@ -70,7 +72,9 @@ var CreateInvoiceDefinition = {
70
72
  { id: "uncertain", description: "QuickBooks accepted the request but returned an unusable invoice that read-back could not confirm; look it up by document number before creating again.", optional: true },
71
73
  { id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
72
74
  ],
73
- stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 6, totalDurationMs: 3e5 } }
75
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 6, totalDurationMs: 3e5 } },
76
+ repeatOnUnknown: "limited",
77
+ maxSends: 3
74
78
  };
75
79
  var CreateInvoiceMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
76
80
  var GetInvoiceBranch = {
@@ -136,7 +140,9 @@ var SendInvoiceDefinition = {
136
140
  { id: "uncertain", description: "QuickBooks accepted the request but returned an unusable invoice that read-back could not confirm; check its EmailStatus with getInvoice before sending again.", optional: true },
137
141
  { id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
138
142
  ],
139
- stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 6, totalDurationMs: 3e5 } }
143
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 6, totalDurationMs: 3e5 } },
144
+ repeatOnUnknown: "limited",
145
+ maxSends: 3
140
146
  };
141
147
  var SendInvoiceMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
142
148
  var RecordPaymentBranch = {
@@ -157,7 +163,9 @@ var RecordPaymentDefinition = {
157
163
  { id: "uncertain", description: "QuickBooks accepted the request but returned an unusable payment that read-back could not confirm; inspect the invoice before paying again.", optional: true },
158
164
  { id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
159
165
  ],
160
- stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 6, totalDurationMs: 3e5 } }
166
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 6, totalDurationMs: 3e5 } },
167
+ repeatOnUnknown: "limited",
168
+ maxSends: 3
161
169
  };
162
170
  var RecordPaymentMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
163
171
 
@@ -224,7 +232,8 @@ var GoTimeJSONSchema = z.string().refine(isGoTimeJSON, "invalid Go time.Time JSO
224
232
  var ConfigSchema = z.object({
225
233
  "environment": z.string().optional(),
226
234
  "realmId": z.string().optional(),
227
- "maxResponseBytes": z.number().int().optional()
235
+ "maxResponseBytes": z.number().int().optional(),
236
+ "pollIntervalMs": z.number().int().optional()
228
237
  });
229
238
  function decodeCredentials(value) {
230
239
  if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
@@ -11,12 +11,15 @@ interface Config {
11
11
  realmId?: string;
12
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
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;
14
16
  }
15
17
  /** Runtime schema for manifest configuration. */
16
18
  declare const ConfigSchema: z.ZodObject<{
17
19
  environment: z.ZodOptional<z.ZodString>;
18
20
  realmId: z.ZodOptional<z.ZodString>;
19
21
  maxResponseBytes: z.ZodOptional<z.ZodNumber>;
22
+ pollIntervalMs: z.ZodOptional<z.ZodNumber>;
20
23
  }, z.core.$strip>;
21
24
  /** Private connector credentials resolved by the host. */
22
25
  interface Credentials {