@lorikeetai/node-sdk 0.1.0-alpha.1 → 0.1.0-alpha.6
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 +59 -0
- package/README.md +34 -23
- package/_shims/MultipartBody.js.map +1 -1
- package/_shims/MultipartBody.mjs.map +1 -1
- package/_shims/auto/runtime-bun.d.ts.map +1 -1
- package/_shims/auto/runtime-bun.js.map +1 -1
- package/_shims/auto/runtime-node.d.ts.map +1 -1
- package/_shims/auto/runtime-node.js.map +1 -1
- package/_shims/auto/runtime.d.ts.map +1 -1
- package/_shims/auto/runtime.js.map +1 -1
- package/_shims/auto/types-node.d.ts.map +1 -1
- package/_shims/auto/types-node.js.map +1 -1
- package/_shims/auto/types.d.ts +52 -52
- package/_shims/bun-runtime.d.ts.map +1 -1
- package/_shims/bun-runtime.js +1 -2
- package/_shims/bun-runtime.js.map +1 -1
- package/_shims/bun-runtime.mjs.map +1 -1
- package/_shims/index.d.ts +36 -36
- package/_shims/index.js +5 -5
- package/_shims/index.mjs +4 -4
- package/_shims/node-runtime.d.ts.map +1 -1
- package/_shims/node-runtime.js +1 -2
- package/_shims/node-runtime.js.map +1 -1
- package/_shims/node-runtime.mjs.map +1 -1
- package/_shims/node-types.d.ts +27 -27
- package/_shims/registry.d.ts.map +1 -1
- package/_shims/registry.js +2 -2
- package/_shims/registry.js.map +1 -1
- package/_shims/registry.mjs.map +1 -1
- package/_shims/web-runtime.d.ts.map +1 -1
- package/_shims/web-runtime.js +1 -2
- package/_shims/web-runtime.js.map +1 -1
- package/_shims/web-runtime.mjs.map +1 -1
- package/_shims/web-types.d.ts +52 -52
- package/core.d.ts +2 -4
- package/core.d.ts.map +1 -1
- package/core.js +7 -6
- package/core.js.map +1 -1
- package/core.mjs +2 -1
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/error.js.map +1 -1
- package/error.mjs.map +1 -1
- package/index.d.mts +12 -19
- package/index.d.ts +12 -19
- package/index.d.ts.map +1 -1
- package/index.js +20 -43
- package/index.js.map +1 -1
- package/index.mjs +19 -42
- package/index.mjs.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.js.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +1 -2
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/types.d.ts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +9 -9
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/lib/generate-signature.d.ts +5 -0
- package/lib/generate-signature.d.ts.map +1 -0
- package/lib/generate-signature.js +19 -0
- package/lib/generate-signature.js.map +1 -0
- package/lib/generate-signature.mjs +13 -0
- package/lib/generate-signature.mjs.map +1 -0
- package/package.json +15 -13
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/conversation/chat.d.ts +89 -0
- package/resources/conversation/chat.d.ts.map +1 -0
- package/resources/conversation/chat.js +20 -0
- package/resources/conversation/chat.js.map +1 -0
- package/resources/conversation/chat.mjs +16 -0
- package/resources/conversation/chat.mjs.map +1 -0
- package/resources/conversation/conversation.d.ts +15 -0
- package/resources/conversation/conversation.d.ts.map +1 -0
- package/resources/{store/store.js → conversation/conversation.js} +9 -22
- package/resources/conversation/conversation.js.map +1 -0
- package/resources/conversation/conversation.mjs +13 -0
- package/resources/conversation/conversation.mjs.map +1 -0
- package/resources/conversation/index.d.ts +3 -0
- package/resources/conversation/index.d.ts.map +1 -0
- package/resources/conversation/index.js +9 -0
- package/resources/conversation/index.js.map +1 -0
- package/resources/conversation/index.mjs +4 -0
- package/resources/conversation/index.mjs.map +1 -0
- package/resources/conversation.d.ts +0 -41
- package/resources/conversation.d.ts.map +1 -1
- package/resources/conversation.js +0 -14
- package/resources/conversation.js.map +1 -1
- package/resources/conversation.mjs +0 -14
- package/resources/conversation.mjs.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/ingest.d.ts +1 -53
- package/resources/ingest.d.ts.map +1 -1
- package/resources/ingest.js +2 -25
- package/resources/ingest.js.map +1 -1
- package/resources/ingest.mjs +2 -25
- package/resources/ingest.mjs.map +1 -1
- package/resources/token.d.ts +28 -0
- package/resources/token.d.ts.map +1 -0
- package/resources/token.js +17 -0
- package/resources/token.js.map +1 -0
- package/resources/token.mjs +13 -0
- package/resources/token.mjs.map +1 -0
- package/shims/node.d.ts +0 -4
- package/shims/node.d.ts.map +1 -1
- package/shims/node.js +0 -25
- package/shims/node.js.map +1 -1
- package/shims/node.mjs +0 -1
- package/shims/node.mjs.map +1 -1
- package/shims/web.d.ts.map +1 -1
- package/shims/web.js +0 -25
- package/shims/web.js.map +1 -1
- package/shims/web.mjs +0 -1
- package/shims/web.mjs.map +1 -1
- package/src/_shims/MultipartBody.ts +1 -1
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/auto/types.d.ts +52 -52
- package/src/_shims/bun-runtime.ts +6 -6
- package/src/_shims/index.d.ts +36 -36
- package/src/_shims/index.js +5 -5
- package/src/_shims/index.mjs +4 -4
- package/src/_shims/node-runtime.ts +32 -32
- package/src/_shims/node-types.d.ts +27 -27
- package/src/_shims/registry.ts +44 -44
- package/src/_shims/web-runtime.ts +16 -16
- package/src/_shims/web-types.d.ts +52 -52
- package/src/core.ts +373 -373
- package/src/error.ts +37 -37
- package/src/index.ts +79 -111
- package/src/internal/qs/formats.ts +5 -5
- package/src/internal/qs/index.ts +5 -5
- package/src/internal/qs/stringify.ts +98 -98
- package/src/internal/qs/types.ts +52 -52
- package/src/internal/qs/utils.ts +87 -87
- package/src/lib/generate-signature.ts +13 -0
- package/src/resource.ts +3 -3
- package/src/resources/conversation/chat.ts +114 -0
- package/src/resources/conversation/conversation.ts +18 -0
- package/src/resources/conversation/index.ts +12 -0
- package/src/resources/conversation.ts +2 -59
- package/src/resources/index.ts +3 -13
- package/src/resources/ingest.ts +5 -84
- package/src/resources/token.ts +40 -0
- package/src/shims/node.ts +24 -24
- package/src/shims/web.ts +24 -24
- package/src/uploads.ts +75 -74
- package/src/version.ts +1 -1
- package/uploads.d.ts +2 -2
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -4
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -2
- package/uploads.mjs.map +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/resources/pets.d.ts +0 -157
- package/resources/pets.d.ts.map +0 -1
- package/resources/pets.js +0 -75
- package/resources/pets.js.map +0 -1
- package/resources/pets.mjs +0 -71
- package/resources/pets.mjs.map +0 -1
- package/resources/shared.d.ts +0 -12
- package/resources/shared.d.ts.map +0 -1
- package/resources/shared.js +0 -4
- package/resources/shared.js.map +0 -1
- package/resources/shared.mjs +0 -3
- package/resources/shared.mjs.map +0 -1
- package/resources/store/index.d.ts +0 -3
- package/resources/store/index.d.ts.map +0 -1
- package/resources/store/index.js +0 -9
- package/resources/store/index.js.map +0 -1
- package/resources/store/index.mjs +0 -4
- package/resources/store/index.mjs.map +0 -1
- package/resources/store/order.d.ts +0 -16
- package/resources/store/order.d.ts.map +0 -1
- package/resources/store/order.js +0 -26
- package/resources/store/order.js.map +0 -1
- package/resources/store/order.mjs +0 -22
- package/resources/store/order.mjs.map +0 -1
- package/resources/store/store.d.ts +0 -35
- package/resources/store/store.d.ts.map +0 -1
- package/resources/store/store.js.map +0 -1
- package/resources/store/store.mjs +0 -26
- package/resources/store/store.mjs.map +0 -1
- package/resources/user.d.ts +0 -96
- package/resources/user.d.ts.map +0 -1
- package/resources/user.js +0 -65
- package/resources/user.js.map +0 -1
- package/resources/user.mjs +0 -61
- package/resources/user.mjs.map +0 -1
- package/src/resources/pets.ts +0 -276
- package/src/resources/shared.ts +0 -18
- package/src/resources/store/index.ts +0 -4
- package/src/resources/store/order.ts +0 -26
- package/src/resources/store/store.ts +0 -59
- package/src/resources/user.ts +0 -185
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.6 (2024-10-30)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* chore: fix no git checks ([b937333](https://github.com/optechai/node-sdk/commit/b937333af237ad5b8e9cca9af68ce5087983d1cd))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.5 (2024-10-30)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([#20](https://github.com/optechai/node-sdk/issues/20)) ([171a387](https://github.com/optechai/node-sdk/commit/171a387c16ad5b2b54c199c5426382d02b5ae4b5))
|
|
18
|
+
* chore: add ubuntu-latest-m ([b46e897](https://github.com/optechai/node-sdk/commit/b46e897b8c1d186f3c4ca85c6aa679955e7578e2))
|
|
19
|
+
* chore: try this ([679bb85](https://github.com/optechai/node-sdk/commit/679bb85b050cc5980ad3a67170a538900b40032f))
|
|
20
|
+
|
|
21
|
+
## 0.1.0-alpha.4 (2024-10-30)
|
|
22
|
+
|
|
23
|
+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* chore: try this for publish ([53747b7](https://github.com/optechai/node-sdk/commit/53747b7cb8462a2bee382a5cd582e2dff0dbcdb8))
|
|
28
|
+
|
|
29
|
+
## 0.1.0-alpha.3 (2024-10-30)
|
|
30
|
+
|
|
31
|
+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* chore: add base url ([a4f19e1](https://github.com/optechai/node-sdk/commit/a4f19e18cf9298444a21f375d3d6b35582822692))
|
|
36
|
+
* chore: format ([12eae60](https://github.com/optechai/node-sdk/commit/12eae60eb0ad49c944bfac52054d940e32ebf8aa))
|
|
37
|
+
* chore: further tweak of test ([13c1043](https://github.com/optechai/node-sdk/commit/13c1043da4be0e4817910a12f5f02900aa83f8ee))
|
|
38
|
+
* chore: reinstance node-fetch ([c13b575](https://github.com/optechai/node-sdk/commit/c13b5751d2dad94fc2d372fa2bc69264243134e0))
|
|
39
|
+
* fix: more type fixes ([5aa5680](https://github.com/optechai/node-sdk/commit/5aa5680fe99cc432e64f419c9ad2f3a975640cb7))
|
|
40
|
+
* fix: resolve type errors ([d1c689f](https://github.com/optechai/node-sdk/commit/d1c689f57bdfa8e650cae7e8ce988aa5db05b9c5))
|
|
41
|
+
* various codegen changes ([ed11dc6](https://github.com/optechai/node-sdk/commit/ed11dc6b5666384ccd3b7cb9db2d184a8fc4cea4))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* main branch ([933bfe9](https://github.com/optechai/node-sdk/commit/933bfe984e459281c1e9602695ec898fc9cdab5e))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Chores
|
|
50
|
+
|
|
51
|
+
* update ci/actions ([645e253](https://github.com/optechai/node-sdk/commit/645e253adc9448e5ec9a7f7084d59025886fcb61))
|
|
52
|
+
|
|
53
|
+
## 0.1.0-alpha.2 (2024-10-28)
|
|
54
|
+
|
|
55
|
+
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
* **api:** update via SDK Studio ([#6](https://github.com/optechai/node-sdk/issues/6)) ([3078f36](https://github.com/optechai/node-sdk/commit/3078f360f3957f91352415fa834418c5f8b05b71))
|
|
60
|
+
* **api:** update via SDK Studio ([#8](https://github.com/optechai/node-sdk/issues/8)) ([deaf9d5](https://github.com/optechai/node-sdk/commit/deaf9d58eb28691faae681527ec062e29eaa5b9e))
|
|
61
|
+
|
|
3
62
|
## 0.1.0-alpha.1 (2024-10-25)
|
|
4
63
|
|
|
5
64
|
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/optechai/node-sdk/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
|
package/README.md
CHANGED
|
@@ -23,11 +23,12 @@ The full API of this library can be found in [api.md](api.md).
|
|
|
23
23
|
import Lorikeet from '@lorikeetai/node-sdk';
|
|
24
24
|
|
|
25
25
|
const client = new Lorikeet({
|
|
26
|
-
|
|
26
|
+
clientId: process.env['LORIKEET_CLIENT_ID'], // This is the default and can be omitted
|
|
27
|
+
clientSecret: 'My Client Secret',
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
async function main() {
|
|
30
|
-
const response = await client.conversation.start();
|
|
31
|
+
const response = await client.conversation.chat.start({ customerId: 'blah' });
|
|
31
32
|
|
|
32
33
|
console.log(response.conversationId);
|
|
33
34
|
}
|
|
@@ -44,11 +45,13 @@ This library includes TypeScript definitions for all request params and response
|
|
|
44
45
|
import Lorikeet from '@lorikeetai/node-sdk';
|
|
45
46
|
|
|
46
47
|
const client = new Lorikeet({
|
|
47
|
-
|
|
48
|
+
clientId: process.env['LORIKEET_CLIENT_ID'], // This is the default and can be omitted
|
|
49
|
+
clientSecret: 'My Client Secret',
|
|
48
50
|
});
|
|
49
51
|
|
|
50
52
|
async function main() {
|
|
51
|
-
const
|
|
53
|
+
const params: Lorikeet.Conversation.ChatStartParams = { customerId: 'blah' };
|
|
54
|
+
const response: Lorikeet.Conversation.ChatStartResponse = await client.conversation.chat.start(params);
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
main();
|
|
@@ -65,7 +68,7 @@ a subclass of `APIError` will be thrown:
|
|
|
65
68
|
<!-- prettier-ignore -->
|
|
66
69
|
```ts
|
|
67
70
|
async function main() {
|
|
68
|
-
const response = await client.conversation.start().catch(async (err) => {
|
|
71
|
+
const response = await client.conversation.chat.start({ customerId: 'blah' }).catch(async (err) => {
|
|
69
72
|
if (err instanceof Lorikeet.APIError) {
|
|
70
73
|
console.log(err.status); // 400
|
|
71
74
|
console.log(err.name); // BadRequestError
|
|
@@ -105,10 +108,11 @@ You can use the `maxRetries` option to configure or disable this:
|
|
|
105
108
|
// Configure the default for all requests:
|
|
106
109
|
const client = new Lorikeet({
|
|
107
110
|
maxRetries: 0, // default is 2
|
|
111
|
+
clientSecret: 'My Client Secret',
|
|
108
112
|
});
|
|
109
113
|
|
|
110
114
|
// Or, configure per-request:
|
|
111
|
-
await client.conversation.start({
|
|
115
|
+
await client.conversation.chat.start({ customerId: 'blah' }, {
|
|
112
116
|
maxRetries: 5,
|
|
113
117
|
});
|
|
114
118
|
```
|
|
@@ -122,10 +126,11 @@ Requests time out after 1 minute by default. You can configure this with a `time
|
|
|
122
126
|
// Configure the default for all requests:
|
|
123
127
|
const client = new Lorikeet({
|
|
124
128
|
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
129
|
+
clientSecret: 'My Client Secret',
|
|
125
130
|
});
|
|
126
131
|
|
|
127
132
|
// Override per-request:
|
|
128
|
-
await client.conversation.start({
|
|
133
|
+
await client.conversation.chat.start({ customerId: 'blah' }, {
|
|
129
134
|
timeout: 5 * 1000,
|
|
130
135
|
});
|
|
131
136
|
```
|
|
@@ -146,11 +151,13 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
|
|
|
146
151
|
```ts
|
|
147
152
|
const client = new Lorikeet();
|
|
148
153
|
|
|
149
|
-
const response = await client.conversation.start().asResponse();
|
|
154
|
+
const response = await client.conversation.chat.start({ customerId: 'blah' }).asResponse();
|
|
150
155
|
console.log(response.headers.get('X-My-Header'));
|
|
151
156
|
console.log(response.statusText); // access the underlying Response object
|
|
152
157
|
|
|
153
|
-
const { data: response, response: raw } = await client.conversation.
|
|
158
|
+
const { data: response, response: raw } = await client.conversation.chat
|
|
159
|
+
.start({ customerId: 'blah' })
|
|
160
|
+
.withResponse();
|
|
154
161
|
console.log(raw.headers.get('X-My-Header'));
|
|
155
162
|
console.log(response.conversationId);
|
|
156
163
|
```
|
|
@@ -169,7 +176,7 @@ Options on the client, such as retries, will be respected when making these requ
|
|
|
169
176
|
await client.post('/some/path', {
|
|
170
177
|
body: { some_prop: 'foo' },
|
|
171
178
|
query: { some_query_arg: 'bar' },
|
|
172
|
-
})
|
|
179
|
+
})
|
|
173
180
|
```
|
|
174
181
|
|
|
175
182
|
#### Undocumented request params
|
|
@@ -184,7 +191,7 @@ client.foo.create({
|
|
|
184
191
|
bar: 12,
|
|
185
192
|
// @ts-expect-error baz is not yet public
|
|
186
193
|
baz: 'undocumented option',
|
|
187
|
-
})
|
|
194
|
+
})
|
|
188
195
|
```
|
|
189
196
|
|
|
190
197
|
For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
|
|
@@ -210,8 +217,8 @@ add the following import before your first import `from "Lorikeet"`:
|
|
|
210
217
|
```ts
|
|
211
218
|
// Tell TypeScript and the package to use the global web fetch instead of node-fetch.
|
|
212
219
|
// Note, despite the name, this does not add any polyfills, but expects them to be provided if needed.
|
|
213
|
-
import '@lorikeetai/node-sdk/shims/web'
|
|
214
|
-
import Lorikeet from '@lorikeetai/node-sdk'
|
|
220
|
+
import '@lorikeetai/node-sdk/shims/web'
|
|
221
|
+
import Lorikeet from '@lorikeetai/node-sdk'
|
|
215
222
|
```
|
|
216
223
|
|
|
217
224
|
To do the inverse, add `import "@lorikeetai/node-sdk/shims/node"` (which does import polyfills).
|
|
@@ -223,17 +230,17 @@ You may also provide a custom `fetch` function when instantiating the client,
|
|
|
223
230
|
which can be used to inspect or alter the `Request` or `Response` before/after each request:
|
|
224
231
|
|
|
225
232
|
```ts
|
|
226
|
-
import { fetch } from 'undici'
|
|
227
|
-
import Lorikeet from '@lorikeetai/node-sdk'
|
|
233
|
+
import { fetch } from 'undici' // as one example
|
|
234
|
+
import Lorikeet from '@lorikeetai/node-sdk'
|
|
228
235
|
|
|
229
236
|
const client = new Lorikeet({
|
|
230
237
|
fetch: async (url: RequestInfo, init?: RequestInit): Promise<Response> => {
|
|
231
|
-
console.log('About to make a request', url, init)
|
|
232
|
-
const response = await fetch(url, init)
|
|
233
|
-
console.log('Got response', response)
|
|
234
|
-
return response
|
|
238
|
+
console.log('About to make a request', url, init)
|
|
239
|
+
const response = await fetch(url, init)
|
|
240
|
+
console.log('Got response', response)
|
|
241
|
+
return response
|
|
235
242
|
},
|
|
236
|
-
})
|
|
243
|
+
})
|
|
237
244
|
```
|
|
238
245
|
|
|
239
246
|
Note that if given a `DEBUG=true` environment variable, this library will log all requests and responses automatically.
|
|
@@ -253,12 +260,16 @@ import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
|
253
260
|
// Configure the default for all requests:
|
|
254
261
|
const client = new Lorikeet({
|
|
255
262
|
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
|
|
263
|
+
clientSecret: 'My Client Secret',
|
|
256
264
|
});
|
|
257
265
|
|
|
258
266
|
// Override per-request:
|
|
259
|
-
await client.conversation.start(
|
|
260
|
-
|
|
261
|
-
|
|
267
|
+
await client.conversation.chat.start(
|
|
268
|
+
{ customerId: 'blah' },
|
|
269
|
+
{
|
|
270
|
+
httpAgent: new http.Agent({ keepAlive: false }),
|
|
271
|
+
},
|
|
272
|
+
);
|
|
262
273
|
```
|
|
263
274
|
|
|
264
275
|
## Semantic versioning
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultipartBody.js","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"MultipartBody.js","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAA;IACxB,CAAC;CACF;AALD,sCAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultipartBody.mjs","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"MultipartBody.mjs","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAA;IACxB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bun.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,
|
|
1
|
+
{"version":3,"file":"runtime-bun.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bun.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"runtime-bun.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iBAAiB,
|
|
1
|
+
{"version":3,"file":"runtime-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-node.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"runtime-node.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qDAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,eAAe,
|
|
1
|
+
{"version":3,"file":"types-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-node.js","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"types-node.js","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,mDAA6B"}
|
package/_shims/auto/types.d.ts
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
|
-
export type Agent = any
|
|
4
|
+
export type Agent = any
|
|
5
5
|
|
|
6
6
|
// @ts-ignore
|
|
7
|
-
declare const _fetch: unknown extends typeof fetch ? never : typeof fetch
|
|
8
|
-
export { _fetch as fetch }
|
|
7
|
+
declare const _fetch: unknown extends typeof fetch ? never : typeof fetch
|
|
8
|
+
export { _fetch as fetch }
|
|
9
9
|
|
|
10
10
|
// @ts-ignore
|
|
11
|
-
type _Request = unknown extends Request ? never : Request
|
|
12
|
-
export { _Request as Request }
|
|
11
|
+
type _Request = unknown extends Request ? never : Request
|
|
12
|
+
export { _Request as Request }
|
|
13
13
|
|
|
14
14
|
// @ts-ignore
|
|
15
|
-
type _RequestInfo = unknown extends RequestInfo ? never : RequestInfo
|
|
16
|
-
export { type _RequestInfo as RequestInfo }
|
|
15
|
+
type _RequestInfo = unknown extends RequestInfo ? never : RequestInfo
|
|
16
|
+
export { type _RequestInfo as RequestInfo }
|
|
17
17
|
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
type _RequestInit = unknown extends RequestInit ? never : RequestInit
|
|
20
|
-
export { type _RequestInit as RequestInit }
|
|
19
|
+
type _RequestInit = unknown extends RequestInit ? never : RequestInit
|
|
20
|
+
export { type _RequestInit as RequestInit }
|
|
21
21
|
|
|
22
22
|
// @ts-ignore
|
|
23
|
-
type _Response = unknown extends Response ? never : Response
|
|
24
|
-
export { _Response as Response }
|
|
23
|
+
type _Response = unknown extends Response ? never : Response
|
|
24
|
+
export { _Response as Response }
|
|
25
25
|
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
type _ResponseInit = unknown extends ResponseInit ? never : ResponseInit
|
|
28
|
-
export { type _ResponseInit as ResponseInit }
|
|
27
|
+
type _ResponseInit = unknown extends ResponseInit ? never : ResponseInit
|
|
28
|
+
export { type _ResponseInit as ResponseInit }
|
|
29
29
|
|
|
30
30
|
// @ts-ignore
|
|
31
|
-
type _ResponseType = unknown extends ResponseType ? never : ResponseType
|
|
32
|
-
export { type _ResponseType as ResponseType }
|
|
31
|
+
type _ResponseType = unknown extends ResponseType ? never : ResponseType
|
|
32
|
+
export { type _ResponseType as ResponseType }
|
|
33
33
|
|
|
34
34
|
// @ts-ignore
|
|
35
|
-
type _BodyInit = unknown extends BodyInit ? never : BodyInit
|
|
36
|
-
export { type _BodyInit as BodyInit }
|
|
35
|
+
type _BodyInit = unknown extends BodyInit ? never : BodyInit
|
|
36
|
+
export { type _BodyInit as BodyInit }
|
|
37
37
|
|
|
38
38
|
// @ts-ignore
|
|
39
|
-
type _Headers = unknown extends Headers ? never : Headers
|
|
40
|
-
export { _Headers as Headers }
|
|
39
|
+
type _Headers = unknown extends Headers ? never : Headers
|
|
40
|
+
export { _Headers as Headers }
|
|
41
41
|
|
|
42
42
|
// @ts-ignore
|
|
43
|
-
type _HeadersInit = unknown extends HeadersInit ? never : HeadersInit
|
|
44
|
-
export { type _HeadersInit as HeadersInit }
|
|
43
|
+
type _HeadersInit = unknown extends HeadersInit ? never : HeadersInit
|
|
44
|
+
export { type _HeadersInit as HeadersInit }
|
|
45
45
|
|
|
46
|
-
type EndingType = 'native' | 'transparent'
|
|
46
|
+
type EndingType = 'native' | 'transparent'
|
|
47
47
|
|
|
48
48
|
export interface BlobPropertyBag {
|
|
49
|
-
endings?: EndingType
|
|
50
|
-
type?: string
|
|
49
|
+
endings?: EndingType
|
|
50
|
+
type?: string
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export interface FilePropertyBag extends BlobPropertyBag {
|
|
54
|
-
lastModified?: number
|
|
54
|
+
lastModified?: number
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'
|
|
57
|
+
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>
|
|
58
58
|
|
|
59
59
|
// @ts-ignore
|
|
60
|
-
type _FormData = unknown extends FormData ? never : FormData
|
|
60
|
+
type _FormData = unknown extends FormData ? never : FormData
|
|
61
61
|
// @ts-ignore
|
|
62
|
-
declare const _FormData: unknown extends typeof FormData ? never : typeof FormData
|
|
63
|
-
export { _FormData as FormData }
|
|
62
|
+
declare const _FormData: unknown extends typeof FormData ? never : typeof FormData
|
|
63
|
+
export { _FormData as FormData }
|
|
64
64
|
|
|
65
65
|
// @ts-ignore
|
|
66
|
-
type _File = unknown extends File ? never : File
|
|
66
|
+
type _File = unknown extends File ? never : File
|
|
67
67
|
// @ts-ignore
|
|
68
|
-
declare const _File: unknown extends typeof File ? never : typeof File
|
|
69
|
-
export { _File as File }
|
|
68
|
+
declare const _File: unknown extends typeof File ? never : typeof File
|
|
69
|
+
export { _File as File }
|
|
70
70
|
|
|
71
71
|
// @ts-ignore
|
|
72
|
-
type _Blob = unknown extends Blob ? never : Blob
|
|
72
|
+
type _Blob = unknown extends Blob ? never : Blob
|
|
73
73
|
// @ts-ignore
|
|
74
|
-
declare const _Blob: unknown extends typeof Blob ? never : typeof Blob
|
|
75
|
-
export { _Blob as Blob }
|
|
74
|
+
declare const _Blob: unknown extends typeof Blob ? never : typeof Blob
|
|
75
|
+
export { _Blob as Blob }
|
|
76
76
|
|
|
77
77
|
export declare class Readable {
|
|
78
|
-
readable: boolean
|
|
79
|
-
readonly readableEnded: boolean
|
|
80
|
-
readonly readableFlowing: boolean | null
|
|
81
|
-
readonly readableHighWaterMark: number
|
|
82
|
-
readonly readableLength: number
|
|
83
|
-
readonly readableObjectMode: boolean
|
|
84
|
-
destroyed: boolean
|
|
85
|
-
read(size?: number): any
|
|
86
|
-
pause(): this
|
|
87
|
-
resume(): this
|
|
88
|
-
isPaused(): boolean
|
|
89
|
-
destroy(error?: Error): this
|
|
90
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<any
|
|
78
|
+
readable: boolean
|
|
79
|
+
readonly readableEnded: boolean
|
|
80
|
+
readonly readableFlowing: boolean | null
|
|
81
|
+
readonly readableHighWaterMark: number
|
|
82
|
+
readonly readableLength: number
|
|
83
|
+
readonly readableObjectMode: boolean
|
|
84
|
+
destroyed: boolean
|
|
85
|
+
read(size?: number): any
|
|
86
|
+
pause(): this
|
|
87
|
+
resume(): this
|
|
88
|
+
isPaused(): boolean
|
|
89
|
+
destroy(error?: Error): this
|
|
90
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<any>
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
export declare class FsReadStream extends Readable {
|
|
94
|
-
path: {}
|
|
94
|
+
path: {} // node type is string | Buffer
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// @ts-ignore
|
|
98
|
-
type _ReadableStream<R = any> = unknown extends ReadableStream<R> ? never : ReadableStream<R
|
|
98
|
+
type _ReadableStream<R = any> = unknown extends ReadableStream<R> ? never : ReadableStream<R>
|
|
99
99
|
// @ts-ignore
|
|
100
|
-
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream
|
|
101
|
-
export { _ReadableStream as ReadableStream }
|
|
100
|
+
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream
|
|
101
|
+
export { _ReadableStream as ReadableStream }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun-runtime.d.ts","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"bun-runtime.d.ts","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAA;AAIvC,wBAAgB,UAAU,IAAI,KAAK,CAMlC"}
|
package/_shims/bun-runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRuntime =
|
|
3
|
+
exports.getRuntime = getRuntime;
|
|
4
4
|
const web_runtime_1 = require("./web-runtime.js");
|
|
5
5
|
const node_fs_1 = require("node:fs");
|
|
6
6
|
function getRuntime() {
|
|
@@ -10,5 +10,4 @@ function getRuntime() {
|
|
|
10
10
|
}
|
|
11
11
|
return { ...runtime, isFsReadStream };
|
|
12
12
|
}
|
|
13
|
-
exports.getRuntime = getRuntime;
|
|
14
13
|
//# sourceMappingURL=bun-runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun-runtime.js","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bun-runtime.js","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":";;AAOA,gCAMC;AATD,kDAA2D;AAC3D,qCAAoD;AAEpD,SAAgB,UAAU;IACxB,MAAM,OAAO,GAAG,IAAA,wBAAa,GAAE,CAAA;IAC/B,SAAS,cAAc,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,oBAAY,CAAA;IACtC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAA;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun-runtime.mjs","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"OAIO,EAAE,UAAU,IAAI,aAAa,EAAE;OAC/B,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,SAAS;AAEpD,MAAM,UAAU,UAAU;IACxB,MAAM,OAAO,GAAG,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"bun-runtime.mjs","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"OAIO,EAAE,UAAU,IAAI,aAAa,EAAE;OAC/B,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,SAAS;AAEpD,MAAM,UAAU,UAAU;IACxB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAA;IAC/B,SAAS,cAAc,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,YAAY,CAAA;IACtC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAA;AACvC,CAAC"}
|
package/_shims/index.d.ts
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
|
-
import { manual } from "./manual-types.js"
|
|
5
|
-
import * as auto from '@lorikeetai/node-sdk/_shims/auto/types'
|
|
6
|
-
import { type RequestOptions } from "../core.js"
|
|
4
|
+
import { manual } from "./manual-types.js"
|
|
5
|
+
import * as auto from '@lorikeetai/node-sdk/_shims/auto/types'
|
|
6
|
+
import { type RequestOptions } from "../core.js"
|
|
7
7
|
|
|
8
|
-
type SelectType<Manual, Auto> = unknown extends Manual ? Auto : Manual
|
|
8
|
+
type SelectType<Manual, Auto> = unknown extends Manual ? Auto : Manual
|
|
9
9
|
|
|
10
|
-
export const kind: string
|
|
10
|
+
export const kind: string
|
|
11
11
|
|
|
12
12
|
// @ts-ignore
|
|
13
|
-
export type Agent = SelectType<manual.Agent, auto.Agent
|
|
13
|
+
export type Agent = SelectType<manual.Agent, auto.Agent>
|
|
14
14
|
|
|
15
15
|
// @ts-ignore
|
|
16
|
-
export const fetch: SelectType<typeof manual.fetch, typeof auto.fetch
|
|
16
|
+
export const fetch: SelectType<typeof manual.fetch, typeof auto.fetch>
|
|
17
17
|
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
export type Request = SelectType<manual.Request, auto.Request
|
|
19
|
+
export type Request = SelectType<manual.Request, auto.Request>
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
export type RequestInfo = SelectType<manual.RequestInfo, auto.RequestInfo
|
|
21
|
+
export type RequestInfo = SelectType<manual.RequestInfo, auto.RequestInfo>
|
|
22
22
|
// @ts-ignore
|
|
23
|
-
export type RequestInit = SelectType<manual.RequestInit, auto.RequestInit
|
|
23
|
+
export type RequestInit = SelectType<manual.RequestInit, auto.RequestInit>
|
|
24
24
|
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
export type Response = SelectType<manual.Response, auto.Response
|
|
26
|
+
export type Response = SelectType<manual.Response, auto.Response>
|
|
27
27
|
// @ts-ignore
|
|
28
|
-
export type ResponseInit = SelectType<manual.ResponseInit, auto.ResponseInit
|
|
28
|
+
export type ResponseInit = SelectType<manual.ResponseInit, auto.ResponseInit>
|
|
29
29
|
// @ts-ignore
|
|
30
|
-
export type ResponseType = SelectType<manual.ResponseType, auto.ResponseType
|
|
30
|
+
export type ResponseType = SelectType<manual.ResponseType, auto.ResponseType>
|
|
31
31
|
// @ts-ignore
|
|
32
|
-
export type BodyInit = SelectType<manual.BodyInit, auto.BodyInit
|
|
32
|
+
export type BodyInit = SelectType<manual.BodyInit, auto.BodyInit>
|
|
33
33
|
// @ts-ignore
|
|
34
|
-
export type Headers = SelectType<manual.Headers, auto.Headers
|
|
34
|
+
export type Headers = SelectType<manual.Headers, auto.Headers>
|
|
35
35
|
// @ts-ignore
|
|
36
|
-
export const Headers: SelectType<typeof manual.Headers, typeof auto.Headers
|
|
36
|
+
export const Headers: SelectType<typeof manual.Headers, typeof auto.Headers>
|
|
37
37
|
// @ts-ignore
|
|
38
|
-
export type HeadersInit = SelectType<manual.HeadersInit, auto.HeadersInit
|
|
38
|
+
export type HeadersInit = SelectType<manual.HeadersInit, auto.HeadersInit>
|
|
39
39
|
|
|
40
40
|
// @ts-ignore
|
|
41
|
-
export type BlobPropertyBag = SelectType<manual.BlobPropertyBag, auto.BlobPropertyBag
|
|
41
|
+
export type BlobPropertyBag = SelectType<manual.BlobPropertyBag, auto.BlobPropertyBag>
|
|
42
42
|
// @ts-ignore
|
|
43
|
-
export type FilePropertyBag = SelectType<manual.FilePropertyBag, auto.FilePropertyBag
|
|
43
|
+
export type FilePropertyBag = SelectType<manual.FilePropertyBag, auto.FilePropertyBag>
|
|
44
44
|
// @ts-ignore
|
|
45
|
-
export type FileFromPathOptions = SelectType<manual.FileFromPathOptions, auto.FileFromPathOptions
|
|
45
|
+
export type FileFromPathOptions = SelectType<manual.FileFromPathOptions, auto.FileFromPathOptions>
|
|
46
46
|
// @ts-ignore
|
|
47
|
-
export type FormData = SelectType<manual.FormData, auto.FormData
|
|
47
|
+
export type FormData = SelectType<manual.FormData, auto.FormData>
|
|
48
48
|
// @ts-ignore
|
|
49
|
-
export const FormData: SelectType<typeof manual.FormData, typeof auto.FormData
|
|
49
|
+
export const FormData: SelectType<typeof manual.FormData, typeof auto.FormData>
|
|
50
50
|
// @ts-ignore
|
|
51
|
-
export type File = SelectType<manual.File, auto.File
|
|
51
|
+
export type File = SelectType<manual.File, auto.File>
|
|
52
52
|
// @ts-ignore
|
|
53
|
-
export const File: SelectType<typeof manual.File, typeof auto.File
|
|
53
|
+
export const File: SelectType<typeof manual.File, typeof auto.File>
|
|
54
54
|
// @ts-ignore
|
|
55
|
-
export type Blob = SelectType<manual.Blob, auto.Blob
|
|
55
|
+
export type Blob = SelectType<manual.Blob, auto.Blob>
|
|
56
56
|
// @ts-ignore
|
|
57
|
-
export const Blob: SelectType<typeof manual.Blob, typeof auto.Blob
|
|
57
|
+
export const Blob: SelectType<typeof manual.Blob, typeof auto.Blob>
|
|
58
58
|
|
|
59
59
|
// @ts-ignore
|
|
60
|
-
export type Readable = SelectType<manual.Readable, auto.Readable
|
|
60
|
+
export type Readable = SelectType<manual.Readable, auto.Readable>
|
|
61
61
|
// @ts-ignore
|
|
62
|
-
export type FsReadStream = SelectType<manual.FsReadStream, auto.FsReadStream
|
|
62
|
+
export type FsReadStream = SelectType<manual.FsReadStream, auto.FsReadStream>
|
|
63
63
|
// @ts-ignore
|
|
64
|
-
export type ReadableStream = SelectType<manual.ReadableStream, auto.ReadableStream
|
|
64
|
+
export type ReadableStream = SelectType<manual.ReadableStream, auto.ReadableStream>
|
|
65
65
|
// @ts-ignore
|
|
66
|
-
export const ReadableStream: SelectType<typeof manual.ReadableStream, typeof auto.ReadableStream
|
|
66
|
+
export const ReadableStream: SelectType<typeof manual.ReadableStream, typeof auto.ReadableStream>
|
|
67
67
|
|
|
68
68
|
export function getMultipartRequestOptions<T = Record<string, unknown>>(
|
|
69
69
|
form: FormData,
|
|
70
70
|
opts: RequestOptions<T>,
|
|
71
|
-
): Promise<RequestOptions<T
|
|
71
|
+
): Promise<RequestOptions<T>>
|
|
72
72
|
|
|
73
|
-
export function getDefaultAgent(url: string): any
|
|
73
|
+
export function getDefaultAgent(url: string): any
|
|
74
74
|
|
|
75
75
|
// @ts-ignore
|
|
76
|
-
export type FileFromPathOptions = SelectType<manual.FileFromPathOptions, auto.FileFromPathOptions
|
|
76
|
+
export type FileFromPathOptions = SelectType<manual.FileFromPathOptions, auto.FileFromPathOptions>
|
|
77
77
|
|
|
78
|
-
export function fileFromPath(path: string, options?: FileFromPathOptions): Promise<File
|
|
79
|
-
export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File
|
|
78
|
+
export function fileFromPath(path: string, options?: FileFromPathOptions): Promise<File>
|
|
79
|
+
export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File>
|
|
80
80
|
|
|
81
|
-
export function isFsReadStream(value: any): value is FsReadStream
|
|
81
|
+
export function isFsReadStream(value: any): value is FsReadStream
|
package/_shims/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
|
-
const shims = require('./registry')
|
|
5
|
-
const auto = require('@lorikeetai/node-sdk/_shims/auto/runtime')
|
|
6
|
-
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true })
|
|
4
|
+
const shims = require('./registry')
|
|
5
|
+
const auto = require('@lorikeetai/node-sdk/_shims/auto/runtime')
|
|
6
|
+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true })
|
|
7
7
|
for (const property of Object.keys(shims)) {
|
|
8
8
|
Object.defineProperty(exports, property, {
|
|
9
9
|
get() {
|
|
10
|
-
return shims[property]
|
|
10
|
+
return shims[property]
|
|
11
11
|
},
|
|
12
|
-
})
|
|
12
|
+
})
|
|
13
13
|
}
|
package/_shims/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
|
-
import * as shims from './registry.mjs'
|
|
5
|
-
import * as auto from '@lorikeetai/node-sdk/_shims/auto/runtime'
|
|
6
|
-
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true })
|
|
7
|
-
export * from './registry.mjs'
|
|
4
|
+
import * as shims from './registry.mjs'
|
|
5
|
+
import * as auto from '@lorikeetai/node-sdk/_shims/auto/runtime'
|
|
6
|
+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true })
|
|
7
|
+
export * from './registry.mjs'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-runtime.d.ts","sourceRoot":"","sources":["../src/_shims/node-runtime.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"node-runtime.d.ts","sourceRoot":"","sources":["../src/_shims/node-runtime.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAA;AA6CvC,wBAAgB,UAAU,IAAI,KAAK,CAqBlC"}
|
package/_shims/node-runtime.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.getRuntime =
|
|
29
|
+
exports.getRuntime = getRuntime;
|
|
30
30
|
/**
|
|
31
31
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
32
32
|
*/
|
|
@@ -85,5 +85,4 @@ function getRuntime() {
|
|
|
85
85
|
isFsReadStream: (value) => value instanceof node_fs_1.ReadStream,
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
exports.getRuntime = getRuntime;
|
|
89
88
|
//# sourceMappingURL=node-runtime.js.map
|