conductor-node 12.0.0-beta.1 → 12.0.0-beta.10
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/CHANGELOG.md +89 -0
- package/README.md +32 -27
- package/index.d.mts +4 -4
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-sessions.d.ts +11 -15
- package/resources/auth-sessions.d.ts.map +1 -1
- package/resources/auth-sessions.js +2 -8
- package/resources/auth-sessions.js.map +1 -1
- package/resources/auth-sessions.mjs +2 -8
- package/resources/auth-sessions.mjs.map +1 -1
- package/resources/end-users.d.ts +20 -32
- package/resources/end-users.d.ts.map +1 -1
- package/resources/end-users.js +4 -12
- package/resources/end-users.js.map +1 -1
- package/resources/end-users.mjs +4 -12
- package/resources/end-users.mjs.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/qbd/employees.d.ts +72 -30
- package/resources/qbd/employees.d.ts.map +1 -1
- package/resources/qbd/employees.js.map +1 -1
- package/resources/qbd/employees.mjs.map +1 -1
- package/resources/qbd/index.d.ts +2 -1
- package/resources/qbd/index.d.ts.map +1 -1
- package/resources/qbd/index.js +4 -1
- package/resources/qbd/index.js.map +1 -1
- package/resources/qbd/index.mjs +1 -0
- package/resources/qbd/index.mjs.map +1 -1
- package/resources/qbd/inventory-assembly-items.d.ts +1 -1
- package/resources/qbd/inventory-assembly-items.d.ts.map +1 -1
- package/resources/qbd/inventory-items.d.ts +1 -1
- package/resources/qbd/inventory-items.d.ts.map +1 -1
- package/resources/qbd/qbd.d.ts +32 -0
- package/resources/qbd/qbd.d.ts.map +1 -1
- package/resources/qbd/qbd.js +20 -0
- package/resources/qbd/qbd.js.map +1 -1
- package/resources/qbd/qbd.mjs +20 -0
- package/resources/qbd/qbd.mjs.map +1 -1
- package/resources/qbd/time-tracking-activities.d.ts +485 -0
- package/resources/qbd/time-tracking-activities.d.ts.map +1 -0
- package/resources/qbd/time-tracking-activities.js +66 -0
- package/resources/qbd/time-tracking-activities.js.map +1 -0
- package/resources/qbd/time-tracking-activities.mjs +61 -0
- package/resources/qbd/time-tracking-activities.mjs.map +1 -0
- package/src/index.ts +6 -4
- package/src/resources/auth-sessions.ts +11 -18
- package/src/resources/end-users.ts +19 -40
- package/src/resources/index.ts +1 -2
- package/src/resources/qbd/employees.ts +72 -30
- package/src/resources/qbd/index.ts +12 -1
- package/src/resources/qbd/inventory-assembly-items.ts +1 -1
- package/src/resources/qbd/inventory-items.ts +1 -1
- package/src/resources/qbd/qbd.ts +73 -0
- package/src/resources/qbd/time-tracking-activities.ts +615 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,94 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 12.0.0-beta.10 (2025-02-27)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v12.0.0-beta.9...v12.0.0-beta.10](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.9...v12.0.0-beta.10)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([#60](https://github.com/conductor-is/quickbooks-desktop-node/issues/60)) ([a064331](https://github.com/conductor-is/quickbooks-desktop-node/commit/a064331a99ac20e3fde0669d09ec369a3bf929d2))
|
|
10
|
+
* **api:** api update ([#62](https://github.com/conductor-is/quickbooks-desktop-node/issues/62)) ([30c55c2](https://github.com/conductor-is/quickbooks-desktop-node/commit/30c55c2f2f88c390f4fb7dd65fdb0ae741d6b609))
|
|
11
|
+
* **api:** api update ([#63](https://github.com/conductor-is/quickbooks-desktop-node/issues/63)) ([e9d35b2](https://github.com/conductor-is/quickbooks-desktop-node/commit/e9d35b2d757eb838993d10aed1a968f5ce135f83))
|
|
12
|
+
|
|
13
|
+
## 12.0.0-beta.9 (2025-02-24)
|
|
14
|
+
|
|
15
|
+
Full Changelog: [v12.0.0-beta.8...v12.0.0-beta.9](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.8...v12.0.0-beta.9)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **api:** api update ([#56](https://github.com/conductor-is/quickbooks-desktop-node/issues/56)) ([5ae43e7](https://github.com/conductor-is/quickbooks-desktop-node/commit/5ae43e734811448f8be026adc3a083987db14a56))
|
|
20
|
+
* **api:** api update ([#58](https://github.com/conductor-is/quickbooks-desktop-node/issues/58)) ([19059e8](https://github.com/conductor-is/quickbooks-desktop-node/commit/19059e8441810fe594960dbf3af995ea6ac9e4ca))
|
|
21
|
+
|
|
22
|
+
## 12.0.0-beta.8 (2025-02-24)
|
|
23
|
+
|
|
24
|
+
Full Changelog: [v12.0.0-beta.7...v12.0.0-beta.8](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.7...v12.0.0-beta.8)
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **api:** api update ([#52](https://github.com/conductor-is/quickbooks-desktop-node/issues/52)) ([da93300](https://github.com/conductor-is/quickbooks-desktop-node/commit/da9330019d5f88069dfb3fef452ee8d49b3dbc68))
|
|
29
|
+
* **api:** api update ([#54](https://github.com/conductor-is/quickbooks-desktop-node/issues/54)) ([e1a287d](https://github.com/conductor-is/quickbooks-desktop-node/commit/e1a287d2f4264cf229c20ee3db0399e568f00b9a))
|
|
30
|
+
|
|
31
|
+
## 12.0.0-beta.7 (2025-02-23)
|
|
32
|
+
|
|
33
|
+
Full Changelog: [v12.0.0-beta.6...v12.0.0-beta.7](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.6...v12.0.0-beta.7)
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
* **api:** api update ([#49](https://github.com/conductor-is/quickbooks-desktop-node/issues/49)) ([22bf279](https://github.com/conductor-is/quickbooks-desktop-node/commit/22bf27956d568b34ad22916c069f91d7eaea3556))
|
|
38
|
+
|
|
39
|
+
## 12.0.0-beta.6 (2025-02-23)
|
|
40
|
+
|
|
41
|
+
Full Changelog: [v12.0.0-beta.5...v12.0.0-beta.6](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.5...v12.0.0-beta.6)
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* **api:** api update ([#46](https://github.com/conductor-is/quickbooks-desktop-node/issues/46)) ([e135bb5](https://github.com/conductor-is/quickbooks-desktop-node/commit/e135bb5465037e64f2f86229d6db7393c923a72b))
|
|
46
|
+
|
|
47
|
+
## 12.0.0-beta.5 (2025-02-23)
|
|
48
|
+
|
|
49
|
+
Full Changelog: [v12.0.0-beta.4...v12.0.0-beta.5](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.4...v12.0.0-beta.5)
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* **api:** api update ([#39](https://github.com/conductor-is/quickbooks-desktop-node/issues/39)) ([2b02cbc](https://github.com/conductor-is/quickbooks-desktop-node/commit/2b02cbc118423a1e65e254eaab43c2cfa8750826))
|
|
54
|
+
* **api:** api update ([#42](https://github.com/conductor-is/quickbooks-desktop-node/issues/42)) ([f4724e0](https://github.com/conductor-is/quickbooks-desktop-node/commit/f4724e09acfcb2567a63510bd6e0b348599aa7f4))
|
|
55
|
+
* **api:** api update ([#43](https://github.com/conductor-is/quickbooks-desktop-node/issues/43)) ([886e7ad](https://github.com/conductor-is/quickbooks-desktop-node/commit/886e7ada0c9f6163dd61386b509bf2e7e8ee228d))
|
|
56
|
+
* **api:** api update ([#44](https://github.com/conductor-is/quickbooks-desktop-node/issues/44)) ([31e96e5](https://github.com/conductor-is/quickbooks-desktop-node/commit/31e96e50ab6042840c48c51d1f88844f8f4e78a2))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Chores
|
|
60
|
+
|
|
61
|
+
* **internal:** fix devcontainers setup ([#41](https://github.com/conductor-is/quickbooks-desktop-node/issues/41)) ([5a94758](https://github.com/conductor-is/quickbooks-desktop-node/commit/5a9475838ba0e5550e2bac06cd5085c2b89f024d))
|
|
62
|
+
|
|
63
|
+
## 12.0.0-beta.4 (2025-02-21)
|
|
64
|
+
|
|
65
|
+
Full Changelog: [v12.0.0-beta.3...v12.0.0-beta.4](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.3...v12.0.0-beta.4)
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
* **api:** api update ([#37](https://github.com/conductor-is/quickbooks-desktop-node/issues/37)) ([2b224de](https://github.com/conductor-is/quickbooks-desktop-node/commit/2b224dee48abe7ccf2a7e251a643341f2fbd40f2))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* **client:** mark some request bodies as optional ([#35](https://github.com/conductor-is/quickbooks-desktop-node/issues/35)) ([7173672](https://github.com/conductor-is/quickbooks-desktop-node/commit/7173672326b1e32040ac18455fb086583ae0b3d8))
|
|
75
|
+
|
|
76
|
+
## 12.0.0-beta.3 (2025-02-19)
|
|
77
|
+
|
|
78
|
+
Full Changelog: [v12.0.0-beta.2...v12.0.0-beta.3](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.2...v12.0.0-beta.3)
|
|
79
|
+
|
|
80
|
+
### Features
|
|
81
|
+
|
|
82
|
+
* **api:** api update ([#32](https://github.com/conductor-is/quickbooks-desktop-node/issues/32)) ([56e5df2](https://github.com/conductor-is/quickbooks-desktop-node/commit/56e5df25621608a7dfc1cd16bb2561f6a82e1b80))
|
|
83
|
+
|
|
84
|
+
## 12.0.0-beta.2 (2025-02-18)
|
|
85
|
+
|
|
86
|
+
Full Changelog: [v12.0.0-beta.1...v12.0.0-beta.2](https://github.com/conductor-is/quickbooks-desktop-node/compare/v12.0.0-beta.1...v12.0.0-beta.2)
|
|
87
|
+
|
|
88
|
+
### Chores
|
|
89
|
+
|
|
90
|
+
* **internal:** codegen related update ([#29](https://github.com/conductor-is/quickbooks-desktop-node/issues/29)) ([8e1d695](https://github.com/conductor-is/quickbooks-desktop-node/commit/8e1d695f94114cd8e494a59f649eaf2e6b2f4779))
|
|
91
|
+
|
|
3
92
|
## 12.0.0-beta.1 (2025-02-15)
|
|
4
93
|
|
|
5
94
|
Full Changelog: [v11.9.0...v12.0.0-beta.1](https://github.com/conductor-is/quickbooks-desktop-node/compare/v11.9.0...v12.0.0-beta.1)
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<img alt="Conductor logo" src="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/d67464b8-53a7-4d33-afeb-05a2efde1fa8" width="325">
|
|
7
7
|
</picture>
|
|
8
8
|
</a>
|
|
9
|
-
<h3>QuickBooks Desktop/Enterprise real-time API for
|
|
9
|
+
<h3>QuickBooks Desktop/Enterprise real-time API for Node.js, Python, and REST</h3>
|
|
10
10
|
<a href="https://docs.conductor.is/quickstart">Quickstart</a>
|
|
11
11
|
<span> • </span>
|
|
12
12
|
<a href="https://conductor.is">Website</a>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<br />
|
|
18
18
|
<br />
|
|
19
19
|
<a href="https://npmjs.com/package/conductor-node"><img src="https://img.shields.io/npm/dm/conductor-node.svg?logo=npm" alt="NPM download count"></a>
|
|
20
|
-
<a href="https://npmjs.org/package/conductor-node"><img src="https://img.shields.io/npm/v/conductor-node.svg?logo=npm" alt="
|
|
20
|
+
<a href="https://npmjs.org/package/conductor-node"><img src="https://img.shields.io/npm/v/conductor-node.svg?logo=npm" alt="NPM version"></a>
|
|
21
21
|
<a href="https://npmjs.org/package/conductor-node"><img src="https://img.shields.io/bundlephobia/minzip/conductor-node" alt="NPM bundle size"></a>
|
|
22
22
|
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage">
|
|
23
23
|
<a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a>
|
|
@@ -28,7 +28,13 @@
|
|
|
28
28
|
|
|
29
29
|
⭐ **Follow our [Quickstart guide](https://docs.conductor.is/quickstart) to get started.**
|
|
30
30
|
|
|
31
|
-
This repository
|
|
31
|
+
This repository contains the official Conductor **Node.js** library, which provides convenient access to our QuickBooks Desktop API from any server-side TypeScript or JavaScript application.
|
|
32
|
+
|
|
33
|
+
- For Python, see [conductor-python](https://github.com/conductor-is/quickbooks-desktop-python).
|
|
34
|
+
|
|
35
|
+
## Documentation
|
|
36
|
+
|
|
37
|
+
The REST API documentation can be found on [docs.conductor.is](https://docs.conductor.is/api-ref). The full API of this library can be found in [api.md](api.md).
|
|
32
38
|
|
|
33
39
|
## Installation
|
|
34
40
|
|
|
@@ -36,10 +42,9 @@ This repository is for the Node.js (TypeScript/JavaScript) library. For Python,
|
|
|
36
42
|
npm install conductor-node@beta
|
|
37
43
|
```
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
> [
|
|
42
|
-
> If migrating from the old `conductor-node` package, see the [migration guide](https://docs.conductor.is/qbd-api/upgrade-node).
|
|
45
|
+
> **Note:** Though this version of the Node.js SDK uses an NPM `@beta` tag, it **_is_ stable and ready for production use**! We merely have a few more endpoints to migrate before prompting all existing users to update. **Any new Conductor users should absolutely use the beta version**!
|
|
46
|
+
>
|
|
47
|
+
> If you're migrating from the old `conductor-node` package, see the [migration guide](https://docs.conductor.is/qbd-api/upgrade-node).
|
|
43
48
|
|
|
44
49
|
## Key features
|
|
45
50
|
|
|
@@ -64,12 +69,12 @@ The full API of this library can be found with code samples at [docs.conductor.i
|
|
|
64
69
|
```js
|
|
65
70
|
import Conductor from 'conductor-node';
|
|
66
71
|
|
|
67
|
-
const
|
|
72
|
+
const conductor = new Conductor({
|
|
68
73
|
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
|
|
69
74
|
});
|
|
70
75
|
|
|
71
76
|
async function main() {
|
|
72
|
-
const page = await
|
|
77
|
+
const page = await conductor.qbd.invoices.list({ conductorEndUserId: 'YOUR_END_USER_ID' });
|
|
73
78
|
const invoice = page.data[0];
|
|
74
79
|
|
|
75
80
|
console.log(invoice.id);
|
|
@@ -86,13 +91,13 @@ This library includes TypeScript definitions for all request params and response
|
|
|
86
91
|
```ts
|
|
87
92
|
import Conductor from 'conductor-node';
|
|
88
93
|
|
|
89
|
-
const
|
|
94
|
+
const conductor = new Conductor({
|
|
90
95
|
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
|
|
91
96
|
});
|
|
92
97
|
|
|
93
98
|
async function main() {
|
|
94
99
|
const params: Conductor.Qbd.InvoiceListParams = { conductorEndUserId: 'YOUR_END_USER_ID' };
|
|
95
|
-
const [invoice]: [Conductor.Qbd.Invoice] = await
|
|
100
|
+
const [invoice]: [Conductor.Qbd.Invoice] = await conductor.qbd.invoices.list(params);
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
main();
|
|
@@ -109,7 +114,7 @@ a subclass of `APIError` will be thrown:
|
|
|
109
114
|
<!-- prettier-ignore -->
|
|
110
115
|
```ts
|
|
111
116
|
async function main() {
|
|
112
|
-
const page = await
|
|
117
|
+
const page = await conductor.qbd.invoices
|
|
113
118
|
.list({ conductorEndUserId: 'YOUR_END_USER_ID' })
|
|
114
119
|
.catch(async (err) => {
|
|
115
120
|
if (err instanceof Conductor.APIError) {
|
|
@@ -149,12 +154,12 @@ You can use the `maxRetries` option to configure or disable this:
|
|
|
149
154
|
<!-- prettier-ignore -->
|
|
150
155
|
```js
|
|
151
156
|
// Configure the default for all requests:
|
|
152
|
-
const
|
|
157
|
+
const conductor = new Conductor({
|
|
153
158
|
maxRetries: 0, // default is 2
|
|
154
159
|
});
|
|
155
160
|
|
|
156
161
|
// Or, configure per-request:
|
|
157
|
-
await
|
|
162
|
+
await conductor.qbd.invoices.list({ conductorEndUserId: 'YOUR_END_USER_ID' }, {
|
|
158
163
|
maxRetries: 5,
|
|
159
164
|
});
|
|
160
165
|
```
|
|
@@ -166,12 +171,12 @@ Requests time out after 2 minutes by default. You can configure this with a `tim
|
|
|
166
171
|
<!-- prettier-ignore -->
|
|
167
172
|
```ts
|
|
168
173
|
// Configure the default for all requests:
|
|
169
|
-
const
|
|
174
|
+
const conductor = new Conductor({
|
|
170
175
|
timeout: 20 * 1000, // 20 seconds (default is 2 minutes)
|
|
171
176
|
});
|
|
172
177
|
|
|
173
178
|
// Override per-request:
|
|
174
|
-
await
|
|
179
|
+
await conductor.qbd.invoices.list({ conductorEndUserId: 'YOUR_END_USER_ID' }, {
|
|
175
180
|
timeout: 5 * 1000,
|
|
176
181
|
});
|
|
177
182
|
```
|
|
@@ -189,7 +194,7 @@ You can use the `for await … of` syntax to iterate through items across all pa
|
|
|
189
194
|
async function fetchAllQbdInvoices(params) {
|
|
190
195
|
const allQbdInvoices = [];
|
|
191
196
|
// Automatically fetches more pages as needed.
|
|
192
|
-
for await (const invoice of
|
|
197
|
+
for await (const invoice of conductor.qbd.invoices.list({ conductorEndUserId: 'YOUR_END_USER_ID' })) {
|
|
193
198
|
allQbdInvoices.push(invoice);
|
|
194
199
|
}
|
|
195
200
|
return allQbdInvoices;
|
|
@@ -199,7 +204,7 @@ async function fetchAllQbdInvoices(params) {
|
|
|
199
204
|
Alternatively, you can request a single page at a time:
|
|
200
205
|
|
|
201
206
|
```ts
|
|
202
|
-
let page = await
|
|
207
|
+
let page = await conductor.qbd.invoices.list({ conductorEndUserId: 'YOUR_END_USER_ID' });
|
|
203
208
|
for (const invoice of page.data) {
|
|
204
209
|
console.log(invoice);
|
|
205
210
|
}
|
|
@@ -221,13 +226,13 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
|
|
|
221
226
|
|
|
222
227
|
<!-- prettier-ignore -->
|
|
223
228
|
```ts
|
|
224
|
-
const
|
|
229
|
+
const conductor = new Conductor();
|
|
225
230
|
|
|
226
|
-
const response = await
|
|
231
|
+
const response = await conductor.qbd.invoices.list({ conductorEndUserId: 'YOUR_END_USER_ID' }).asResponse();
|
|
227
232
|
console.log(response.headers.get('X-My-Header'));
|
|
228
233
|
console.log(response.statusText); // access the underlying Response object
|
|
229
234
|
|
|
230
|
-
const { data: page, response: raw } = await
|
|
235
|
+
const { data: page, response: raw } = await conductor.qbd.invoices
|
|
231
236
|
.list({ conductorEndUserId: 'YOUR_END_USER_ID' })
|
|
232
237
|
.withResponse();
|
|
233
238
|
console.log(raw.headers.get('X-My-Header'));
|
|
@@ -243,11 +248,11 @@ endpoints, params, or response properties, the library can still be used.
|
|
|
243
248
|
|
|
244
249
|
#### Undocumented endpoints
|
|
245
250
|
|
|
246
|
-
To make requests to undocumented endpoints, you can use `
|
|
251
|
+
To make requests to undocumented endpoints, you can use `conductor.get`, `conductor.post`, and other HTTP verbs.
|
|
247
252
|
Options on the client, such as retries, will be respected when making these requests.
|
|
248
253
|
|
|
249
254
|
```ts
|
|
250
|
-
await
|
|
255
|
+
await conductor.post('/some/path', {
|
|
251
256
|
body: { some_prop: 'foo' },
|
|
252
257
|
query: { some_query_arg: 'bar' },
|
|
253
258
|
});
|
|
@@ -260,7 +265,7 @@ parameter. This library doesn't validate at runtime that the request matches the
|
|
|
260
265
|
send will be sent as-is.
|
|
261
266
|
|
|
262
267
|
```ts
|
|
263
|
-
|
|
268
|
+
conductor.foo.create({
|
|
264
269
|
foo: 'my_param',
|
|
265
270
|
bar: 12,
|
|
266
271
|
// @ts-expect-error baz is not yet public
|
|
@@ -307,7 +312,7 @@ which can be used to inspect or alter the `Request` or `Response` before/after e
|
|
|
307
312
|
import { fetch } from 'undici'; // as one example
|
|
308
313
|
import Conductor from 'conductor-node';
|
|
309
314
|
|
|
310
|
-
const
|
|
315
|
+
const conductor = new Conductor({
|
|
311
316
|
fetch: async (url: RequestInfo, init?: RequestInit): Promise<Response> => {
|
|
312
317
|
console.log('About to make a request', url, init);
|
|
313
318
|
const response = await fetch(url, init);
|
|
@@ -332,12 +337,12 @@ import http from 'http';
|
|
|
332
337
|
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
333
338
|
|
|
334
339
|
// Configure the default for all requests:
|
|
335
|
-
const
|
|
340
|
+
const conductor = new Conductor({
|
|
336
341
|
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
|
|
337
342
|
});
|
|
338
343
|
|
|
339
344
|
// Override per-request:
|
|
340
|
-
await
|
|
345
|
+
await conductor.qbd.invoices.list(
|
|
341
346
|
{ conductorEndUserId: 'YOUR_END_USER_ID' },
|
|
342
347
|
{
|
|
343
348
|
httpAgent: new http.Agent({ keepAlive: false }),
|
package/index.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import { type CursorPageParams, CursorPageResponse } from "./pagination.js";
|
|
|
6
6
|
import * as Uploads from "./uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
8
|
import { AuthSession, AuthSessionCreateParams, AuthSessions } from "./resources/auth-sessions.js";
|
|
9
|
-
import { EndUser, EndUserCreateParams, EndUserDeleteResponse, EndUserListResponse, EndUserPassthroughParams, EndUserPassthroughResponse,
|
|
10
|
-
import { Qbd } from "./resources/qbd/qbd.js";
|
|
9
|
+
import { EndUser, EndUserCreateParams, EndUserDeleteResponse, EndUserListResponse, EndUserPassthroughParams, EndUserPassthroughResponse, EndUsers } from "./resources/end-users.js";
|
|
10
|
+
import { Qbd, QbdHealthCheckParams, QbdHealthCheckResponse } from "./resources/qbd/qbd.js";
|
|
11
11
|
export interface ClientOptions {
|
|
12
12
|
/**
|
|
13
13
|
* Defaults to process.env['CONDUCTOR_SECRET_KEY'].
|
|
@@ -112,8 +112,8 @@ export declare namespace Conductor {
|
|
|
112
112
|
export import CursorPage = Pagination.CursorPage;
|
|
113
113
|
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
114
114
|
export { AuthSessions as AuthSessions, type AuthSession as AuthSession, type AuthSessionCreateParams as AuthSessionCreateParams, };
|
|
115
|
-
export { EndUsers as EndUsers, type EndUser as EndUser, type EndUserListResponse as EndUserListResponse, type EndUserDeleteResponse as EndUserDeleteResponse, type EndUserPassthroughResponse as EndUserPassthroughResponse, type
|
|
116
|
-
export { Qbd as Qbd };
|
|
115
|
+
export { EndUsers as EndUsers, type EndUser as EndUser, type EndUserListResponse as EndUserListResponse, type EndUserDeleteResponse as EndUserDeleteResponse, type EndUserPassthroughResponse as EndUserPassthroughResponse, type EndUserCreateParams as EndUserCreateParams, type EndUserPassthroughParams as EndUserPassthroughParams, };
|
|
116
|
+
export { Qbd as Qbd, type QbdHealthCheckResponse as QbdHealthCheckResponse, type QbdHealthCheckParams as QbdHealthCheckParams, };
|
|
117
117
|
}
|
|
118
118
|
export { toFile, fileFromPath } from "./uploads.js";
|
|
119
119
|
export { ConductorError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
|
package/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { type CursorPageParams, CursorPageResponse } from "./pagination.js";
|
|
|
6
6
|
import * as Uploads from "./uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
8
|
import { AuthSession, AuthSessionCreateParams, AuthSessions } from "./resources/auth-sessions.js";
|
|
9
|
-
import { EndUser, EndUserCreateParams, EndUserDeleteResponse, EndUserListResponse, EndUserPassthroughParams, EndUserPassthroughResponse,
|
|
10
|
-
import { Qbd } from "./resources/qbd/qbd.js";
|
|
9
|
+
import { EndUser, EndUserCreateParams, EndUserDeleteResponse, EndUserListResponse, EndUserPassthroughParams, EndUserPassthroughResponse, EndUsers } from "./resources/end-users.js";
|
|
10
|
+
import { Qbd, QbdHealthCheckParams, QbdHealthCheckResponse } from "./resources/qbd/qbd.js";
|
|
11
11
|
export interface ClientOptions {
|
|
12
12
|
/**
|
|
13
13
|
* Defaults to process.env['CONDUCTOR_SECRET_KEY'].
|
|
@@ -112,8 +112,8 @@ export declare namespace Conductor {
|
|
|
112
112
|
export import CursorPage = Pagination.CursorPage;
|
|
113
113
|
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
114
114
|
export { AuthSessions as AuthSessions, type AuthSession as AuthSession, type AuthSessionCreateParams as AuthSessionCreateParams, };
|
|
115
|
-
export { EndUsers as EndUsers, type EndUser as EndUser, type EndUserListResponse as EndUserListResponse, type EndUserDeleteResponse as EndUserDeleteResponse, type EndUserPassthroughResponse as EndUserPassthroughResponse, type
|
|
116
|
-
export { Qbd as Qbd };
|
|
115
|
+
export { EndUsers as EndUsers, type EndUser as EndUser, type EndUserListResponse as EndUserListResponse, type EndUserDeleteResponse as EndUserDeleteResponse, type EndUserPassthroughResponse as EndUserPassthroughResponse, type EndUserCreateParams as EndUserCreateParams, type EndUserPassthroughParams as EndUserPassthroughParams, };
|
|
116
|
+
export { Qbd as Qbd, type QbdHealthCheckResponse as QbdHealthCheckResponse, type QbdHealthCheckParams as QbdHealthCheckParams, };
|
|
117
117
|
}
|
|
118
118
|
export { toFile, fileFromPath } from "./uploads.js";
|
|
119
119
|
export { ConductorError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM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AAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,SAAS,CAAC"}
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,2DAAoC;AACpC,gDAA+B;AAC/B,mDAAkC;AAClC,4DAA2C;AAE3C,sDAAqC;AACrC,0DAAyC;AACzC,gEAA+F;AAC/F,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,2DAAoC;AACpC,gDAA+B;AAC/B,mDAAkC;AAClC,4DAA2C;AAE3C,sDAAqC;AACrC,0DAAyC;AACzC,gEAA+F;AAC/F,wDAQ+B;AAC/B,gDAAwF;AAiExF;;GAEG;AACH,MAAa,SAAU,SAAQ,IAAI,CAAC,SAAS;IAK3C;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC5C,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAC7C,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,cAAc,CAC7B,gMAAgM,CACjM,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,6BAA6B;SAClD,CAAC;QAEF,KAAK,CAAC;YAC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Root":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,EAAE;OACP,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAEf,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAwC,YAAY,EAAE;OACtD,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,EAAE;OACP,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAEf,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAwC,YAAY,EAAE;OACtD,EAOL,QAAQ,GACT;OACM,EAAE,GAAG,EAAgD;AAiE5D;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,IAAI,CAAC,SAAS;IAK3C;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC5C,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAC7C,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,cAAc,CAC7B,gMAAgM,CACjM,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,6BAA6B;SAClD,CAAC;QAEF,KAAK,CAAC;YACJ,OAAO,EAAE,OAAO,CAAC,OAAQ;YACzB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,eAAe;YAClD,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QAOL,iBAAY,GAAqB,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC5D,aAAQ,GA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C,mBAAmB,CAAC;AACjD,6BAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,+BAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrD,kCAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAE3D,gBAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,sBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAG7C,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;OA8Bb,EAAE,MAAM,EAAE,YAAY,EAAE;OACxB,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;AAED,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,24 +2,20 @@ import { APIResource } from "../resource.js";
|
|
|
2
2
|
import * as Core from "../core.js";
|
|
3
3
|
export declare class AuthSessions extends APIResource {
|
|
4
4
|
/**
|
|
5
|
-
* To launch the authentication flow, create an
|
|
6
|
-
* session
|
|
5
|
+
* To launch the authentication flow, create an auth session and pass the returned
|
|
6
|
+
* session's `authFlowUrl` to the client for your end-user to visit in their
|
|
7
7
|
* browser.
|
|
8
8
|
*/
|
|
9
9
|
create(body: AuthSessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<AuthSession>;
|
|
10
|
-
/**
|
|
11
|
-
* Retrieves the details of an AuthSession that has previously been created.
|
|
12
|
-
*/
|
|
13
|
-
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<AuthSession>;
|
|
14
10
|
}
|
|
15
11
|
export interface AuthSession {
|
|
16
12
|
/**
|
|
17
|
-
* The unique identifier for this
|
|
13
|
+
* The unique identifier for this auth session.
|
|
18
14
|
*/
|
|
19
15
|
id: string;
|
|
20
16
|
/**
|
|
21
17
|
* The URL of the authentication flow that you will pass to your client for your
|
|
22
|
-
* user to set up their
|
|
18
|
+
* user to set up their integration connection.
|
|
23
19
|
*/
|
|
24
20
|
authFlowUrl: string;
|
|
25
21
|
/**
|
|
@@ -27,17 +23,17 @@ export interface AuthSession {
|
|
|
27
23
|
*/
|
|
28
24
|
clientSecret: string;
|
|
29
25
|
/**
|
|
30
|
-
* The date and time when this
|
|
26
|
+
* The date and time when this auth session record was created.
|
|
31
27
|
*/
|
|
32
28
|
createdAt: string;
|
|
33
29
|
/**
|
|
34
|
-
* The ID of the
|
|
30
|
+
* The ID of the end-user for whom to create an integration connection.
|
|
35
31
|
*/
|
|
36
32
|
endUserId: string;
|
|
37
33
|
/**
|
|
38
|
-
* The date and time when this
|
|
34
|
+
* The date and time when this auth session expires. By default, this value is 30
|
|
39
35
|
* minutes from creation. You can extend this time by setting `linkExpiryMins` when
|
|
40
|
-
*
|
|
36
|
+
* creating the auth session.
|
|
41
37
|
*/
|
|
42
38
|
expiresAt: string;
|
|
43
39
|
/**
|
|
@@ -53,16 +49,16 @@ export interface AuthSession {
|
|
|
53
49
|
}
|
|
54
50
|
export interface AuthSessionCreateParams {
|
|
55
51
|
/**
|
|
56
|
-
* The ID of the
|
|
52
|
+
* The ID of the end-user for whom to create the integration connection.
|
|
57
53
|
*/
|
|
58
54
|
endUserId: string;
|
|
59
55
|
/**
|
|
60
|
-
* Your Conductor publishable key, which we use to create the session
|
|
56
|
+
* Your Conductor publishable key, which we use to create the auth session's
|
|
61
57
|
* `authFlowUrl`.
|
|
62
58
|
*/
|
|
63
59
|
publishableKey: string;
|
|
64
60
|
/**
|
|
65
|
-
* The number of minutes after which the
|
|
61
|
+
* The number of minutes after which the auth session will expire. Must be at least
|
|
66
62
|
* 15 minutes and no more than 7 days. If not provided, defaults to 30 minutes.
|
|
67
63
|
*/
|
|
68
64
|
linkExpiryMins?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-sessions.d.ts","sourceRoot":"","sources":["../src/resources/auth-sessions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-sessions.d.ts","sourceRoot":"","sources":["../src/resources/auth-sessions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;CAGnG;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,cAAc,CAAC;IAE3B;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,KAAK,uBAAuB,IAAI,uBAAuB,EAAE,CAAC;CACrG"}
|
|
@@ -5,19 +5,13 @@ exports.AuthSessions = void 0;
|
|
|
5
5
|
const resource_1 = require("../resource.js");
|
|
6
6
|
class AuthSessions extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* To launch the authentication flow, create an
|
|
9
|
-
* session
|
|
8
|
+
* To launch the authentication flow, create an auth session and pass the returned
|
|
9
|
+
* session's `authFlowUrl` to the client for your end-user to visit in their
|
|
10
10
|
* browser.
|
|
11
11
|
*/
|
|
12
12
|
create(body, options) {
|
|
13
13
|
return this._client.post('/auth-sessions', { body, ...options });
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Retrieves the details of an AuthSession that has previously been created.
|
|
17
|
-
*/
|
|
18
|
-
retrieve(id, options) {
|
|
19
|
-
return this._client.get(`/auth-sessions/${id}`, options);
|
|
20
|
-
}
|
|
21
15
|
}
|
|
22
16
|
exports.AuthSessions = AuthSessions;
|
|
23
17
|
//# sourceMappingURL=auth-sessions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-sessions.js","sourceRoot":"","sources":["../src/resources/auth-sessions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;OAIG;IACH,MAAM,CAAC,IAA6B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-sessions.js","sourceRoot":"","sources":["../src/resources/auth-sessions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;OAIG;IACH,MAAM,CAAC,IAA6B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AATD,oCASC"}
|
|
@@ -2,18 +2,12 @@
|
|
|
2
2
|
import { APIResource } from "../resource.mjs";
|
|
3
3
|
export class AuthSessions extends APIResource {
|
|
4
4
|
/**
|
|
5
|
-
* To launch the authentication flow, create an
|
|
6
|
-
* session
|
|
5
|
+
* To launch the authentication flow, create an auth session and pass the returned
|
|
6
|
+
* session's `authFlowUrl` to the client for your end-user to visit in their
|
|
7
7
|
* browser.
|
|
8
8
|
*/
|
|
9
9
|
create(body, options) {
|
|
10
10
|
return this._client.post('/auth-sessions', { body, ...options });
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves the details of an AuthSession that has previously been created.
|
|
14
|
-
*/
|
|
15
|
-
retrieve(id, options) {
|
|
16
|
-
return this._client.get(`/auth-sessions/${id}`, options);
|
|
17
|
-
}
|
|
18
12
|
}
|
|
19
13
|
//# sourceMappingURL=auth-sessions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-sessions.mjs","sourceRoot":"","sources":["../src/resources/auth-sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,MAAM,CAAC,IAA6B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-sessions.mjs","sourceRoot":"","sources":["../src/resources/auth-sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,MAAM,CAAC,IAA6B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
|