@lorikeetai/node-sdk 0.13.2 → 1.0.1

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 (202) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/README.md +17 -32
  3. package/core.d.ts +7 -4
  4. package/core.d.ts.map +1 -1
  5. package/core.js +16 -9
  6. package/core.js.map +1 -1
  7. package/core.mjs +16 -9
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +21 -3
  10. package/index.d.ts +21 -3
  11. package/index.d.ts.map +1 -1
  12. package/index.js +31 -7
  13. package/index.js.map +1 -1
  14. package/index.mjs +32 -8
  15. package/index.mjs.map +1 -1
  16. package/internal/qs/formats.d.ts +6 -0
  17. package/internal/qs/formats.d.ts.map +1 -0
  18. package/internal/qs/formats.js +11 -0
  19. package/internal/qs/formats.js.map +1 -0
  20. package/internal/qs/formats.mjs +8 -0
  21. package/internal/qs/formats.mjs.map +1 -0
  22. package/internal/qs/index.d.ts +10 -0
  23. package/internal/qs/index.d.ts.map +1 -0
  24. package/internal/qs/index.js +14 -0
  25. package/internal/qs/index.js.map +1 -0
  26. package/internal/qs/index.mjs +10 -0
  27. package/internal/qs/index.mjs.map +1 -0
  28. package/internal/qs/stringify.d.ts +3 -0
  29. package/internal/qs/stringify.d.ts.map +1 -0
  30. package/internal/qs/stringify.js +279 -0
  31. package/internal/qs/stringify.js.map +1 -0
  32. package/internal/qs/stringify.mjs +276 -0
  33. package/internal/qs/stringify.mjs.map +1 -0
  34. package/internal/qs/types.d.ts +57 -0
  35. package/internal/qs/types.d.ts.map +1 -0
  36. package/internal/qs/types.js +3 -0
  37. package/internal/qs/types.js.map +1 -0
  38. package/internal/qs/types.mjs +2 -0
  39. package/internal/qs/types.mjs.map +1 -0
  40. package/internal/qs/utils.d.ts +14 -0
  41. package/internal/qs/utils.d.ts.map +1 -0
  42. package/internal/qs/utils.js +229 -0
  43. package/internal/qs/utils.js.map +1 -0
  44. package/internal/qs/utils.mjs +217 -0
  45. package/internal/qs/utils.mjs.map +1 -0
  46. package/package.json +1 -5
  47. package/resource.d.ts +1 -1
  48. package/resource.d.ts.map +1 -1
  49. package/resource.js.map +1 -1
  50. package/resource.mjs.map +1 -1
  51. package/resources/conversation/chat.d.ts +19 -164
  52. package/resources/conversation/chat.d.ts.map +1 -1
  53. package/resources/conversation/chat.js.map +1 -1
  54. package/resources/conversation/chat.mjs.map +1 -1
  55. package/resources/conversation/conversation.d.ts +116 -0
  56. package/resources/conversation/conversation.d.ts.map +1 -1
  57. package/resources/conversation/conversation.js +36 -0
  58. package/resources/conversation/conversation.js.map +1 -1
  59. package/resources/conversation/conversation.mjs +36 -0
  60. package/resources/conversation/conversation.mjs.map +1 -1
  61. package/resources/conversation/email.d.ts +19 -164
  62. package/resources/conversation/email.d.ts.map +1 -1
  63. package/resources/conversation/email.js.map +1 -1
  64. package/resources/conversation/email.mjs.map +1 -1
  65. package/resources/conversation/index.d.ts +1 -1
  66. package/resources/conversation/index.d.ts.map +1 -1
  67. package/resources/conversation/index.js.map +1 -1
  68. package/resources/conversation/index.mjs +1 -1
  69. package/resources/conversation/index.mjs.map +1 -1
  70. package/resources/customer/customer.d.ts +296 -0
  71. package/resources/customer/customer.d.ts.map +1 -0
  72. package/resources/customer/customer.js +79 -0
  73. package/resources/customer/customer.js.map +1 -0
  74. package/resources/customer/customer.mjs +52 -0
  75. package/resources/customer/customer.mjs.map +1 -0
  76. package/resources/customer/index.d.ts +3 -0
  77. package/resources/customer/index.d.ts.map +1 -0
  78. package/resources/customer/index.js +9 -0
  79. package/resources/customer/index.js.map +1 -0
  80. package/resources/customer/index.mjs +4 -0
  81. package/resources/customer/index.mjs.map +1 -0
  82. package/resources/customer/profile.d.ts +71 -0
  83. package/resources/customer/profile.d.ts.map +1 -0
  84. package/resources/customer/profile.js +21 -0
  85. package/resources/customer/profile.js.map +1 -0
  86. package/resources/customer/profile.mjs +17 -0
  87. package/resources/customer/profile.mjs.map +1 -0
  88. package/resources/customer.d.ts +1 -291
  89. package/resources/customer.d.ts.map +1 -1
  90. package/resources/customer.js +15 -45
  91. package/resources/customer.js.map +1 -1
  92. package/resources/customer.mjs +1 -43
  93. package/resources/customer.mjs.map +1 -1
  94. package/resources/file.d.ts +7 -0
  95. package/resources/file.d.ts.map +1 -0
  96. package/resources/file.js +21 -0
  97. package/resources/file.js.map +1 -0
  98. package/resources/file.mjs +17 -0
  99. package/resources/file.mjs.map +1 -0
  100. package/resources/index.d.ts +6 -2
  101. package/resources/index.d.ts.map +1 -1
  102. package/resources/index.js +10 -2
  103. package/resources/index.js.map +1 -1
  104. package/resources/index.mjs +6 -2
  105. package/resources/index.mjs.map +1 -1
  106. package/resources/ingest.d.ts +2 -0
  107. package/resources/ingest.d.ts.map +1 -1
  108. package/resources/ingest.js +9 -0
  109. package/resources/ingest.js.map +1 -1
  110. package/resources/ingest.mjs +9 -0
  111. package/resources/ingest.mjs.map +1 -1
  112. package/resources/oauth/authorization.d.ts +6 -0
  113. package/resources/oauth/authorization.d.ts.map +1 -0
  114. package/resources/oauth/authorization.js +15 -0
  115. package/resources/oauth/authorization.js.map +1 -0
  116. package/resources/oauth/authorization.mjs +11 -0
  117. package/resources/oauth/authorization.mjs.map +1 -0
  118. package/resources/oauth/index.d.ts +3 -0
  119. package/resources/oauth/index.d.ts.map +1 -0
  120. package/resources/oauth/index.js +9 -0
  121. package/resources/oauth/index.js.map +1 -0
  122. package/resources/oauth/index.mjs +4 -0
  123. package/resources/oauth/index.mjs.map +1 -0
  124. package/resources/oauth/oauth.d.ts +24 -0
  125. package/resources/oauth/oauth.d.ts.map +1 -0
  126. package/resources/oauth/oauth.js +65 -0
  127. package/resources/oauth/oauth.js.map +1 -0
  128. package/resources/oauth/oauth.mjs +38 -0
  129. package/resources/oauth/oauth.mjs.map +1 -0
  130. package/resources/oauth.d.ts +2 -0
  131. package/resources/oauth.d.ts.map +1 -0
  132. package/resources/oauth.js +19 -0
  133. package/resources/oauth.js.map +1 -0
  134. package/resources/oauth.mjs +3 -0
  135. package/resources/oauth.mjs.map +1 -0
  136. package/resources/suggestion.d.ts +7 -0
  137. package/resources/suggestion.d.ts.map +1 -0
  138. package/resources/suggestion.js +21 -0
  139. package/resources/suggestion.js.map +1 -0
  140. package/resources/suggestion.mjs +17 -0
  141. package/resources/suggestion.mjs.map +1 -0
  142. package/resources/ticket.d.ts +14 -0
  143. package/resources/ticket.d.ts.map +1 -0
  144. package/resources/ticket.js +16 -0
  145. package/resources/ticket.js.map +1 -0
  146. package/resources/ticket.mjs +12 -0
  147. package/resources/ticket.mjs.map +1 -0
  148. package/resources/top-level.d.ts +2 -0
  149. package/resources/top-level.d.ts.map +1 -0
  150. package/resources/top-level.js +4 -0
  151. package/resources/top-level.js.map +1 -0
  152. package/resources/top-level.mjs +3 -0
  153. package/resources/top-level.mjs.map +1 -0
  154. package/resources/webhooks.d.ts +6 -0
  155. package/resources/webhooks.d.ts.map +1 -0
  156. package/resources/webhooks.js +15 -0
  157. package/resources/webhooks.js.map +1 -0
  158. package/resources/webhooks.mjs +11 -0
  159. package/resources/webhooks.mjs.map +1 -0
  160. package/resources/workflow.d.ts +1 -0
  161. package/resources/workflow.d.ts.map +1 -1
  162. package/resources/workflow.js +3 -0
  163. package/resources/workflow.js.map +1 -1
  164. package/resources/workflow.mjs +3 -0
  165. package/resources/workflow.mjs.map +1 -1
  166. package/src/core.ts +17 -8
  167. package/src/index.ts +73 -10
  168. package/src/internal/qs/LICENSE.md +13 -0
  169. package/src/internal/qs/README.md +3 -0
  170. package/src/internal/qs/formats.ts +9 -0
  171. package/src/internal/qs/index.ts +13 -0
  172. package/src/internal/qs/stringify.ts +388 -0
  173. package/src/internal/qs/types.ts +71 -0
  174. package/src/internal/qs/utils.ts +265 -0
  175. package/src/resource.ts +1 -1
  176. package/src/resources/conversation/chat.ts +21 -217
  177. package/src/resources/conversation/conversation.ts +175 -0
  178. package/src/resources/conversation/email.ts +21 -217
  179. package/src/resources/conversation/index.ts +10 -1
  180. package/src/resources/customer/customer.ts +386 -0
  181. package/src/resources/customer/index.ts +13 -0
  182. package/src/resources/customer/profile.ts +89 -0
  183. package/src/resources/customer.ts +1 -372
  184. package/src/resources/file.ts +20 -0
  185. package/src/resources/index.ts +15 -2
  186. package/src/resources/ingest.ts +17 -0
  187. package/src/resources/oauth/authorization.ts +13 -0
  188. package/src/resources/oauth/index.ts +4 -0
  189. package/src/resources/oauth/oauth.ts +63 -0
  190. package/src/resources/oauth.ts +3 -0
  191. package/src/resources/suggestion.ts +20 -0
  192. package/src/resources/ticket.ts +30 -0
  193. package/src/resources/top-level.ts +3 -0
  194. package/src/resources/webhooks.ts +13 -0
  195. package/src/resources/workflow.ts +4 -0
  196. package/src/version.ts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.d.ts.map +1 -1
  199. package/version.js +1 -1
  200. package/version.js.map +1 -1
  201. package/version.mjs +1 -1
  202. package/version.mjs.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,252 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1 (2025-08-12)
4
+
5
+ Full Changelog: [v1.0.0...v1.0.1](https://github.com/optechai/node-sdk/compare/v1.0.0...v1.0.1)
6
+
7
+ ### Features
8
+
9
+ * improved example for customer-profile ([0a5a5aa](https://github.com/optechai/node-sdk/commit/0a5a5aa7b094382e2eb1c062e64fbf8f514ffe64))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * add minimal example for customer profile testing ([fa06b99](https://github.com/optechai/node-sdk/commit/fa06b99a626d5e862003597d94120752ef1ca449))
15
+ * remove duplicate signature in SDK ([44da2bc](https://github.com/optechai/node-sdk/commit/44da2bc5e2fc8b7a90d8311527bca37100cb0a4a))
16
+
17
+ ## 1.0.0 (2025-08-11)
18
+
19
+ Full Changelog: [v0.14.0...v1.0.0](https://github.com/optechai/node-sdk/compare/v0.14.0...v1.0.0)
20
+
21
+ ### Features
22
+
23
+ * add auth ([d1d8f02](https://github.com/optechai/node-sdk/commit/d1d8f0233915b3b5dd0c04ea4589706418c057cd))
24
+ * add SKIP_BREW env var to ./scripts/bootstrap ([#163](https://github.com/optechai/node-sdk/issues/163)) ([51a5407](https://github.com/optechai/node-sdk/commit/51a5407f36aea6fd0195cf93191b19596cfa6cd2))
25
+ * adjust signature generation to use raw body ([7998d09](https://github.com/optechai/node-sdk/commit/7998d09ee99fe2fd64be64eb62ab95f05a985797))
26
+ * **api:** add customer update endpoint ([#107](https://github.com/optechai/node-sdk/issues/107)) ([e7d6625](https://github.com/optechai/node-sdk/commit/e7d66251001a5dd4e175b9b08bf62ecd0b6bdd8d))
27
+ * **api:** api update ([0686788](https://github.com/optechai/node-sdk/commit/0686788782b8ee34e9d6192d62d332ecb9801285))
28
+ * **api:** api update ([1bcbc2b](https://github.com/optechai/node-sdk/commit/1bcbc2b21d4e7ae68e44a2458ba797f38808a1a5))
29
+ * **api:** api update ([55c8d72](https://github.com/optechai/node-sdk/commit/55c8d7216e51ca78ea3deddd5d34e7e768c39f13))
30
+ * **api:** api update ([99e41d8](https://github.com/optechai/node-sdk/commit/99e41d8014a2d5f8cfdd34c6776e88d3b0bd1681))
31
+ * **api:** api update ([d58730e](https://github.com/optechai/node-sdk/commit/d58730ed9481c311395a306a447ee0df344d6d39))
32
+ * **api:** api update ([38c66cd](https://github.com/optechai/node-sdk/commit/38c66cd0d0be79736c0debc1c479ab82b78134c5))
33
+ * **api:** api update ([#103](https://github.com/optechai/node-sdk/issues/103)) ([8d13189](https://github.com/optechai/node-sdk/commit/8d13189d8e121cd012358ad6d91f24113d5ba12e))
34
+ * **api:** api update ([#109](https://github.com/optechai/node-sdk/issues/109)) ([5f2835c](https://github.com/optechai/node-sdk/commit/5f2835c1fc9583190e913b7d9e91685d059e406b))
35
+ * **api:** api update ([#114](https://github.com/optechai/node-sdk/issues/114)) ([feb19dc](https://github.com/optechai/node-sdk/commit/feb19dc361072483bbdf0a7aa7470493bce136bd))
36
+ * **api:** api update ([#120](https://github.com/optechai/node-sdk/issues/120)) ([16500dd](https://github.com/optechai/node-sdk/commit/16500dd356f213a64749895a870ee17f7085e359))
37
+ * **api:** api update ([#122](https://github.com/optechai/node-sdk/issues/122)) ([101a2d4](https://github.com/optechai/node-sdk/commit/101a2d42c31c8b73711801e585590901875fd64a))
38
+ * **api:** api update ([#123](https://github.com/optechai/node-sdk/issues/123)) ([183ccab](https://github.com/optechai/node-sdk/commit/183ccab00fb2ebfe8fab9a4fe4de7effb2edec23))
39
+ * **api:** api update ([#130](https://github.com/optechai/node-sdk/issues/130)) ([231084a](https://github.com/optechai/node-sdk/commit/231084a7d2d3ac077e5518d58bb836e878580c2c))
40
+ * **api:** api update ([#138](https://github.com/optechai/node-sdk/issues/138)) ([7b994e3](https://github.com/optechai/node-sdk/commit/7b994e3b0f6d4a382246122d528bb88a6cfcfd9a))
41
+ * **api:** api update ([#142](https://github.com/optechai/node-sdk/issues/142)) ([2c26d40](https://github.com/optechai/node-sdk/commit/2c26d409466e11c0921ae58066fdf603f269ed78))
42
+ * **api:** api update ([#148](https://github.com/optechai/node-sdk/issues/148)) ([b69e96d](https://github.com/optechai/node-sdk/commit/b69e96d847b130418c4c8cd7826089f2e4ffccbe))
43
+ * **api:** api update ([#155](https://github.com/optechai/node-sdk/issues/155)) ([8dfa34b](https://github.com/optechai/node-sdk/commit/8dfa34bf5bde64ea5ff93aa9053848ae357e9aa7))
44
+ * **api:** api update ([#157](https://github.com/optechai/node-sdk/issues/157)) ([1a99697](https://github.com/optechai/node-sdk/commit/1a99697aac37e75c479f7935f17a935dc58b4980))
45
+ * **api:** api update ([#160](https://github.com/optechai/node-sdk/issues/160)) ([fe2e559](https://github.com/optechai/node-sdk/commit/fe2e5591f18fdfa0ded655ee906266fc457c65b8))
46
+ * **api:** api update ([#162](https://github.com/optechai/node-sdk/issues/162)) ([e3d8dfb](https://github.com/optechai/node-sdk/commit/e3d8dfb7ab81ba8f2ea15b78313a6c3ff350909d))
47
+ * **api:** api update ([#20](https://github.com/optechai/node-sdk/issues/20)) ([171a387](https://github.com/optechai/node-sdk/commit/171a387c16ad5b2b54c199c5426382d02b5ae4b5))
48
+ * **api:** api update ([#25](https://github.com/optechai/node-sdk/issues/25)) ([486a6de](https://github.com/optechai/node-sdk/commit/486a6dee4c9f3f9fab34cc88ec57263667ae2302))
49
+ * **api:** api update ([#39](https://github.com/optechai/node-sdk/issues/39)) ([a5781ce](https://github.com/optechai/node-sdk/commit/a5781ced3ed926d7599619775cb0ab73201b05b5))
50
+ * **api:** api update ([#57](https://github.com/optechai/node-sdk/issues/57)) ([d4df811](https://github.com/optechai/node-sdk/commit/d4df8112ccc239964f720ce7579eacac42033807))
51
+ * **api:** api update ([#61](https://github.com/optechai/node-sdk/issues/61)) ([73e1cbe](https://github.com/optechai/node-sdk/commit/73e1cbe93af2516a416685314ef04e0165d71a43))
52
+ * **api:** api update ([#70](https://github.com/optechai/node-sdk/issues/70)) ([3bd700b](https://github.com/optechai/node-sdk/commit/3bd700b0db3cb8b496af415b341428d83996fc72))
53
+ * **api:** api update ([#84](https://github.com/optechai/node-sdk/issues/84)) ([5bbd6f8](https://github.com/optechai/node-sdk/commit/5bbd6f8ef96296dd546a7b0a3c10350362018993))
54
+ * **api:** api update ([#86](https://github.com/optechai/node-sdk/issues/86)) ([40ab47e](https://github.com/optechai/node-sdk/commit/40ab47e3f6ebe7ddf6e8acc46a052386e07eb158))
55
+ * **api:** api update ([#88](https://github.com/optechai/node-sdk/issues/88)) ([1064286](https://github.com/optechai/node-sdk/commit/10642868394250a1cd542fbd448aa638896df5f7))
56
+ * **api:** api update ([#90](https://github.com/optechai/node-sdk/issues/90)) ([6951b44](https://github.com/optechai/node-sdk/commit/6951b443591763648a0db529075c8ec7882313f0))
57
+ * **api:** api update ([#98](https://github.com/optechai/node-sdk/issues/98)) ([860fd1e](https://github.com/optechai/node-sdk/commit/860fd1ec25a9b85f856fe27ba2a704091c6412ab))
58
+ * **api:** fix spec, rename token import ([#72](https://github.com/optechai/node-sdk/issues/72)) ([4259332](https://github.com/optechai/node-sdk/commit/42593324788dce112008f2b23e35d8d2a9c873e2))
59
+ * **api:** manual updates ([df27064](https://github.com/optechai/node-sdk/commit/df27064f02f516388c0e095594a56fd71e965b48))
60
+ * **api:** manual updates ([ea26119](https://github.com/optechai/node-sdk/commit/ea261192b64b5ada9e88aae8d75ef1ccbea36096))
61
+ * **api:** manual updates ([dccd155](https://github.com/optechai/node-sdk/commit/dccd1552c9cb30b29d457c1177dbff99de04b8c8))
62
+ * **api:** manual updates ([8b77873](https://github.com/optechai/node-sdk/commit/8b7787303f26e79ef339ff27c4321c359125e854))
63
+ * **api:** manual updates ([0070a9b](https://github.com/optechai/node-sdk/commit/0070a9bc039d3c8f58aa2a4bca596cef9c2b5f80))
64
+ * **api:** manual updates ([8e21404](https://github.com/optechai/node-sdk/commit/8e214048428d567412f1a88b0bf6b58a16c48a17))
65
+ * **api:** manual updates ([947a719](https://github.com/optechai/node-sdk/commit/947a7192cfd0da368e0f1782301996117a9b9da4))
66
+ * **api:** manual updates ([5b116a9](https://github.com/optechai/node-sdk/commit/5b116a9203e47b8dab7141ac1232ddebc1caa676))
67
+ * **api:** manual updates ([20d8d40](https://github.com/optechai/node-sdk/commit/20d8d40e3d90318e4bce5d63ffa24728d3d6ca1a))
68
+ * **api:** manual updates ([9c670c9](https://github.com/optechai/node-sdk/commit/9c670c9790050208369fafdeced8b3feb33188dd))
69
+ * **api:** manual updates / ignore endpoints ([#89](https://github.com/optechai/node-sdk/issues/89)) ([a68b265](https://github.com/optechai/node-sdk/commit/a68b26515443db2c9522f5d6ad8e0c56ccfac5b0))
70
+ * chore: account for empty body ([1186ba5](https://github.com/optechai/node-sdk/commit/1186ba5e86f3976fc3949cf1e20c52f45561ee8c))
71
+ * chore: add base url ([a4f19e1](https://github.com/optechai/node-sdk/commit/a4f19e18cf9298444a21f375d3d6b35582822692))
72
+ * chore: add ubuntu-latest-m ([b46e897](https://github.com/optechai/node-sdk/commit/b46e897b8c1d186f3c4ca85c6aa679955e7578e2))
73
+ * chore: adjust generated test ([ab4b394](https://github.com/optechai/node-sdk/commit/ab4b39448fced35c60ff9bffbf714dad2b631e2c))
74
+ * chore: fix no git checks ([b937333](https://github.com/optechai/node-sdk/commit/b937333af237ad5b8e9cca9af68ce5087983d1cd))
75
+ * chore: format ([12eae60](https://github.com/optechai/node-sdk/commit/12eae60eb0ad49c944bfac52054d940e32ebf8aa))
76
+ * chore: further tweak of test ([13c1043](https://github.com/optechai/node-sdk/commit/13c1043da4be0e4817910a12f5f02900aa83f8ee))
77
+ * chore: re-add prettier formatting ([4329850](https://github.com/optechai/node-sdk/commit/4329850f92d35ef676d64c716b1a795756d07f81))
78
+ * chore: reinstance node-fetch ([c13b575](https://github.com/optechai/node-sdk/commit/c13b5751d2dad94fc2d372fa2bc69264243134e0))
79
+ * chore: remove custom runner ([858d6cb](https://github.com/optechai/node-sdk/commit/858d6cb370342f02c305e066d765364f41559568))
80
+ * chore: rework examples to include events ([8fd630f](https://github.com/optechai/node-sdk/commit/8fd630ffac661e6c9b3278460fb4d76b4b052d48))
81
+ * chore: run format ([4a3a193](https://github.com/optechai/node-sdk/commit/4a3a193d1cf2cecfeab8945970cc95afcab8a9a2))
82
+ * chore: try this ([679bb85](https://github.com/optechai/node-sdk/commit/679bb85b050cc5980ad3a67170a538900b40032f))
83
+ * chore: try this for publish ([53747b7](https://github.com/optechai/node-sdk/commit/53747b7cb8462a2bee382a5cd582e2dff0dbcdb8))
84
+ * **client:** accept RFC6838 JSON content types ([#164](https://github.com/optechai/node-sdk/issues/164)) ([a4074cb](https://github.com/optechai/node-sdk/commit/a4074cb2241b701a4514d2592c221cdfaefe3b4e))
85
+ * **client:** add support for endpoint-specific base URLs ([5821bca](https://github.com/optechai/node-sdk/commit/5821bcad776835de82caced0dc7fc50e553baa7f))
86
+ * **client:** send `X-Stainless-Timeout` header ([#146](https://github.com/optechai/node-sdk/issues/146)) ([d608779](https://github.com/optechai/node-sdk/commit/d608779a9476f22aec184e959c394c3071e9492d))
87
+ * enhance chat interaction and update polling mechanism ([00cb380](https://github.com/optechai/node-sdk/commit/00cb3808f258e89151c960d9a7f3286f61311a35))
88
+ * feat: add auth ([3e564ab](https://github.com/optechai/node-sdk/commit/3e564abee9abd0168ec7abf891254d26e3831c55))
89
+ * feat: adjust signature generation to use raw body ([7db7f2f](https://github.com/optechai/node-sdk/commit/7db7f2f9571ff31bd6c84086d8d10aa0a49beda1))
90
+ * feat: opt-7145 poll every second ([8d26f49](https://github.com/optechai/node-sdk/commit/8d26f492f08694506c68f9eed504ba4dc0f0bf88))
91
+ * fix: add more refined publish npm to always publish next ([68525e9](https://github.com/optechai/node-sdk/commit/68525e9213d289cf167444232ad0aabd534287aa))
92
+ * fix: more type fixes ([5aa5680](https://github.com/optechai/node-sdk/commit/5aa5680fe99cc432e64f419c9ad2f3a975640cb7))
93
+ * fix: resolve type errors ([d1c689f](https://github.com/optechai/node-sdk/commit/d1c689f57bdfa8e650cae7e8ce988aa5db05b9c5))
94
+ * fix: update the way auth headers are constructed ([952d4ed](https://github.com/optechai/node-sdk/commit/952d4ed907c082f37c47b0dac5f5c75889d9d363))
95
+ * fix: update to better include escalation cases ([432c240](https://github.com/optechai/node-sdk/commit/432c2408b64530c9f2cf19b06dfb614041696fb3))
96
+ * **internal:** make git install file structure match npm ([#101](https://github.com/optechai/node-sdk/issues/101)) ([3870c33](https://github.com/optechai/node-sdk/commit/3870c334741c6e805070d2c150d14d0351f69537))
97
+ * opt-7145 poll every second ([544520d](https://github.com/optechai/node-sdk/commit/544520d9935b70721f1594267c8db6dbb03e4b05))
98
+ * various codegen changes ([ed11dc6](https://github.com/optechai/node-sdk/commit/ed11dc6b5666384ccd3b7cb9db2d184a8fc4cea4))
99
+
100
+
101
+ ### Bug Fixes
102
+
103
+ * add more refined publish npm to always publish next ([51a4c10](https://github.com/optechai/node-sdk/commit/51a4c10a11d2c9151c6999d6b996b46c6fa07515))
104
+ * add pending responsing to poll abort case ([3909145](https://github.com/optechai/node-sdk/commit/390914521d79581b8de7f232a0950969b4427ecd))
105
+ * add poll ([22f1f28](https://github.com/optechai/node-sdk/commit/22f1f287ba8383b5c129aa7029c36d8a46389499))
106
+ * **api:** improve type resolution when importing as a package ([#178](https://github.com/optechai/node-sdk/issues/178)) ([18f5358](https://github.com/optechai/node-sdk/commit/18f5358bcfa82f3e5fd9c9b0e6366cbed04c5e67))
107
+ * **api:** manual updates ([#46](https://github.com/optechai/node-sdk/issues/46)) ([4d8152d](https://github.com/optechai/node-sdk/commit/4d8152dd020e4d322ab71e78fc7dbd920e31e08c))
108
+ * **api:** manual updates ([#62](https://github.com/optechai/node-sdk/issues/62)) ([5e39228](https://github.com/optechai/node-sdk/commit/5e39228db2d8eda672d30975f1fc16e1a5578f13))
109
+ * **api:** stainless config updates ([#30](https://github.com/optechai/node-sdk/issues/30)) ([e83c14c](https://github.com/optechai/node-sdk/commit/e83c14c123f2c421a922d4bfe26a2ec84223a6d3))
110
+ * avoid type error in certain environments ([#172](https://github.com/optechai/node-sdk/issues/172)) ([4531f6f](https://github.com/optechai/node-sdk/commit/4531f6fb26bb73697b786df4f3598b34671c005f))
111
+ * **ci:** release-doctor — report correct token name ([dc5e3e8](https://github.com/optechai/node-sdk/commit/dc5e3e80153923bba529ce52b5b3bf35491cc8ab))
112
+ * **client:** don't send `Content-Type` for bodyless methods ([5790bea](https://github.com/optechai/node-sdk/commit/5790bea1b49bd4eb53defc682390907fe390b3cb))
113
+ * **client:** fix export map for index exports ([#150](https://github.com/optechai/node-sdk/issues/150)) ([b907b3c](https://github.com/optechai/node-sdk/commit/b907b3c5d45e9ecf89b4d6b4330f430b23130b49))
114
+ * **client:** normalize method ([#124](https://github.com/optechai/node-sdk/issues/124)) ([5322c3a](https://github.com/optechai/node-sdk/commit/5322c3a9dff3fd9f738654595588a096a54d375d))
115
+ * **client:** send `X-Stainless-Timeout` in seconds ([#176](https://github.com/optechai/node-sdk/issues/176)) ([28805d0](https://github.com/optechai/node-sdk/commit/28805d064e05209c9b6779985277bd651ede188e))
116
+ * **exports:** ensure resource imports don't require /index ([#168](https://github.com/optechai/node-sdk/issues/168)) ([2ff56f7](https://github.com/optechai/node-sdk/commit/2ff56f7f21c2b25d87aa56d78912c159dd2789d3))
117
+ * further conflicts ([1c40f9c](https://github.com/optechai/node-sdk/commit/1c40f9cc3188e818709e36f88949cb69df025c40))
118
+ * **internal:** work around https://github.com/vercel/next.js/issues/76881 ([#173](https://github.com/optechai/node-sdk/issues/173)) ([f6b7617](https://github.com/optechai/node-sdk/commit/f6b76174d6af0626865ec727dcff701cc2973901))
119
+ * **mcp:** remove unused tools.ts ([#179](https://github.com/optechai/node-sdk/issues/179)) ([e677b9d](https://github.com/optechai/node-sdk/commit/e677b9d58e75ba2a028cd9170ffe8eec4207fbc5))
120
+ * more type fixes ([bd2c6cb](https://github.com/optechai/node-sdk/commit/bd2c6cb46f3f64bb5b2fe316ad3ba4f59a3aefbd))
121
+ * pass through timeout options on requests ([329f35a](https://github.com/optechai/node-sdk/commit/329f35a5a0dbcefdbf9a23e5343fa9685fb49d8a))
122
+ * publish script — handle NPM errors correctly ([0758a1e](https://github.com/optechai/node-sdk/commit/0758a1ef36cffa7956e546d8858c7e811f9cb375))
123
+ * remove admin resource ([006dcaf](https://github.com/optechai/node-sdk/commit/006dcafb2b119270ce39f671930178e3db7bcae1))
124
+ * remove sig ([e5e38b7](https://github.com/optechai/node-sdk/commit/e5e38b7ba20edec71ee5f30d53f8f9a5fe9dfd07))
125
+ * remove slack ([43c728a](https://github.com/optechai/node-sdk/commit/43c728ad4976685a2d7ae34f025bb357b5de6e19))
126
+ * resolve type errors ([5f7ae9d](https://github.com/optechai/node-sdk/commit/5f7ae9dbcd945776b0c15c8c0e7f64b5dba506ce))
127
+ * tests ([01e95b5](https://github.com/optechai/node-sdk/commit/01e95b526f307caa7e693acf86925effb5928e07))
128
+ * update / resolve old dead files ([c77c20d](https://github.com/optechai/node-sdk/commit/c77c20d970297582e4b8569e7f13e7590d8e17cf))
129
+ * update poll interval ([5f785c2](https://github.com/optechai/node-sdk/commit/5f785c28e5392fdd4adc89ceafdf9fff8dce7fa2))
130
+ * update the way auth headers are constructed ([5dbe13d](https://github.com/optechai/node-sdk/commit/5dbe13dfd9fae8e55dccd35b6e8450abb3e4d1ea))
131
+ * update to better include escalation cases ([0d7a920](https://github.com/optechai/node-sdk/commit/0d7a9201c17f3ed2beb180c9c9e116ee7e1c649b))
132
+ * update version ([8ae9065](https://github.com/optechai/node-sdk/commit/8ae906516a8a5d3d4d4fdbc188c2109ad7a58287))
133
+
134
+
135
+ ### Chores
136
+
137
+ * account for empty body ([5fa6fb4](https://github.com/optechai/node-sdk/commit/5fa6fb4abe1adba20b2c541cda5f0f0cdca95418))
138
+ * add base url ([fc75a4a](https://github.com/optechai/node-sdk/commit/fc75a4add6b14275f4496b6d1d1a4bbd5b6cfbc7))
139
+ * add ubuntu-latest-m ([5fef34a](https://github.com/optechai/node-sdk/commit/5fef34a65f9feec78854daaa93ccc1fbf87f8cd7))
140
+ * adjust generated test ([262a6ca](https://github.com/optechai/node-sdk/commit/262a6ca34442be8a5c2c37d07113ff0f1093d90c))
141
+ * change poll ([2c44dd7](https://github.com/optechai/node-sdk/commit/2c44dd7f628dce381ee2eab272ee7fa10a1b956d))
142
+ * **ci:** add timeout thresholds for CI jobs ([09823a2](https://github.com/optechai/node-sdk/commit/09823a27632df7501f41bad38b65664da3cf22ac))
143
+ * **ci:** enable for pull requests ([f397f83](https://github.com/optechai/node-sdk/commit/f397f83f863b443f4ad901fcea5050a99110a9b6))
144
+ * **ci:** only run for pushes and fork pull requests ([0d7c8d5](https://github.com/optechai/node-sdk/commit/0d7c8d5cfc7cd4c5cb2792114566700d82b75afe))
145
+ * **ci:** only use depot for staging repos ([0085329](https://github.com/optechai/node-sdk/commit/0085329eeabd660b56d32260f12908689f9d1520))
146
+ * **client:** minor internal fixes ([f662080](https://github.com/optechai/node-sdk/commit/f662080d5c86aac5408d0c5541f16d9b94c6c70a))
147
+ * delete dead tests ([e537c9e](https://github.com/optechai/node-sdk/commit/e537c9e12e01076f51f02aedb1aa8e55aa630628))
148
+ * docs fix ([26b32f8](https://github.com/optechai/node-sdk/commit/26b32f8399cce4066b3d26424d1733c3b96eea8e))
149
+ * **docs:** grammar improvements ([ca2c669](https://github.com/optechai/node-sdk/commit/ca2c669cf37cfa44fe82fc85c1d7dfd496f24093))
150
+ * **docs:** use top-level-await in example snippets ([99e9a35](https://github.com/optechai/node-sdk/commit/99e9a35105db405e92253e5d28ba25a2e2a7de25))
151
+ * **exports:** cleaner resource index imports ([#170](https://github.com/optechai/node-sdk/issues/170)) ([0caeba2](https://github.com/optechai/node-sdk/commit/0caeba23fd3863bbcd7231a80f924cf2d1f60182))
152
+ * **exports:** stop using path fallbacks ([#171](https://github.com/optechai/node-sdk/issues/171)) ([4f82b30](https://github.com/optechai/node-sdk/commit/4f82b30de97adf204441916e7383352e7097e89a))
153
+ * fix no git checks ([a428a57](https://github.com/optechai/node-sdk/commit/a428a570c516106ed7b6259aa7f2756f73ca2133))
154
+ * format ([e968e08](https://github.com/optechai/node-sdk/commit/e968e081bb7d4b7702b4bee128a03fc701041cbb))
155
+ * further tweak of test ([47f63ab](https://github.com/optechai/node-sdk/commit/47f63ab0cc1c87c5d920c38179b9cbbec98d305e))
156
+ * improve publish-npm script --latest tag logic ([a463d3e](https://github.com/optechai/node-sdk/commit/a463d3ed516a92a30ceb93882bc715ca446c0765))
157
+ * include initial message ([ff0a560](https://github.com/optechai/node-sdk/commit/ff0a560221469d121015435bb56c9d6a8f7eef82))
158
+ * **internal:** add aliases for Record and Array ([#177](https://github.com/optechai/node-sdk/issues/177)) ([31660f2](https://github.com/optechai/node-sdk/commit/31660f2081beadacf9cf9898128690ffcb48a6ed))
159
+ * **internal:** codegen related update ([01d9699](https://github.com/optechai/node-sdk/commit/01d96997a9ff61f3155be70cba2cb1bb21316356))
160
+ * **internal:** codegen related update ([16519bd](https://github.com/optechai/node-sdk/commit/16519bd4f2e1c52f1a887bcb9e172b197cceb8b3))
161
+ * **internal:** codegen related update ([#116](https://github.com/optechai/node-sdk/issues/116)) ([743e222](https://github.com/optechai/node-sdk/commit/743e222028c225f85732862e73a29296de0b6790))
162
+ * **internal:** codegen related update ([#125](https://github.com/optechai/node-sdk/issues/125)) ([a4102dc](https://github.com/optechai/node-sdk/commit/a4102dcfd5cb9198ec107cae96fe0a39b730fdd2))
163
+ * **internal:** codegen related update ([#128](https://github.com/optechai/node-sdk/issues/128)) ([7f49512](https://github.com/optechai/node-sdk/commit/7f4951278344f7a7b614cf6a089c1ca9e4c1e11d))
164
+ * **internal:** codegen related update ([#129](https://github.com/optechai/node-sdk/issues/129)) ([4fab784](https://github.com/optechai/node-sdk/commit/4fab784307d3b38fa248a0ee0ef5b1a71f02dfb4))
165
+ * **internal:** codegen related update ([#136](https://github.com/optechai/node-sdk/issues/136)) ([554c219](https://github.com/optechai/node-sdk/commit/554c219849d9b1c718c9c4148dd918c33c6e73b6))
166
+ * **internal:** codegen related update ([#137](https://github.com/optechai/node-sdk/issues/137)) ([ebbb7ea](https://github.com/optechai/node-sdk/commit/ebbb7eaffb055271ae5a3ccc0252016ae4f1b283))
167
+ * **internal:** fix devcontainers setup ([#153](https://github.com/optechai/node-sdk/issues/153)) ([c0b34bb](https://github.com/optechai/node-sdk/commit/c0b34bb780a7438413fc0b0627fa28eacd3dfaa6))
168
+ * **internal:** fix some typos ([#121](https://github.com/optechai/node-sdk/issues/121)) ([da09487](https://github.com/optechai/node-sdk/commit/da094874f675024cb18bc0a6f1f0a32ddb909faf))
169
+ * **internal:** make base APIResource abstract ([357ceff](https://github.com/optechai/node-sdk/commit/357ceff9573f17cdfec91b2984532569f790ced0))
170
+ * **internal:** reduce CI branch coverage ([cc3e9c0](https://github.com/optechai/node-sdk/commit/cc3e9c0f85dcf0a5157286268325e55b5eb6ca2d))
171
+ * **internal:** remove unnecessary getRequestClient function ([#115](https://github.com/optechai/node-sdk/issues/115)) ([58fe3ae](https://github.com/optechai/node-sdk/commit/58fe3ae26058bd94eca16ca8513fd06d6850bfe7))
172
+ * **internal:** update isAbsoluteURL ([#119](https://github.com/optechai/node-sdk/issues/119)) ([d1020ed](https://github.com/optechai/node-sdk/commit/d1020ed87895b4b145fb389155e6bf80aec7fc69))
173
+ * **internal:** upload builds and expand CI branch coverage ([692e92e](https://github.com/optechai/node-sdk/commit/692e92e7a5a6f24f3c9bd41bd970d6a2f76dcaa0))
174
+ * **internal:** version bump ([#48](https://github.com/optechai/node-sdk/issues/48)) ([1f6cf7d](https://github.com/optechai/node-sdk/commit/1f6cf7de5a57381296fde1f73bb2a48cd47ff152))
175
+ * **internal:** version bump ([#51](https://github.com/optechai/node-sdk/issues/51)) ([a13fa42](https://github.com/optechai/node-sdk/commit/a13fa426430b92681081e6a066e3b85a11fd2591))
176
+ * **internal:** version bump ([#54](https://github.com/optechai/node-sdk/issues/54)) ([87db91f](https://github.com/optechai/node-sdk/commit/87db91fbd67e52ed89fc961c4c276f239bc8404b))
177
+ * **internal:** version bump ([#59](https://github.com/optechai/node-sdk/issues/59)) ([a87f7a8](https://github.com/optechai/node-sdk/commit/a87f7a84d223ad786af7bc57bd8c977e397ba646))
178
+ * **internal:** version bump ([#66](https://github.com/optechai/node-sdk/issues/66)) ([ceeac75](https://github.com/optechai/node-sdk/commit/ceeac75db5f11ed8d763fd1a73e65a0d310b7313))
179
+ * **internal:** version bump ([#80](https://github.com/optechai/node-sdk/issues/80)) ([769ddc7](https://github.com/optechai/node-sdk/commit/769ddc76f3ded51a5615e29ed44d8782f5246a8b))
180
+ * **internal:** version bump ([#93](https://github.com/optechai/node-sdk/issues/93)) ([d1dd557](https://github.com/optechai/node-sdk/commit/d1dd55783a548cf6f41c7a2b9e197470406dbf1e))
181
+ * little whoopsie ([6ad3de4](https://github.com/optechai/node-sdk/commit/6ad3de4610c7b5639c246fa7e7de3a78ea952089))
182
+ * make some internal functions async ([cc81572](https://github.com/optechai/node-sdk/commit/cc81572884870d451f7230093a44c85039becabc))
183
+ * mention unit type in timeout docs ([1b04e8a](https://github.com/optechai/node-sdk/commit/1b04e8a6c534f45e8951c930d976b9419f2487a5))
184
+ * re-add prettier formatting ([fdbaae6](https://github.com/optechai/node-sdk/commit/fdbaae608e3c80f0be78474f2dfba95f7fcb366d))
185
+ * rebuild project due to codegen change ([#83](https://github.com/optechai/node-sdk/issues/83)) ([491f0d8](https://github.com/optechai/node-sdk/commit/491f0d82637f8ab76db9c8236b8f4ed2d099d0a6))
186
+ * reinstance node-fetch ([3bb8b36](https://github.com/optechai/node-sdk/commit/3bb8b3647d5f9a18c5d66de2a187aae9ac2ad687))
187
+ * remove custom runner ([0d9ab8d](https://github.com/optechai/node-sdk/commit/0d9ab8d3a93f11d5a599dc3527e80e550bea3a15))
188
+ * remove redundant word in comment ([#95](https://github.com/optechai/node-sdk/issues/95)) ([4e5f199](https://github.com/optechai/node-sdk/commit/4e5f19965cbb44b2e9d58048c1b74cd6ef45e50c))
189
+ * rework examples to include events ([d8a4365](https://github.com/optechai/node-sdk/commit/d8a4365dd498cd5a0624138c486e26f9bc5c363b))
190
+ * run format ([82e0c78](https://github.com/optechai/node-sdk/commit/82e0c7871984c2c3d6812f50008df8866976427f))
191
+ * this should be correct ([c07034d](https://github.com/optechai/node-sdk/commit/c07034ded81dccffd35253f75ebed2aeae95aee4))
192
+ * try this ([080982e](https://github.com/optechai/node-sdk/commit/080982e826bd54598ed3beef60ad5beeef71e34f))
193
+ * try this for publish ([a526ca0](https://github.com/optechai/node-sdk/commit/a526ca0d8f9665cdf699ccbdc47501d83eaa7c36))
194
+ * tweak docs example ([302c7e0](https://github.com/optechai/node-sdk/commit/302c7e0a489055456e01adf22d163ed6059135e9))
195
+ * tweak example ([12ec35d](https://github.com/optechai/node-sdk/commit/12ec35da4e904654b2bd8c71846f64d23715b909))
196
+ * **types:** nicer error class types + jsdocs ([#118](https://github.com/optechai/node-sdk/issues/118)) ([371255e](https://github.com/optechai/node-sdk/commit/371255e9bb0ac71b11f14c2c2a23a1b3753102f2))
197
+ * update ci/actions ([645e253](https://github.com/optechai/node-sdk/commit/645e253adc9448e5ec9a7f7084d59025886fcb61))
198
+ * update example script ([deec9f7](https://github.com/optechai/node-sdk/commit/deec9f7353772260ace4b420496e8709443c8c5a))
199
+ * update logic for bot response bolling ([3a7ba21](https://github.com/optechai/node-sdk/commit/3a7ba213594537573238a2a450c0d790d991dffc))
200
+ * update SDK settings ([#43](https://github.com/optechai/node-sdk/issues/43)) ([c3f8908](https://github.com/optechai/node-sdk/commit/c3f8908963deb21cda480fe348c9b8642e45aeeb))
201
+
202
+
203
+ ### Documentation
204
+
205
+ * add example ([115fd30](https://github.com/optechai/node-sdk/commit/115fd30d7b09be6d0bd3836d480fe9ae35c568ba))
206
+ * add examples to tsdocs ([f295f45](https://github.com/optechai/node-sdk/commit/f295f45abe967a18ef1ac6690b9810856b05b4f6))
207
+ * **readme:** fix typo ([11068f9](https://github.com/optechai/node-sdk/commit/11068f9ff3522141b8ae1f5e161ae757d40ae80e))
208
+ * update URLs from stainlessapi.com to stainless.com ([#156](https://github.com/optechai/node-sdk/issues/156)) ([93920fa](https://github.com/optechai/node-sdk/commit/93920fa830b33f4d8e522accda6fc2ece62296ca))
209
+
210
+ ## 0.14.0 (2025-08-11)
211
+
212
+ Full Changelog: [v0.13.2...v0.14.0](https://github.com/optechai/node-sdk/compare/v0.13.2...v0.14.0)
213
+
214
+ ### Features
215
+
216
+ * **api:** api update ([0686788](https://github.com/optechai/node-sdk/commit/0686788782b8ee34e9d6192d62d332ecb9801285))
217
+ * **api:** api update ([1bcbc2b](https://github.com/optechai/node-sdk/commit/1bcbc2b21d4e7ae68e44a2458ba797f38808a1a5))
218
+ * **api:** api update ([55c8d72](https://github.com/optechai/node-sdk/commit/55c8d7216e51ca78ea3deddd5d34e7e768c39f13))
219
+ * **api:** api update ([99e41d8](https://github.com/optechai/node-sdk/commit/99e41d8014a2d5f8cfdd34c6776e88d3b0bd1681))
220
+ * **api:** manual updates ([df27064](https://github.com/optechai/node-sdk/commit/df27064f02f516388c0e095594a56fd71e965b48))
221
+ * **api:** manual updates ([ea26119](https://github.com/optechai/node-sdk/commit/ea261192b64b5ada9e88aae8d75ef1ccbea36096))
222
+ * **api:** manual updates ([dccd155](https://github.com/optechai/node-sdk/commit/dccd1552c9cb30b29d457c1177dbff99de04b8c8))
223
+ * **api:** manual updates ([8b77873](https://github.com/optechai/node-sdk/commit/8b7787303f26e79ef339ff27c4321c359125e854))
224
+ * **api:** manual updates ([0070a9b](https://github.com/optechai/node-sdk/commit/0070a9bc039d3c8f58aa2a4bca596cef9c2b5f80))
225
+ * **api:** manual updates ([8e21404](https://github.com/optechai/node-sdk/commit/8e214048428d567412f1a88b0bf6b58a16c48a17))
226
+ * **api:** manual updates ([947a719](https://github.com/optechai/node-sdk/commit/947a7192cfd0da368e0f1782301996117a9b9da4))
227
+ * **api:** manual updates ([5b116a9](https://github.com/optechai/node-sdk/commit/5b116a9203e47b8dab7141ac1232ddebc1caa676))
228
+ * **api:** manual updates ([20d8d40](https://github.com/optechai/node-sdk/commit/20d8d40e3d90318e4bce5d63ffa24728d3d6ca1a))
229
+ * **api:** manual updates ([9c670c9](https://github.com/optechai/node-sdk/commit/9c670c9790050208369fafdeced8b3feb33188dd))
230
+ * **client:** add support for endpoint-specific base URLs ([5821bca](https://github.com/optechai/node-sdk/commit/5821bcad776835de82caced0dc7fc50e553baa7f))
231
+
232
+
233
+ ### Bug Fixes
234
+
235
+ * **ci:** release-doctor — report correct token name ([dc5e3e8](https://github.com/optechai/node-sdk/commit/dc5e3e80153923bba529ce52b5b3bf35491cc8ab))
236
+ * **client:** don't send `Content-Type` for bodyless methods ([5790bea](https://github.com/optechai/node-sdk/commit/5790bea1b49bd4eb53defc682390907fe390b3cb))
237
+ * publish script — handle NPM errors correctly ([0758a1e](https://github.com/optechai/node-sdk/commit/0758a1ef36cffa7956e546d8858c7e811f9cb375))
238
+
239
+
240
+ ### Chores
241
+
242
+ * **ci:** enable for pull requests ([f397f83](https://github.com/optechai/node-sdk/commit/f397f83f863b443f4ad901fcea5050a99110a9b6))
243
+ * **ci:** only run for pushes and fork pull requests ([0d7c8d5](https://github.com/optechai/node-sdk/commit/0d7c8d5cfc7cd4c5cb2792114566700d82b75afe))
244
+ * **docs:** use top-level-await in example snippets ([99e9a35](https://github.com/optechai/node-sdk/commit/99e9a35105db405e92253e5d28ba25a2e2a7de25))
245
+ * improve publish-npm script --latest tag logic ([a463d3e](https://github.com/optechai/node-sdk/commit/a463d3ed516a92a30ceb93882bc715ca446c0765))
246
+ * **internal:** make base APIResource abstract ([357ceff](https://github.com/optechai/node-sdk/commit/357ceff9573f17cdfec91b2984532569f790ced0))
247
+ * make some internal functions async ([cc81572](https://github.com/optechai/node-sdk/commit/cc81572884870d451f7230093a44c85039becabc))
248
+ * mention unit type in timeout docs ([1b04e8a](https://github.com/optechai/node-sdk/commit/1b04e8a6c534f45e8951c930d976b9419f2487a5))
249
+
3
250
  ## 0.13.2 (2025-07-24)
4
251
 
5
252
  Full Changelog: [v0.13.1...v0.13.2](https://github.com/optechai/node-sdk/compare/v0.13.1...v0.13.2)
package/README.md CHANGED
@@ -23,17 +23,13 @@ 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
- clientSecret: 'My Client Secret',
27
26
  clientId: process.env['LORIKEET_CLIENT_ID'], // This is the default and can be omitted
27
+ clientSecret: process.env['LORIKEET_CLIENT_SECRET'], // This is the default and can be omitted
28
28
  });
29
29
 
30
- async function main() {
31
- const response = await client.conversation.chat.start({ customerId: 'blah', publicKey: 'publicKey' });
30
+ const response = await client.conversation.chat.start({ customerId: 'blah', publicKey: 'publicKey' });
32
31
 
33
- console.log(response.conversationId);
34
- }
35
-
36
- main();
32
+ console.log(response.conversationId);
37
33
  ```
38
34
 
39
35
  ### Request & Response types
@@ -45,16 +41,12 @@ This library includes TypeScript definitions for all request params and response
45
41
  import Lorikeet from '@lorikeetai/node-sdk';
46
42
 
47
43
  const client = new Lorikeet({
48
- clientSecret: 'My Client Secret',
49
44
  clientId: process.env['LORIKEET_CLIENT_ID'], // This is the default and can be omitted
45
+ clientSecret: process.env['LORIKEET_CLIENT_SECRET'], // This is the default and can be omitted
50
46
  });
51
47
 
52
- async function main() {
53
- const params: Lorikeet.Conversation.ChatStartParams = { customerId: 'blah', publicKey: 'publicKey' };
54
- const response: Lorikeet.Conversation.ChatStartResponse = await client.conversation.chat.start(params);
55
- }
56
-
57
- main();
48
+ const params: Lorikeet.Conversation.ChatStartParams = { customerId: 'blah', publicKey: 'publicKey' };
49
+ const response: Lorikeet.Conversation.ChatStartResponse = await client.conversation.chat.start(params);
58
50
  ```
59
51
 
60
52
  Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -67,21 +59,17 @@ a subclass of `APIError` will be thrown:
67
59
 
68
60
  <!-- prettier-ignore -->
69
61
  ```ts
70
- async function main() {
71
- const response = await client.conversation.chat
72
- .start({ customerId: 'blah', publicKey: 'publicKey' })
73
- .catch(async (err) => {
74
- if (err instanceof Lorikeet.APIError) {
75
- console.log(err.status); // 400
76
- console.log(err.name); // BadRequestError
77
- console.log(err.headers); // {server: 'nginx', ...}
78
- } else {
79
- throw err;
80
- }
81
- });
82
- }
83
-
84
- main();
62
+ const response = await client.conversation.chat
63
+ .start({ customerId: 'blah', publicKey: 'publicKey' })
64
+ .catch(async (err) => {
65
+ if (err instanceof Lorikeet.APIError) {
66
+ console.log(err.status); // 400
67
+ console.log(err.name); // BadRequestError
68
+ console.log(err.headers); // {server: 'nginx', ...}
69
+ } else {
70
+ throw err;
71
+ }
72
+ });
85
73
  ```
86
74
 
87
75
  Error codes are as follows:
@@ -109,7 +97,6 @@ You can use the `maxRetries` option to configure or disable this:
109
97
  ```js
110
98
  // Configure the default for all requests:
111
99
  const client = new Lorikeet({
112
- clientSecret: 'My Client Secret',
113
100
  maxRetries: 0, // default is 2
114
101
  });
115
102
 
@@ -127,7 +114,6 @@ Requests time out after 1 minute by default. You can configure this with a `time
127
114
  ```ts
128
115
  // Configure the default for all requests:
129
116
  const client = new Lorikeet({
130
- clientSecret: 'My Client Secret',
131
117
  timeout: 20 * 1000, // 20 seconds (default is 1 minute)
132
118
  });
133
119
 
@@ -263,7 +249,6 @@ import { HttpsProxyAgent } from 'https-proxy-agent';
263
249
 
264
250
  // Configure the default for all requests:
265
251
  const client = new Lorikeet({
266
- clientSecret: 'My Client Secret',
267
252
  httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
268
253
  });
269
254
 
package/core.d.ts CHANGED
@@ -68,15 +68,17 @@ export declare class APIPromise<T> extends Promise<T> {
68
68
  finally(onfinally?: (() => void) | undefined | null): Promise<T>;
69
69
  }
70
70
  export declare abstract class APIClient {
71
+ #private;
71
72
  baseURL: string;
72
73
  maxRetries: number;
73
74
  timeout: number;
74
75
  httpAgent: Agent | undefined;
75
76
  private fetch;
76
77
  protected idempotencyHeader?: string;
77
- constructor({ baseURL, maxRetries, timeout, // 1 minute
78
+ constructor({ baseURL, baseURLOverridden, maxRetries, timeout, // 1 minute
78
79
  httpAgent, fetch: overriddenFetch, }: {
79
80
  baseURL: string;
81
+ baseURLOverridden: boolean;
80
82
  maxRetries?: number | undefined;
81
83
  timeout: number | undefined;
82
84
  httpAgent: Agent | undefined;
@@ -108,11 +110,11 @@ export declare abstract class APIClient {
108
110
  private calculateContentLength;
109
111
  buildRequest<Req>(inputOptions: FinalRequestOptions<Req>, { retryCount }?: {
110
112
  retryCount?: number;
111
- }): {
113
+ }): Promise<{
112
114
  req: RequestInit;
113
115
  url: string;
114
116
  timeout: number;
115
- };
117
+ }>;
116
118
  private buildHeaders;
117
119
  /**
118
120
  * Used as a callback for mutating the given `FinalRequestOptions` object.
@@ -133,7 +135,7 @@ export declare abstract class APIClient {
133
135
  request<Req, Rsp>(options: PromiseOrValue<FinalRequestOptions<Req>>, remainingRetries?: number | null): APIPromise<Rsp>;
134
136
  private makeRequest;
135
137
  requestAPIList<Item = unknown, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass, options: FinalRequestOptions): PagePromise<PageClass, Item>;
136
- buildURL<Req>(path: string, query: Req | null | undefined): string;
138
+ buildURL<Req>(path: string, query: Req | null | undefined, defaultBaseURL?: string | undefined): string;
137
139
  protected stringifyQuery(query: Record<string, unknown>): string;
138
140
  fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
139
141
  private shouldRetry;
@@ -199,6 +201,7 @@ export type RequestOptions<Req = unknown | Record<string, unknown> | Readable |
199
201
  query?: Req | undefined;
200
202
  body?: Req | null | undefined;
201
203
  headers?: Headers | undefined;
204
+ defaultBaseURL?: string | undefined;
202
205
  maxRetries?: number;
203
206
  stream?: boolean | undefined;
204
207
  timeout?: number;
package/core.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,EAIT,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,KAAK,EAEV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;AACzB,OAAO,EAAE,QAAQ,EAA+B,MAAM,WAAW,CAAC;AAClE,OAAO,EACL,gCAAgC,EAChC,2BAA2B,EAC3B,UAAU,EACV,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEhF;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG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,GAAG,SA2BnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,QAAS,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAWzD,CAAC;AAEF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAElE"}
package/core.js CHANGED
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _AbstractPage_client;
13
+ var _APIClient_baseURLOverridden, _AbstractPage_client;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.toBase64 = exports.getHeader = exports.getRequiredHeader = exports.isHeadersProtocol = exports.isRunningInBrowser = exports.maybeCoerceBoolean = exports.maybeCoerceFloat = exports.maybeCoerceInteger = exports.coerceBoolean = exports.coerceFloat = exports.coerceInteger = exports.readEnv = exports.ensurePresent = exports.castToError = exports.sleep = exports.safeJSON = exports.isRequestOptions = exports.createResponseHeaders = exports.PagePromise = exports.AbstractPage = exports.APIClient = exports.APIPromise = exports.createForm = exports.multipartFormRequestOptions = exports.maybeMultipartFormRequestOptions = void 0;
16
16
  exports.isEmptyObj = isEmptyObj;
@@ -118,9 +118,11 @@ class APIPromise extends Promise {
118
118
  }
119
119
  exports.APIPromise = APIPromise;
120
120
  class APIClient {
121
- constructor({ baseURL, maxRetries = 2, timeout = 60000, // 1 minute
121
+ constructor({ baseURL, baseURLOverridden, maxRetries = 2, timeout = 60000, // 1 minute
122
122
  httpAgent, fetch: overriddenFetch, }) {
123
+ _APIClient_baseURLOverridden.set(this, void 0);
123
124
  this.baseURL = baseURL;
125
+ __classPrivateFieldSet(this, _APIClient_baseURLOverridden, baseURLOverridden, "f");
124
126
  this.maxRetries = validatePositiveInteger('maxRetries', maxRetries);
125
127
  this.timeout = validatePositiveInteger('timeout', timeout);
126
128
  this.httpAgent = httpAgent;
@@ -140,7 +142,7 @@ class APIClient {
140
142
  defaultHeaders(opts) {
141
143
  return {
142
144
  Accept: 'application/json',
143
- 'Content-Type': 'application/json',
145
+ ...(['head', 'get'].includes(opts.method) ? {} : { 'Content-Type': 'application/json' }),
144
146
  'User-Agent': this.getUserAgent(),
145
147
  ...getPlatformHeaders(),
146
148
  ...this.authHeaders(opts),
@@ -197,16 +199,16 @@ class APIClient {
197
199
  }
198
200
  return null;
199
201
  }
200
- buildRequest(inputOptions, { retryCount = 0 } = {}) {
202
+ async buildRequest(inputOptions, { retryCount = 0 } = {}) {
201
203
  const options = { ...inputOptions };
202
- const { method, path, query, headers: headers = {} } = options;
204
+ const { method, path, query, defaultBaseURL, headers: headers = {} } = options;
203
205
  const body = ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ?
204
206
  options.body
205
207
  : (0, uploads_1.isMultipartBody)(options.body) ? options.body.body
206
208
  : options.body ? JSON.stringify(options.body, null, 2)
207
209
  : null;
208
210
  const contentLength = this.calculateContentLength(body);
209
- const url = this.buildURL(path, query);
211
+ const url = this.buildURL(path, query, defaultBaseURL);
210
212
  if ('timeout' in options)
211
213
  validatePositiveInteger('timeout', options.timeout);
212
214
  options.timeout = options.timeout ?? this.timeout;
@@ -294,7 +296,9 @@ class APIClient {
294
296
  retriesRemaining = maxRetries;
295
297
  }
296
298
  await this.prepareOptions(options);
297
- const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining });
299
+ const { req, url, timeout } = await this.buildRequest(options, {
300
+ retryCount: maxRetries - retriesRemaining,
301
+ });
298
302
  await this.prepareRequest(req, { url, options });
299
303
  debug('request', url, options, req.headers);
300
304
  if (options.signal?.aborted) {
@@ -335,10 +339,11 @@ class APIClient {
335
339
  const request = this.makeRequest(options, null);
336
340
  return new PagePromise(this, request, Page);
337
341
  }
338
- buildURL(path, query) {
342
+ buildURL(path, query, defaultBaseURL) {
343
+ const baseURL = (!__classPrivateFieldGet(this, _APIClient_baseURLOverridden, "f") && defaultBaseURL) || this.baseURL;
339
344
  const url = isAbsoluteURL(path) ?
340
345
  new URL(path)
341
- : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
346
+ : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
342
347
  const defaultQuery = this.defaultQuery();
343
348
  if (!isEmptyObj(defaultQuery)) {
344
349
  query = { ...defaultQuery, ...query };
@@ -449,6 +454,7 @@ class APIClient {
449
454
  }
450
455
  }
451
456
  exports.APIClient = APIClient;
457
+ _APIClient_baseURLOverridden = new WeakMap();
452
458
  class AbstractPage {
453
459
  constructor(client, response, body, options) {
454
460
  _AbstractPage_client.set(this, void 0);
@@ -548,6 +554,7 @@ const requestOptionsKeys = {
548
554
  query: true,
549
555
  body: true,
550
556
  headers: true,
557
+ defaultBaseURL: true,
551
558
  maxRetries: true,
552
559
  stream: true,
553
560
  timeout: true,