@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.
- package/LICENSE +21 -0
- package/README.md +53 -2
- package/dex-connector.json +262 -0
- package/dist/chunk-4GHHKYDN.js +505 -0
- package/dist/connection-DfEHGjAp.d.ts +678 -0
- package/dist/index.d.ts +456 -0
- package/dist/index.js +1291 -0
- package/dist/mock.d.ts +190 -0
- package/dist/mock.js +455 -0
- package/package.json +61 -4
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,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# QuickBooks Online TypeScript connector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@superdurable/connector-intuit-quickbooks` supplies seven QuickBooks Online
|
|
4
|
+
operations 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.5.0, and
|
|
13
|
+
`@superdurable/dex` 1.28.0 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`, and `maxResponseBytes` from the project
|
|
26
|
+
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
|
+
## Verify
|
|
47
|
+
|
|
48
|
+
From this package run `npm ci`, `npm run check`, and, with `dexcli dev` and
|
|
49
|
+
`DEX_FLOW_SERVICE_ADDRESS` set, `npm run test:integration`. The integration
|
|
50
|
+
test uses a loopback QuickBooks stand-in and a real Dex Worker and Client.
|
|
51
|
+
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.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectorId": "quickbooks",
|
|
3
|
+
"releaseTag": "connectors/intuit/quickbooks/go/v0.24.0",
|
|
4
|
+
"package": {
|
|
5
|
+
"ecosystem": "npm",
|
|
6
|
+
"name": "@superdurable/connector-intuit-quickbooks",
|
|
7
|
+
"version": "0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"factories": [
|
|
10
|
+
{
|
|
11
|
+
"name": "newFindCustomerStep",
|
|
12
|
+
"kind": "query",
|
|
13
|
+
"operationId": "findCustomer",
|
|
14
|
+
"fields": {
|
|
15
|
+
"stepType": "stepType",
|
|
16
|
+
"annotations": "annotations",
|
|
17
|
+
"connectionName": "connectionName",
|
|
18
|
+
"resultAttribute": "resultAttribute"
|
|
19
|
+
},
|
|
20
|
+
"branches": [
|
|
21
|
+
{
|
|
22
|
+
"id": "found",
|
|
23
|
+
"field": "found",
|
|
24
|
+
"optional": false
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "notFound",
|
|
28
|
+
"field": "notFound",
|
|
29
|
+
"optional": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "ambiguous",
|
|
33
|
+
"field": "ambiguous",
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "providerRejected",
|
|
38
|
+
"field": "providerRejected",
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "invalidResponse",
|
|
43
|
+
"field": "invalidResponse",
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "defect",
|
|
48
|
+
"field": "defect",
|
|
49
|
+
"optional": true
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "newCreateCustomerStep",
|
|
55
|
+
"kind": "mutation",
|
|
56
|
+
"operationId": "createCustomer",
|
|
57
|
+
"fields": {
|
|
58
|
+
"stepType": "stepType",
|
|
59
|
+
"annotations": "annotations",
|
|
60
|
+
"connectionName": "connectionName",
|
|
61
|
+
"resultAttribute": "resultAttribute"
|
|
62
|
+
},
|
|
63
|
+
"branches": [
|
|
64
|
+
{
|
|
65
|
+
"id": "created",
|
|
66
|
+
"field": "created",
|
|
67
|
+
"optional": false
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "nameConflict",
|
|
71
|
+
"field": "nameConflict",
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "providerRejected",
|
|
76
|
+
"field": "providerRejected",
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "uncertain",
|
|
81
|
+
"field": "uncertain",
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "defect",
|
|
86
|
+
"field": "defect",
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "newCreateInvoiceStep",
|
|
93
|
+
"kind": "mutation",
|
|
94
|
+
"operationId": "createInvoice",
|
|
95
|
+
"fields": {
|
|
96
|
+
"stepType": "stepType",
|
|
97
|
+
"annotations": "annotations",
|
|
98
|
+
"connectionName": "connectionName",
|
|
99
|
+
"resultAttribute": "resultAttribute"
|
|
100
|
+
},
|
|
101
|
+
"branches": [
|
|
102
|
+
{
|
|
103
|
+
"id": "created",
|
|
104
|
+
"field": "created",
|
|
105
|
+
"optional": false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "providerRejected",
|
|
109
|
+
"field": "providerRejected",
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "uncertain",
|
|
114
|
+
"field": "uncertain",
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "defect",
|
|
119
|
+
"field": "defect",
|
|
120
|
+
"optional": true
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "newGetInvoiceStep",
|
|
126
|
+
"kind": "query",
|
|
127
|
+
"operationId": "getInvoice",
|
|
128
|
+
"fields": {
|
|
129
|
+
"stepType": "stepType",
|
|
130
|
+
"annotations": "annotations",
|
|
131
|
+
"connectionName": "connectionName",
|
|
132
|
+
"resultAttribute": "resultAttribute"
|
|
133
|
+
},
|
|
134
|
+
"branches": [
|
|
135
|
+
{
|
|
136
|
+
"id": "found",
|
|
137
|
+
"field": "found",
|
|
138
|
+
"optional": false
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "notFound",
|
|
142
|
+
"field": "notFound",
|
|
143
|
+
"optional": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "providerRejected",
|
|
147
|
+
"field": "providerRejected",
|
|
148
|
+
"optional": true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "invalidResponse",
|
|
152
|
+
"field": "invalidResponse",
|
|
153
|
+
"optional": true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "defect",
|
|
157
|
+
"field": "defect",
|
|
158
|
+
"optional": true
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "newListInvoicesStep",
|
|
164
|
+
"kind": "query",
|
|
165
|
+
"operationId": "listInvoices",
|
|
166
|
+
"fields": {
|
|
167
|
+
"stepType": "stepType",
|
|
168
|
+
"annotations": "annotations",
|
|
169
|
+
"connectionName": "connectionName",
|
|
170
|
+
"resultAttribute": "resultAttribute"
|
|
171
|
+
},
|
|
172
|
+
"branches": [
|
|
173
|
+
{
|
|
174
|
+
"id": "listed",
|
|
175
|
+
"field": "listed",
|
|
176
|
+
"optional": false
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "providerRejected",
|
|
180
|
+
"field": "providerRejected",
|
|
181
|
+
"optional": true
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "invalidResponse",
|
|
185
|
+
"field": "invalidResponse",
|
|
186
|
+
"optional": true
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": "defect",
|
|
190
|
+
"field": "defect",
|
|
191
|
+
"optional": true
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "newSendInvoiceStep",
|
|
197
|
+
"kind": "mutation",
|
|
198
|
+
"operationId": "sendInvoice",
|
|
199
|
+
"fields": {
|
|
200
|
+
"stepType": "stepType",
|
|
201
|
+
"annotations": "annotations",
|
|
202
|
+
"connectionName": "connectionName",
|
|
203
|
+
"resultAttribute": "resultAttribute"
|
|
204
|
+
},
|
|
205
|
+
"branches": [
|
|
206
|
+
{
|
|
207
|
+
"id": "sent",
|
|
208
|
+
"field": "sent",
|
|
209
|
+
"optional": false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "providerRejected",
|
|
213
|
+
"field": "providerRejected",
|
|
214
|
+
"optional": true
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"id": "uncertain",
|
|
218
|
+
"field": "uncertain",
|
|
219
|
+
"optional": true
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"id": "defect",
|
|
223
|
+
"field": "defect",
|
|
224
|
+
"optional": true
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "newRecordPaymentStep",
|
|
230
|
+
"kind": "mutation",
|
|
231
|
+
"operationId": "recordPayment",
|
|
232
|
+
"fields": {
|
|
233
|
+
"stepType": "stepType",
|
|
234
|
+
"annotations": "annotations",
|
|
235
|
+
"connectionName": "connectionName",
|
|
236
|
+
"resultAttribute": "resultAttribute"
|
|
237
|
+
},
|
|
238
|
+
"branches": [
|
|
239
|
+
{
|
|
240
|
+
"id": "recorded",
|
|
241
|
+
"field": "recorded",
|
|
242
|
+
"optional": false
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"id": "providerRejected",
|
|
246
|
+
"field": "providerRejected",
|
|
247
|
+
"optional": true
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "uncertain",
|
|
251
|
+
"field": "uncertain",
|
|
252
|
+
"optional": true
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "defect",
|
|
256
|
+
"field": "defect",
|
|
257
|
+
"optional": true
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|