@lorikeetai/node-sdk 0.1.0-alpha.1 → 0.1.0-alpha.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.
Files changed (217) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +35 -24
  3. package/_shims/MultipartBody.js.map +1 -1
  4. package/_shims/MultipartBody.mjs.map +1 -1
  5. package/_shims/auto/runtime-bun.d.ts.map +1 -1
  6. package/_shims/auto/runtime-bun.js.map +1 -1
  7. package/_shims/auto/runtime-node.d.ts.map +1 -1
  8. package/_shims/auto/runtime-node.js.map +1 -1
  9. package/_shims/auto/runtime.d.ts.map +1 -1
  10. package/_shims/auto/runtime.js.map +1 -1
  11. package/_shims/auto/types-node.d.ts.map +1 -1
  12. package/_shims/auto/types-node.js.map +1 -1
  13. package/_shims/auto/types.d.ts +52 -52
  14. package/_shims/bun-runtime.d.ts.map +1 -1
  15. package/_shims/bun-runtime.js +1 -2
  16. package/_shims/bun-runtime.js.map +1 -1
  17. package/_shims/bun-runtime.mjs.map +1 -1
  18. package/_shims/index.d.ts +36 -36
  19. package/_shims/index.js +5 -5
  20. package/_shims/index.mjs +4 -4
  21. package/_shims/node-runtime.d.ts.map +1 -1
  22. package/_shims/node-runtime.js +1 -2
  23. package/_shims/node-runtime.js.map +1 -1
  24. package/_shims/node-runtime.mjs.map +1 -1
  25. package/_shims/node-types.d.ts +27 -27
  26. package/_shims/registry.d.ts.map +1 -1
  27. package/_shims/registry.js +2 -2
  28. package/_shims/registry.js.map +1 -1
  29. package/_shims/registry.mjs.map +1 -1
  30. package/_shims/web-runtime.d.ts.map +1 -1
  31. package/_shims/web-runtime.js +1 -2
  32. package/_shims/web-runtime.js.map +1 -1
  33. package/_shims/web-runtime.mjs.map +1 -1
  34. package/_shims/web-types.d.ts +52 -52
  35. package/core.d.ts +2 -4
  36. package/core.d.ts.map +1 -1
  37. package/core.js +7 -6
  38. package/core.js.map +1 -1
  39. package/core.mjs +2 -1
  40. package/core.mjs.map +1 -1
  41. package/error.d.ts.map +1 -1
  42. package/error.js.map +1 -1
  43. package/error.mjs.map +1 -1
  44. package/index.d.mts +14 -20
  45. package/index.d.ts +14 -20
  46. package/index.d.ts.map +1 -1
  47. package/index.js +29 -45
  48. package/index.js.map +1 -1
  49. package/index.mjs +28 -44
  50. package/index.mjs.map +1 -1
  51. package/internal/qs/formats.d.ts.map +1 -1
  52. package/internal/qs/formats.js.map +1 -1
  53. package/internal/qs/formats.mjs.map +1 -1
  54. package/internal/qs/index.d.ts.map +1 -1
  55. package/internal/qs/index.js.map +1 -1
  56. package/internal/qs/index.mjs.map +1 -1
  57. package/internal/qs/stringify.d.ts.map +1 -1
  58. package/internal/qs/stringify.js +1 -2
  59. package/internal/qs/stringify.js.map +1 -1
  60. package/internal/qs/stringify.mjs.map +1 -1
  61. package/internal/qs/types.d.ts.map +1 -1
  62. package/internal/qs/utils.d.ts.map +1 -1
  63. package/internal/qs/utils.js +9 -9
  64. package/internal/qs/utils.js.map +1 -1
  65. package/internal/qs/utils.mjs.map +1 -1
  66. package/lib/generate-signature.d.ts +5 -0
  67. package/lib/generate-signature.d.ts.map +1 -0
  68. package/lib/generate-signature.js +19 -0
  69. package/lib/generate-signature.js.map +1 -0
  70. package/lib/generate-signature.mjs +13 -0
  71. package/lib/generate-signature.mjs.map +1 -0
  72. package/package.json +16 -14
  73. package/resource.d.ts.map +1 -1
  74. package/resource.js.map +1 -1
  75. package/resource.mjs.map +1 -1
  76. package/resources/conversation/chat.d.ts +79 -0
  77. package/resources/conversation/chat.d.ts.map +1 -0
  78. package/resources/conversation/chat.js +20 -0
  79. package/resources/conversation/chat.js.map +1 -0
  80. package/resources/conversation/chat.mjs +16 -0
  81. package/resources/conversation/chat.mjs.map +1 -0
  82. package/resources/conversation/conversation.d.ts +15 -0
  83. package/resources/conversation/conversation.d.ts.map +1 -0
  84. package/resources/{store/store.js → conversation/conversation.js} +9 -22
  85. package/resources/conversation/conversation.js.map +1 -0
  86. package/resources/conversation/conversation.mjs +13 -0
  87. package/resources/conversation/conversation.mjs.map +1 -0
  88. package/resources/conversation/index.d.ts +3 -0
  89. package/resources/conversation/index.d.ts.map +1 -0
  90. package/resources/conversation/index.js +9 -0
  91. package/resources/conversation/index.js.map +1 -0
  92. package/resources/conversation/index.mjs +4 -0
  93. package/resources/conversation/index.mjs.map +1 -0
  94. package/resources/conversation.d.ts +0 -41
  95. package/resources/conversation.d.ts.map +1 -1
  96. package/resources/conversation.js +0 -14
  97. package/resources/conversation.js.map +1 -1
  98. package/resources/conversation.mjs +0 -14
  99. package/resources/conversation.mjs.map +1 -1
  100. package/resources/index.d.ts +3 -2
  101. package/resources/index.d.ts.map +1 -1
  102. package/resources/index.js +4 -2
  103. package/resources/index.js.map +1 -1
  104. package/resources/index.mjs +3 -2
  105. package/resources/index.mjs.map +1 -1
  106. package/resources/ingest.d.ts +1 -53
  107. package/resources/ingest.d.ts.map +1 -1
  108. package/resources/ingest.js +2 -25
  109. package/resources/ingest.js.map +1 -1
  110. package/resources/ingest.mjs +2 -25
  111. package/resources/ingest.mjs.map +1 -1
  112. package/resources/token.d.ts +28 -0
  113. package/resources/token.d.ts.map +1 -0
  114. package/resources/token.js +18 -0
  115. package/resources/token.js.map +1 -0
  116. package/resources/token.mjs +14 -0
  117. package/resources/token.mjs.map +1 -0
  118. package/shims/node.d.ts +0 -4
  119. package/shims/node.d.ts.map +1 -1
  120. package/shims/node.js +0 -25
  121. package/shims/node.js.map +1 -1
  122. package/shims/node.mjs +0 -1
  123. package/shims/node.mjs.map +1 -1
  124. package/shims/web.d.ts.map +1 -1
  125. package/shims/web.js +0 -25
  126. package/shims/web.js.map +1 -1
  127. package/shims/web.mjs +0 -1
  128. package/shims/web.mjs.map +1 -1
  129. package/src/_shims/MultipartBody.ts +1 -1
  130. package/src/_shims/auto/runtime-bun.ts +1 -1
  131. package/src/_shims/auto/runtime-node.ts +1 -1
  132. package/src/_shims/auto/runtime.ts +1 -1
  133. package/src/_shims/auto/types-node.ts +1 -1
  134. package/src/_shims/auto/types.d.ts +52 -52
  135. package/src/_shims/bun-runtime.ts +6 -6
  136. package/src/_shims/index.d.ts +36 -36
  137. package/src/_shims/index.js +5 -5
  138. package/src/_shims/index.mjs +4 -4
  139. package/src/_shims/node-runtime.ts +32 -32
  140. package/src/_shims/node-types.d.ts +27 -27
  141. package/src/_shims/registry.ts +44 -44
  142. package/src/_shims/web-runtime.ts +16 -16
  143. package/src/_shims/web-types.d.ts +52 -52
  144. package/src/core.ts +373 -373
  145. package/src/error.ts +37 -37
  146. package/src/index.ts +88 -112
  147. package/src/internal/qs/formats.ts +5 -5
  148. package/src/internal/qs/index.ts +5 -5
  149. package/src/internal/qs/stringify.ts +98 -98
  150. package/src/internal/qs/types.ts +52 -52
  151. package/src/internal/qs/utils.ts +87 -87
  152. package/src/lib/generate-signature.ts +13 -0
  153. package/src/resource.ts +3 -3
  154. package/src/resources/conversation/chat.ts +102 -0
  155. package/src/resources/conversation/conversation.ts +18 -0
  156. package/src/resources/conversation/index.ts +12 -0
  157. package/src/resources/conversation.ts +2 -59
  158. package/src/resources/index.ts +3 -13
  159. package/src/resources/ingest.ts +5 -84
  160. package/src/resources/token.ts +41 -0
  161. package/src/shims/node.ts +24 -24
  162. package/src/shims/web.ts +24 -24
  163. package/src/uploads.ts +75 -74
  164. package/src/version.ts +1 -1
  165. package/uploads.d.ts +2 -2
  166. package/uploads.d.ts.map +1 -1
  167. package/uploads.js +3 -4
  168. package/uploads.js.map +1 -1
  169. package/uploads.mjs +1 -2
  170. package/uploads.mjs.map +1 -1
  171. package/version.d.ts +1 -1
  172. package/version.d.ts.map +1 -1
  173. package/version.js +1 -1
  174. package/version.js.map +1 -1
  175. package/version.mjs +1 -1
  176. package/version.mjs.map +1 -1
  177. package/resources/pets.d.ts +0 -157
  178. package/resources/pets.d.ts.map +0 -1
  179. package/resources/pets.js +0 -75
  180. package/resources/pets.js.map +0 -1
  181. package/resources/pets.mjs +0 -71
  182. package/resources/pets.mjs.map +0 -1
  183. package/resources/shared.d.ts +0 -12
  184. package/resources/shared.d.ts.map +0 -1
  185. package/resources/shared.js +0 -4
  186. package/resources/shared.js.map +0 -1
  187. package/resources/shared.mjs +0 -3
  188. package/resources/shared.mjs.map +0 -1
  189. package/resources/store/index.d.ts +0 -3
  190. package/resources/store/index.d.ts.map +0 -1
  191. package/resources/store/index.js +0 -9
  192. package/resources/store/index.js.map +0 -1
  193. package/resources/store/index.mjs +0 -4
  194. package/resources/store/index.mjs.map +0 -1
  195. package/resources/store/order.d.ts +0 -16
  196. package/resources/store/order.d.ts.map +0 -1
  197. package/resources/store/order.js +0 -26
  198. package/resources/store/order.js.map +0 -1
  199. package/resources/store/order.mjs +0 -22
  200. package/resources/store/order.mjs.map +0 -1
  201. package/resources/store/store.d.ts +0 -35
  202. package/resources/store/store.d.ts.map +0 -1
  203. package/resources/store/store.js.map +0 -1
  204. package/resources/store/store.mjs +0 -26
  205. package/resources/store/store.mjs.map +0 -1
  206. package/resources/user.d.ts +0 -96
  207. package/resources/user.d.ts.map +0 -1
  208. package/resources/user.js +0 -65
  209. package/resources/user.js.map +0 -1
  210. package/resources/user.mjs +0 -61
  211. package/resources/user.mjs.map +0 -1
  212. package/src/resources/pets.ts +0 -276
  213. package/src/resources/shared.ts +0 -18
  214. package/src/resources/store/index.ts +0 -4
  215. package/src/resources/store/order.ts +0 -26
  216. package/src/resources/store/store.ts +0 -59
  217. package/src/resources/user.ts +0 -185
package/CHANGELOG.md CHANGED
@@ -1,5 +1,96 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.10 (2024-10-31)
4
+
5
+ Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
6
+
7
+ ### Features
8
+
9
+ * fix: update the way auth headers are constructed ([952d4ed](https://github.com/optechai/node-sdk/commit/952d4ed907c082f37c47b0dac5f5c75889d9d363))
10
+
11
+ ## 0.1.0-alpha.9 (2024-10-31)
12
+
13
+ Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **api:** stainless config updates ([#30](https://github.com/optechai/node-sdk/issues/30)) ([e83c14c](https://github.com/optechai/node-sdk/commit/e83c14c123f2c421a922d4bfe26a2ec84223a6d3))
18
+
19
+ ## 0.1.0-alpha.8 (2024-10-31)
20
+
21
+ Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
22
+
23
+ ### Features
24
+
25
+ * feat: add auth ([3e564ab](https://github.com/optechai/node-sdk/commit/3e564abee9abd0168ec7abf891254d26e3831c55))
26
+
27
+ ## 0.1.0-alpha.7 (2024-10-30)
28
+
29
+ Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/optechai/node-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
30
+
31
+ ### Features
32
+
33
+ * **api:** api update ([#25](https://github.com/optechai/node-sdk/issues/25)) ([486a6de](https://github.com/optechai/node-sdk/commit/486a6dee4c9f3f9fab34cc88ec57263667ae2302))
34
+
35
+ ## 0.1.0-alpha.6 (2024-10-30)
36
+
37
+ 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)
38
+
39
+ ### Features
40
+
41
+ * chore: fix no git checks ([b937333](https://github.com/optechai/node-sdk/commit/b937333af237ad5b8e9cca9af68ce5087983d1cd))
42
+
43
+ ## 0.1.0-alpha.5 (2024-10-30)
44
+
45
+ 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)
46
+
47
+ ### Features
48
+
49
+ * **api:** api update ([#20](https://github.com/optechai/node-sdk/issues/20)) ([171a387](https://github.com/optechai/node-sdk/commit/171a387c16ad5b2b54c199c5426382d02b5ae4b5))
50
+ * chore: add ubuntu-latest-m ([b46e897](https://github.com/optechai/node-sdk/commit/b46e897b8c1d186f3c4ca85c6aa679955e7578e2))
51
+ * chore: try this ([679bb85](https://github.com/optechai/node-sdk/commit/679bb85b050cc5980ad3a67170a538900b40032f))
52
+
53
+ ## 0.1.0-alpha.4 (2024-10-30)
54
+
55
+ 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)
56
+
57
+ ### Features
58
+
59
+ * chore: try this for publish ([53747b7](https://github.com/optechai/node-sdk/commit/53747b7cb8462a2bee382a5cd582e2dff0dbcdb8))
60
+
61
+ ## 0.1.0-alpha.3 (2024-10-30)
62
+
63
+ 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)
64
+
65
+ ### Features
66
+
67
+ * chore: add base url ([a4f19e1](https://github.com/optechai/node-sdk/commit/a4f19e18cf9298444a21f375d3d6b35582822692))
68
+ * chore: format ([12eae60](https://github.com/optechai/node-sdk/commit/12eae60eb0ad49c944bfac52054d940e32ebf8aa))
69
+ * chore: further tweak of test ([13c1043](https://github.com/optechai/node-sdk/commit/13c1043da4be0e4817910a12f5f02900aa83f8ee))
70
+ * chore: reinstance node-fetch ([c13b575](https://github.com/optechai/node-sdk/commit/c13b5751d2dad94fc2d372fa2bc69264243134e0))
71
+ * fix: more type fixes ([5aa5680](https://github.com/optechai/node-sdk/commit/5aa5680fe99cc432e64f419c9ad2f3a975640cb7))
72
+ * fix: resolve type errors ([d1c689f](https://github.com/optechai/node-sdk/commit/d1c689f57bdfa8e650cae7e8ce988aa5db05b9c5))
73
+ * various codegen changes ([ed11dc6](https://github.com/optechai/node-sdk/commit/ed11dc6b5666384ccd3b7cb9db2d184a8fc4cea4))
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * main branch ([933bfe9](https://github.com/optechai/node-sdk/commit/933bfe984e459281c1e9602695ec898fc9cdab5e))
79
+
80
+
81
+ ### Chores
82
+
83
+ * update ci/actions ([645e253](https://github.com/optechai/node-sdk/commit/645e253adc9448e5ec9a7f7084d59025886fcb61))
84
+
85
+ ## 0.1.0-alpha.2 (2024-10-28)
86
+
87
+ 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)
88
+
89
+ ### Features
90
+
91
+ * **api:** update via SDK Studio ([#6](https://github.com/optechai/node-sdk/issues/6)) ([3078f36](https://github.com/optechai/node-sdk/commit/3078f360f3957f91352415fa834418c5f8b05b71))
92
+ * **api:** update via SDK Studio ([#8](https://github.com/optechai/node-sdk/issues/8)) ([deaf9d5](https://github.com/optechai/node-sdk/commit/deaf9d58eb28691faae681527ec062e29eaa5b9e))
93
+
3
94
  ## 0.1.0-alpha.1 (2024-10-25)
4
95
 
5
96
  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
@@ -4,7 +4,7 @@
4
4
 
5
5
  This library provides convenient access to the Lorikeet REST API from server-side TypeScript or JavaScript.
6
6
 
7
- The REST API documentation can be found on [docs.lorikeet.ai](https://docs.lorikeet.ai). The full API of this library can be found in [api.md](api.md).
7
+ The REST API documentation can be found on [docs.lorikeetcx.ai](https://docs.lorikeetcx.ai). The full API of this library can be found in [api.md](api.md).
8
8
 
9
9
  It is generated with [Stainless](https://www.stainlessapi.com/).
10
10
 
@@ -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
- bearerToken: process.env['LORIKEET_CLIENT_ID'], // This is the default and can be omitted
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
- bearerToken: process.env['LORIKEET_CLIENT_ID'], // This is the default and can be omitted
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 response: Lorikeet.ConversationStartResponse = await client.conversation.start();
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.start().withResponse();
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'; // as one example
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
- httpAgent: new http.Agent({ keepAlive: false }),
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,CAAC;IACzB,CAAC;CACF;AALD,sCAKC"}
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,CAAC;IACzB,CAAC;CACF"}
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,CAAC"}
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,oDAA+B"}
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,CAAC"}
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,qDAAgC"}
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,CAAC"}
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,oDAA+B"}
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,CAAC"}
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,mDAA8B"}
1
+ {"version":3,"file":"types-node.js","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,mDAA6B"}
@@ -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: {}; // node type is string | Buffer
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,CAAC;AAIxC,wBAAgB,UAAU,IAAI,KAAK,CAMlC"}
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"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntime = void 0;
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":";;;AAIA,kDAA4D;AAC5D,qCAAqD;AAErD,SAAgB,UAAU;IACxB,MAAM,OAAO,GAAG,IAAA,wBAAa,GAAE,CAAC;IAChC,SAAS,cAAc,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,oBAAY,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC;AACxC,CAAC;AAND,gCAMC"}
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,CAAC;IAChC,SAAS,cAAc,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,YAAY,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC;AACxC,CAAC"}
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
  }