@langchain/langgraph-sdk 1.3.0 → 1.4.4

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 (181) hide show
  1. package/package.json +5 -5
  2. package/CHANGELOG.md +0 -275
  3. package/dist/_virtual/rolldown_runtime.cjs +0 -25
  4. package/dist/auth/error.cjs +0 -79
  5. package/dist/auth/error.cjs.map +0 -1
  6. package/dist/auth/error.d.cts +0 -13
  7. package/dist/auth/error.d.cts.map +0 -1
  8. package/dist/auth/error.d.ts +0 -13
  9. package/dist/auth/error.d.ts.map +0 -1
  10. package/dist/auth/error.js +0 -78
  11. package/dist/auth/error.js.map +0 -1
  12. package/dist/auth/index.cjs +0 -39
  13. package/dist/auth/index.cjs.map +0 -1
  14. package/dist/auth/index.d.cts +0 -31
  15. package/dist/auth/index.d.cts.map +0 -1
  16. package/dist/auth/index.d.ts +0 -31
  17. package/dist/auth/index.d.ts.map +0 -1
  18. package/dist/auth/index.js +0 -37
  19. package/dist/auth/index.js.map +0 -1
  20. package/dist/auth/types.d.cts +0 -294
  21. package/dist/auth/types.d.cts.map +0 -1
  22. package/dist/auth/types.d.ts +0 -294
  23. package/dist/auth/types.d.ts.map +0 -1
  24. package/dist/client.cjs +0 -1193
  25. package/dist/client.cjs.map +0 -1
  26. package/dist/client.d.cts +0 -780
  27. package/dist/client.d.cts.map +0 -1
  28. package/dist/client.d.ts +0 -780
  29. package/dist/client.d.ts.map +0 -1
  30. package/dist/client.js +0 -1186
  31. package/dist/client.js.map +0 -1
  32. package/dist/index.cjs +0 -6
  33. package/dist/index.d.cts +0 -7
  34. package/dist/index.d.ts +0 -7
  35. package/dist/index.js +0 -4
  36. package/dist/logging/index.cjs +0 -35
  37. package/dist/logging/index.cjs.map +0 -1
  38. package/dist/logging/index.d.cts +0 -47
  39. package/dist/logging/index.d.cts.map +0 -1
  40. package/dist/logging/index.d.ts +0 -47
  41. package/dist/logging/index.d.ts.map +0 -1
  42. package/dist/logging/index.js +0 -34
  43. package/dist/logging/index.js.map +0 -1
  44. package/dist/react/index.cjs +0 -5
  45. package/dist/react/index.d.cts +0 -4
  46. package/dist/react/index.d.ts +0 -4
  47. package/dist/react/index.js +0 -4
  48. package/dist/react/stream.cjs +0 -18
  49. package/dist/react/stream.cjs.map +0 -1
  50. package/dist/react/stream.custom.cjs +0 -129
  51. package/dist/react/stream.custom.cjs.map +0 -1
  52. package/dist/react/stream.custom.d.cts +0 -39
  53. package/dist/react/stream.custom.d.cts.map +0 -1
  54. package/dist/react/stream.custom.d.ts +0 -39
  55. package/dist/react/stream.custom.d.ts.map +0 -1
  56. package/dist/react/stream.custom.js +0 -127
  57. package/dist/react/stream.custom.js.map +0 -1
  58. package/dist/react/stream.d.cts +0 -73
  59. package/dist/react/stream.d.cts.map +0 -1
  60. package/dist/react/stream.d.ts +0 -73
  61. package/dist/react/stream.d.ts.map +0 -1
  62. package/dist/react/stream.js +0 -17
  63. package/dist/react/stream.js.map +0 -1
  64. package/dist/react/stream.lgp.cjs +0 -446
  65. package/dist/react/stream.lgp.cjs.map +0 -1
  66. package/dist/react/stream.lgp.js +0 -445
  67. package/dist/react/stream.lgp.js.map +0 -1
  68. package/dist/react/thread.cjs +0 -22
  69. package/dist/react/thread.cjs.map +0 -1
  70. package/dist/react/thread.js +0 -21
  71. package/dist/react/thread.js.map +0 -1
  72. package/dist/react/types.d.cts +0 -363
  73. package/dist/react/types.d.cts.map +0 -1
  74. package/dist/react/types.d.ts +0 -363
  75. package/dist/react/types.d.ts.map +0 -1
  76. package/dist/react-ui/client.cjs +0 -137
  77. package/dist/react-ui/client.cjs.map +0 -1
  78. package/dist/react-ui/client.d.cts +0 -90
  79. package/dist/react-ui/client.d.cts.map +0 -1
  80. package/dist/react-ui/client.d.ts +0 -90
  81. package/dist/react-ui/client.d.ts.map +0 -1
  82. package/dist/react-ui/client.js +0 -134
  83. package/dist/react-ui/client.js.map +0 -1
  84. package/dist/react-ui/index.cjs +0 -14
  85. package/dist/react-ui/index.cjs.map +0 -1
  86. package/dist/react-ui/index.d.cts +0 -3
  87. package/dist/react-ui/index.d.ts +0 -3
  88. package/dist/react-ui/index.js +0 -9
  89. package/dist/react-ui/index.js.map +0 -1
  90. package/dist/react-ui/server/index.cjs +0 -5
  91. package/dist/react-ui/server/index.d.cts +0 -3
  92. package/dist/react-ui/server/index.d.ts +0 -3
  93. package/dist/react-ui/server/index.js +0 -4
  94. package/dist/react-ui/server/server.cjs +0 -57
  95. package/dist/react-ui/server/server.cjs.map +0 -1
  96. package/dist/react-ui/server/server.d.cts +0 -55
  97. package/dist/react-ui/server/server.d.cts.map +0 -1
  98. package/dist/react-ui/server/server.d.ts +0 -55
  99. package/dist/react-ui/server/server.d.ts.map +0 -1
  100. package/dist/react-ui/server/server.js +0 -56
  101. package/dist/react-ui/server/server.js.map +0 -1
  102. package/dist/react-ui/types.cjs +0 -38
  103. package/dist/react-ui/types.cjs.map +0 -1
  104. package/dist/react-ui/types.d.cts +0 -25
  105. package/dist/react-ui/types.d.cts.map +0 -1
  106. package/dist/react-ui/types.d.ts +0 -25
  107. package/dist/react-ui/types.d.ts.map +0 -1
  108. package/dist/react-ui/types.js +0 -35
  109. package/dist/react-ui/types.js.map +0 -1
  110. package/dist/schema.d.cts +0 -284
  111. package/dist/schema.d.cts.map +0 -1
  112. package/dist/schema.d.ts +0 -284
  113. package/dist/schema.d.ts.map +0 -1
  114. package/dist/singletons/fetch.cjs +0 -24
  115. package/dist/singletons/fetch.cjs.map +0 -1
  116. package/dist/singletons/fetch.d.cts +0 -14
  117. package/dist/singletons/fetch.d.cts.map +0 -1
  118. package/dist/singletons/fetch.d.ts +0 -14
  119. package/dist/singletons/fetch.d.ts.map +0 -1
  120. package/dist/singletons/fetch.js +0 -22
  121. package/dist/singletons/fetch.js.map +0 -1
  122. package/dist/types.d.cts +0 -187
  123. package/dist/types.d.cts.map +0 -1
  124. package/dist/types.d.ts +0 -187
  125. package/dist/types.d.ts.map +0 -1
  126. package/dist/types.messages.d.cts +0 -91
  127. package/dist/types.messages.d.cts.map +0 -1
  128. package/dist/types.messages.d.ts +0 -91
  129. package/dist/types.messages.d.ts.map +0 -1
  130. package/dist/types.stream.d.cts +0 -235
  131. package/dist/types.stream.d.cts.map +0 -1
  132. package/dist/types.stream.d.ts +0 -235
  133. package/dist/types.stream.d.ts.map +0 -1
  134. package/dist/ui/branching.cjs +0 -153
  135. package/dist/ui/branching.cjs.map +0 -1
  136. package/dist/ui/branching.d.cts +0 -22
  137. package/dist/ui/branching.d.cts.map +0 -1
  138. package/dist/ui/branching.d.ts +0 -22
  139. package/dist/ui/branching.d.ts.map +0 -1
  140. package/dist/ui/branching.js +0 -152
  141. package/dist/ui/branching.js.map +0 -1
  142. package/dist/ui/errors.cjs +0 -15
  143. package/dist/ui/errors.cjs.map +0 -1
  144. package/dist/ui/errors.js +0 -14
  145. package/dist/ui/errors.js.map +0 -1
  146. package/dist/ui/manager.cjs +0 -182
  147. package/dist/ui/manager.cjs.map +0 -1
  148. package/dist/ui/manager.js +0 -182
  149. package/dist/ui/manager.js.map +0 -1
  150. package/dist/ui/messages.cjs +0 -70
  151. package/dist/ui/messages.cjs.map +0 -1
  152. package/dist/ui/messages.js +0 -68
  153. package/dist/ui/messages.js.map +0 -1
  154. package/dist/ui/utils.cjs +0 -14
  155. package/dist/ui/utils.cjs.map +0 -1
  156. package/dist/ui/utils.js +0 -12
  157. package/dist/ui/utils.js.map +0 -1
  158. package/dist/utils/async_caller.cjs +0 -111
  159. package/dist/utils/async_caller.cjs.map +0 -1
  160. package/dist/utils/async_caller.d.cts +0 -53
  161. package/dist/utils/async_caller.d.cts.map +0 -1
  162. package/dist/utils/async_caller.d.ts +0 -53
  163. package/dist/utils/async_caller.d.ts.map +0 -1
  164. package/dist/utils/async_caller.js +0 -110
  165. package/dist/utils/async_caller.js.map +0 -1
  166. package/dist/utils/env.cjs +0 -13
  167. package/dist/utils/env.cjs.map +0 -1
  168. package/dist/utils/env.js +0 -12
  169. package/dist/utils/env.js.map +0 -1
  170. package/dist/utils/signals.cjs +0 -20
  171. package/dist/utils/signals.cjs.map +0 -1
  172. package/dist/utils/signals.js +0 -19
  173. package/dist/utils/signals.js.map +0 -1
  174. package/dist/utils/sse.cjs +0 -124
  175. package/dist/utils/sse.cjs.map +0 -1
  176. package/dist/utils/sse.js +0 -122
  177. package/dist/utils/sse.js.map +0 -1
  178. package/dist/utils/stream.cjs +0 -91
  179. package/dist/utils/stream.cjs.map +0 -1
  180. package/dist/utils/stream.js +0 -90
  181. package/dist/utils/stream.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "1.3.0",
3
+ "version": "1.4.4",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "repository": {
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "p-queue": "^6.6.2",
26
- "p-retry": "4",
27
- "uuid": "^9.0.0"
25
+ "p-queue": "^9.0.1",
26
+ "p-retry": "^7.1.1",
27
+ "uuid": "^13.0.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@langchain/core": "^1.1.2",
@@ -157,4 +157,4 @@
157
157
  "files": [
158
158
  "dist/"
159
159
  ]
160
- }
160
+ }
package/CHANGELOG.md DELETED
@@ -1,275 +0,0 @@
1
- # @langchain/langgraph-sdk
2
-
3
- ## 1.3.0
4
-
5
- ### Minor Changes
6
-
7
- - 1497df9: feat(sdk): add support for enqueuing `useStream().submit(...)` calls while the agent is still running
8
-
9
- ## 1.2.0
10
-
11
- ### Minor Changes
12
-
13
- - 379de5e: Fix tool calls arguments not being streamed to the client
14
-
15
- ### Patch Changes
16
-
17
- - d08e484: Add support for sending `AbortSignal` to all SDK methods
18
- - d08e484: Fix `useStream().stop()` not cancelling creation of thread.
19
-
20
- ## 1.1.0
21
-
22
- ### Minor Changes
23
-
24
- - e19e76c: Rename `experimental_thread` to `thread`, allowing replacing built-in history fetching hook with React Query / SWR
25
- - fa6c009: Add throttle option to `useStream` and batch updates in a macrotask to prevent `Maximum update depth exceeded` error
26
-
27
- ### Patch Changes
28
-
29
- - 35e8fc7: Add name parameter to assistants count API.
30
- - b78a738: feat(sdk): add `includePagination` property when searching from assistants
31
-
32
- ## 1.0.3
33
-
34
- ### Patch Changes
35
-
36
- - 5ae7552: Adding support to skip auto loading api key when set to null on sdk client create
37
-
38
- ## 1.0.2
39
-
40
- ### Patch Changes
41
-
42
- - 1f6efc5: Ensure `isLoading` is set to `false` when cancelling the stream due to thread ID change
43
-
44
- ## 1.0.1
45
-
46
- ### Patch Changes
47
-
48
- - b9be526: Adding functionality to search assistants by name in the in-memory server implementation.
49
- - cc9dc28: Add `values` parameter to thread search
50
-
51
- ## 1.0.0
52
-
53
- ### Major Changes
54
-
55
- - 1e1ecbb: This release updates the package for compatibility with LangGraph v1.0. See the [v1.0 release notes](https://docs.langchain.com/oss/javascript/releases/langgraph-v1) for details on what's new.
56
-
57
- ## 0.1.10
58
-
59
- ### Patch Changes
60
-
61
- - 47cdce7: Fix stale values being received by optimistic values callback in `stream.submit(...)`
62
-
63
- ## 0.1.9
64
-
65
- ### Patch Changes
66
-
67
- - 02beb41: Add support for creating stateless runs
68
-
69
- ## 0.1.8
70
-
71
- ### Patch Changes
72
-
73
- - 90dcb8b: Add support for managing thread state manually outside of useStream hook via `experimental_thread` option
74
-
75
- ## 0.1.7
76
-
77
- ### Patch Changes
78
-
79
- - bbc90e6: Fix thread history state being kept stale when changing `thread_id`
80
-
81
- ## 0.1.6
82
-
83
- ### Patch Changes
84
-
85
- - 5603276: Fix `useStream()` keeping stale thread history when switching threads mid-stream (#1632)
86
- - b65c80b: Add `transport` option to useStream, allowing custom endpoints, that emit compatible Server-Sent Events to be used with `useStream`.
87
- - 5603276: Fix `stop()` behavior when cancelling a resumable stream via `useStream()` (#1610)
88
-
89
- ## 0.1.5
90
-
91
- ### Patch Changes
92
-
93
- - f21fd04: Fix mutate function in `onCustomEvent` and in `onUpdateEvent` receiving incorrect previous value
94
-
95
- ## 0.1.4
96
-
97
- ### Patch Changes
98
-
99
- - 599a8c5: Add support for streaming of RemoveMessage in useStream
100
- - 15afabe: Allow `@langchain/core@1.0.0-alpha` installed alongside SDK
101
-
102
- ## 0.1.3
103
-
104
- ### Patch Changes
105
-
106
- - ba7682f: Add TTL support to ThreadsClient in TypeScript to match Python SDK:
107
-
108
- - `threads.create({ ttl })` now accepts either a number (minutes) or an object `{ ttl: number, strategy?: "delete" }`.
109
- - `threads.update(threadId, { ttl })` accepts the same forms.
110
-
111
- Numeric TTL values are normalized to `{ ttl, strategy: "delete" }` in the request payload.
112
-
113
- ## 0.1.2
114
-
115
- ### Patch Changes
116
-
117
- - 3b1e137: Add `description` field for assistants auth handlers
118
-
119
- ## 0.1.1
120
-
121
- ### Patch Changes
122
-
123
- - 7de6680: Fix `onRequest` not being called when streaming runs or threads (#1585)
124
- - df8b662: Fix interrupts not being exposed in `useStream["interrupt"]` when `fetchStateHistory: false`
125
- - 572de43: feat(threads): add `ids` filter to Threads.search
126
-
127
- - SDK: `ThreadsClient.search` now accepts `ids?: string[]` and forwards it to `/threads/search`.
128
- - API: `/threads/search` schema accepts `ids` and storage filters by provided thread IDs.
129
-
130
- This enables fetching a specific set of threads directly via the search endpoint, while remaining backward compatible.
131
-
132
- ## 0.1.0
133
-
134
- ### Minor Changes
135
-
136
- - 35a0f1c: feat(sdk): set default limit of fetch history to 10
137
- - 35a0f1c: feat(sdk): set default of `fetchStateHistory` to `false`
138
-
139
- ### Patch Changes
140
-
141
- - 35a0f1c: chore(sdk): decouple stream manager from React
142
- - 35a0f1c: fix(sdk): prevent partial history from hiding all values
143
-
144
- ## 0.0.112
145
-
146
- ### Patch Changes
147
-
148
- - a50e02e: feat(sdk): add thread streaming endpoint
149
- - 7e210a1: feat(sdk): add durability param to run methods
150
- - 5766b62: Fix `isThreadLoading: false` when initially mounting in useStream
151
-
152
- ## 0.0.111
153
-
154
- ### Patch Changes
155
-
156
- - b5f14d0: Add methods to connect with the /count endpoints
157
-
158
- ## 0.0.109
159
-
160
- ### Patch Changes
161
-
162
- - e8b4540: Add support for select statements in the search endpoints
163
- - 9c57526: fix(sdk): expose subgraph events in useStream callbacks
164
-
165
- ## 0.0.107
166
-
167
- ### Patch Changes
168
-
169
- - 72386a4: feat(sdk): expose stream metadata from messages via `getMessagesMetadata`
170
- - 3ee5c20: fix(sdk): avoid setting `messages-tuple` if only `getMessagesMetadata` is requested.
171
-
172
- ## 0.0.106
173
-
174
- ### Patch Changes
175
-
176
- - feat(sdk): allow setting `checkpoint: null` when submitting a run via useStream
177
-
178
- ## 0.0.105
179
-
180
- ### Patch Changes
181
-
182
- - 7054a6a: add context to assistantBase interface
183
-
184
- ## 0.0.104
185
-
186
- ### Patch Changes
187
-
188
- - af9ec5a: feat(sdk): add `isThreadLoading` option to `useStream`, handle thread error fetching
189
- - 8e1ec9e: feat(sdk): add Context API support for useStream
190
- - f43e48c: fix(sdk): handle subgraph custom events in stream processing of useStream
191
-
192
- ## 0.0.103
193
-
194
- ### Patch Changes
195
-
196
- - f1bcec7: Add support for context API
197
-
198
- ## 0.0.102
199
-
200
- ### Patch Changes
201
-
202
- - 030698f: feat(api): add support for injecting `langgraph_node` in structured logs, expose structlog
203
-
204
- ## 0.0.101
205
-
206
- ### Patch Changes
207
-
208
- - f5e87cb: fix(sdk): allow async authorize callback
209
-
210
- ## 0.0.100
211
-
212
- ### Patch Changes
213
-
214
- - a0efb98: Rename `interrupt_id` to `id`
215
-
216
- ## 0.0.99
217
-
218
- ### Patch Changes
219
-
220
- - 768e2e2: feat(sdk): expose interrupt_id in types
221
-
222
- ## 0.0.98
223
-
224
- ### Patch Changes
225
-
226
- - ee1defa: feat(sdk): add typing for "tasks" and "checkpoints" stream mode
227
-
228
- ## 0.0.97
229
-
230
- ### Patch Changes
231
-
232
- - ac7b067: fix(sdk): use `kind` when checking for Studio user
233
-
234
- ## 0.0.96
235
-
236
- ### Patch Changes
237
-
238
- - 53b8c30: fix(sdk): `runs.join()` returns the thread values
239
-
240
- ## 0.0.95
241
-
242
- ### Patch Changes
243
-
244
- - 39cc88f: useStream should receive and merge messages from subgraphs
245
- - c1ddda1: Fix fetching state with `fetchStateHistory: false` causing crash if thread is empty
246
-
247
- ## 0.0.94
248
-
249
- ### Patch Changes
250
-
251
- - 11e95e0: Add isStudioUser for custom auth
252
-
253
- ## 0.0.93
254
-
255
- ### Patch Changes
256
-
257
- - d53c891: Fix useStream race condition when flushing messages
258
-
259
- ## 0.0.92
260
-
261
- ### Patch Changes
262
-
263
- - 603daa6: Make history fetching configurable in useStream via `fetchStateHistory`
264
-
265
- ## 0.0.91
266
-
267
- ### Patch Changes
268
-
269
- - 2f26f2f: Send metadata when creating a new thread
270
-
271
- ## 0.0.90
272
-
273
- ### Patch Changes
274
-
275
- - c8d7a0a: Add missing optional peer dependency on react-dom
@@ -1,25 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
-
23
- //#endregion
24
-
25
- exports.__toESM = __toESM;
@@ -1,79 +0,0 @@
1
-
2
- //#region src/auth/error.ts
3
- const HTTP_STATUS_MAPPING = {
4
- 100: "Continue",
5
- 101: "Switching Protocols",
6
- 102: "Processing",
7
- 103: "Early Hints",
8
- 200: "OK",
9
- 201: "Created",
10
- 202: "Accepted",
11
- 203: "Non-Authoritative Information",
12
- 204: "No Content",
13
- 205: "Reset Content",
14
- 206: "Partial Content",
15
- 207: "Multi-Status",
16
- 208: "Already Reported",
17
- 226: "IM Used",
18
- 300: "Multiple Choices",
19
- 301: "Moved Permanently",
20
- 302: "Found",
21
- 303: "See Other",
22
- 304: "Not Modified",
23
- 305: "Use Proxy",
24
- 307: "Temporary Redirect",
25
- 308: "Permanent Redirect",
26
- 400: "Bad Request",
27
- 401: "Unauthorized",
28
- 402: "Payment Required",
29
- 403: "Forbidden",
30
- 404: "Not Found",
31
- 405: "Method Not Allowed",
32
- 406: "Not Acceptable",
33
- 407: "Proxy Authentication Required",
34
- 408: "Request Timeout",
35
- 409: "Conflict",
36
- 410: "Gone",
37
- 411: "Length Required",
38
- 412: "Precondition Failed",
39
- 413: "Request Entity Too Large",
40
- 414: "Request-URI Too Long",
41
- 415: "Unsupported Media Type",
42
- 416: "Requested Range Not Satisfiable",
43
- 417: "Expectation Failed",
44
- 418: "I'm a Teapot",
45
- 421: "Misdirected Request",
46
- 422: "Unprocessable Entity",
47
- 423: "Locked",
48
- 424: "Failed Dependency",
49
- 425: "Too Early",
50
- 426: "Upgrade Required",
51
- 428: "Precondition Required",
52
- 429: "Too Many Requests",
53
- 431: "Request Header Fields Too Large",
54
- 451: "Unavailable For Legal Reasons",
55
- 500: "Internal Server Error",
56
- 501: "Not Implemented",
57
- 502: "Bad Gateway",
58
- 503: "Service Unavailable",
59
- 504: "Gateway Timeout",
60
- 505: "HTTP Version Not Supported",
61
- 506: "Variant Also Negotiates",
62
- 507: "Insufficient Storage",
63
- 508: "Loop Detected",
64
- 510: "Not Extended",
65
- 511: "Network Authentication Required"
66
- };
67
- var HTTPException = class extends Error {
68
- status;
69
- headers;
70
- constructor(status, options) {
71
- super(options?.message ?? HTTP_STATUS_MAPPING[status] ?? "Unknown error", { cause: options?.cause });
72
- this.status = status;
73
- this.headers = options?.headers ?? {};
74
- }
75
- };
76
-
77
- //#endregion
78
- exports.HTTPException = HTTPException;
79
- //# sourceMappingURL=error.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.cjs","names":["HTTP_STATUS_MAPPING: { [key: number]: string }"],"sources":["../../src/auth/error.ts"],"sourcesContent":["const HTTP_STATUS_MAPPING: { [key: number]: string } = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Request Entity Too Large\",\n 414: \"Request-URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Requested Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\",\n};\n\nexport class HTTPException extends Error {\n status: number;\n\n headers: HeadersInit;\n\n constructor(\n status: number,\n options?: { message?: string; headers?: HeadersInit; cause?: unknown }\n ) {\n super(options?.message ?? HTTP_STATUS_MAPPING[status] ?? \"Unknown error\", {\n cause: options?.cause,\n });\n this.status = status;\n this.headers = options?.headers ?? {};\n }\n}\n"],"mappings":";;AAAA,MAAMA,sBAAiD;CACrD,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;;AAGP,IAAa,gBAAb,cAAmC,MAAM;CACvC;CAEA;CAEA,YACE,QACA,SACA;AACA,QAAM,SAAS,WAAW,oBAAoB,WAAW,iBAAiB,EACxE,OAAO,SAAS;AAElB,OAAK,SAAS;AACd,OAAK,UAAU,SAAS,WAAW"}
@@ -1,13 +0,0 @@
1
- //#region src/auth/error.d.ts
2
- declare class HTTPException extends Error {
3
- status: number;
4
- headers: HeadersInit;
5
- constructor(status: number, options?: {
6
- message?: string;
7
- headers?: HeadersInit;
8
- cause?: unknown;
9
- });
10
- }
11
- //#endregion
12
- export { HTTPException };
13
- //# sourceMappingURL=error.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.cts","names":["HTTPException","HeadersInit","Error"],"sources":["../../src/auth/error.d.ts"],"sourcesContent":["export declare class HTTPException extends Error {\n status: number;\n headers: HeadersInit;\n constructor(status: number, options?: {\n message?: string;\n headers?: HeadersInit;\n cause?: unknown;\n });\n}\n"],"mappings":";cAAqBA,aAAAA,SAAsBE,KAAAA;EAAtBF,MAAAA,EAAAA,MAAAA;EAAa,OAAA,EAErBC,WAFqB;aAErBA,CAAAA,MAAAA,EAAAA,MAAAA,EAAAA,QAAAA,EAAAA;IAGKA,OAAAA,CAAAA,EAAAA,MAAAA;IALyBC,OAAAA,CAAAA,EAKzBD,WALyBC"}
@@ -1,13 +0,0 @@
1
- //#region src/auth/error.d.ts
2
- declare class HTTPException extends Error {
3
- status: number;
4
- headers: HeadersInit;
5
- constructor(status: number, options?: {
6
- message?: string;
7
- headers?: HeadersInit;
8
- cause?: unknown;
9
- });
10
- }
11
- //#endregion
12
- export { HTTPException };
13
- //# sourceMappingURL=error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","names":["HTTPException","HeadersInit","Error"],"sources":["../../src/auth/error.d.ts"],"sourcesContent":["export declare class HTTPException extends Error {\n status: number;\n headers: HeadersInit;\n constructor(status: number, options?: {\n message?: string;\n headers?: HeadersInit;\n cause?: unknown;\n });\n}\n"],"mappings":";cAAqBA,aAAAA,SAAsBE,KAAAA;EAAtBF,MAAAA,EAAAA,MAAAA;EAAa,OAAA,EAErBC,WAFqB;aAErBA,CAAAA,MAAAA,EAAAA,MAAAA,EAAAA,QAAAA,EAAAA;IAGKA,OAAAA,CAAAA,EAAAA,MAAAA;IALyBC,OAAAA,CAAAA,EAKzBD,WALyBC"}
@@ -1,78 +0,0 @@
1
- //#region src/auth/error.ts
2
- const HTTP_STATUS_MAPPING = {
3
- 100: "Continue",
4
- 101: "Switching Protocols",
5
- 102: "Processing",
6
- 103: "Early Hints",
7
- 200: "OK",
8
- 201: "Created",
9
- 202: "Accepted",
10
- 203: "Non-Authoritative Information",
11
- 204: "No Content",
12
- 205: "Reset Content",
13
- 206: "Partial Content",
14
- 207: "Multi-Status",
15
- 208: "Already Reported",
16
- 226: "IM Used",
17
- 300: "Multiple Choices",
18
- 301: "Moved Permanently",
19
- 302: "Found",
20
- 303: "See Other",
21
- 304: "Not Modified",
22
- 305: "Use Proxy",
23
- 307: "Temporary Redirect",
24
- 308: "Permanent Redirect",
25
- 400: "Bad Request",
26
- 401: "Unauthorized",
27
- 402: "Payment Required",
28
- 403: "Forbidden",
29
- 404: "Not Found",
30
- 405: "Method Not Allowed",
31
- 406: "Not Acceptable",
32
- 407: "Proxy Authentication Required",
33
- 408: "Request Timeout",
34
- 409: "Conflict",
35
- 410: "Gone",
36
- 411: "Length Required",
37
- 412: "Precondition Failed",
38
- 413: "Request Entity Too Large",
39
- 414: "Request-URI Too Long",
40
- 415: "Unsupported Media Type",
41
- 416: "Requested Range Not Satisfiable",
42
- 417: "Expectation Failed",
43
- 418: "I'm a Teapot",
44
- 421: "Misdirected Request",
45
- 422: "Unprocessable Entity",
46
- 423: "Locked",
47
- 424: "Failed Dependency",
48
- 425: "Too Early",
49
- 426: "Upgrade Required",
50
- 428: "Precondition Required",
51
- 429: "Too Many Requests",
52
- 431: "Request Header Fields Too Large",
53
- 451: "Unavailable For Legal Reasons",
54
- 500: "Internal Server Error",
55
- 501: "Not Implemented",
56
- 502: "Bad Gateway",
57
- 503: "Service Unavailable",
58
- 504: "Gateway Timeout",
59
- 505: "HTTP Version Not Supported",
60
- 506: "Variant Also Negotiates",
61
- 507: "Insufficient Storage",
62
- 508: "Loop Detected",
63
- 510: "Not Extended",
64
- 511: "Network Authentication Required"
65
- };
66
- var HTTPException = class extends Error {
67
- status;
68
- headers;
69
- constructor(status, options) {
70
- super(options?.message ?? HTTP_STATUS_MAPPING[status] ?? "Unknown error", { cause: options?.cause });
71
- this.status = status;
72
- this.headers = options?.headers ?? {};
73
- }
74
- };
75
-
76
- //#endregion
77
- export { HTTPException };
78
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","names":["HTTP_STATUS_MAPPING: { [key: number]: string }"],"sources":["../../src/auth/error.ts"],"sourcesContent":["const HTTP_STATUS_MAPPING: { [key: number]: string } = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Request Entity Too Large\",\n 414: \"Request-URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Requested Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\",\n};\n\nexport class HTTPException extends Error {\n status: number;\n\n headers: HeadersInit;\n\n constructor(\n status: number,\n options?: { message?: string; headers?: HeadersInit; cause?: unknown }\n ) {\n super(options?.message ?? HTTP_STATUS_MAPPING[status] ?? \"Unknown error\", {\n cause: options?.cause,\n });\n this.status = status;\n this.headers = options?.headers ?? {};\n }\n}\n"],"mappings":";AAAA,MAAMA,sBAAiD;CACrD,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;;AAGP,IAAa,gBAAb,cAAmC,MAAM;CACvC;CAEA;CAEA,YACE,QACA,SACA;AACA,QAAM,SAAS,WAAW,oBAAoB,WAAW,iBAAiB,EACxE,OAAO,SAAS;AAElB,OAAK,SAAS;AACd,OAAK,UAAU,SAAS,WAAW"}
@@ -1,39 +0,0 @@
1
- const require_error = require('./error.cjs');
2
-
3
- //#region src/auth/index.ts
4
- var Auth = class {
5
- /**
6
- * @internal
7
- * @ignore
8
- */
9
- "~handlerCache" = {};
10
- authenticate(cb) {
11
- this["~handlerCache"].authenticate = cb;
12
- return this;
13
- }
14
- on(event, callback) {
15
- this["~handlerCache"].callbacks ??= {};
16
- const events = Array.isArray(event) ? event : [event];
17
- for (const event$1 of events) this["~handlerCache"].callbacks[event$1] = callback;
18
- return this;
19
- }
20
- };
21
- /**
22
- * Check if the provided user was provided by LangGraph Studio.
23
- *
24
- * By default, if you add custom authorization on your resources, this will also apply to interactions made from the Studio.
25
- * If you want, you can handle logged-in Studio users in a special way.
26
- *
27
- * @param user - The user to check
28
- * @returns True if the user is a studio user, false otherwise
29
- */
30
- function isStudioUser(user) {
31
- if ("kind" in user && user.kind === "StudioUser") return true;
32
- return user.identity === "langgraph-studio-user";
33
- }
34
-
35
- //#endregion
36
- exports.Auth = Auth;
37
- exports.HTTPException = require_error.HTTPException;
38
- exports.isStudioUser = isStudioUser;
39
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":["events: string[]","event"],"sources":["../../src/auth/index.ts"],"sourcesContent":["import type {\n AuthenticateCallback,\n AnyCallback,\n CallbackEvent,\n OnCallback,\n BaseAuthReturn,\n ToUserLike,\n BaseUser,\n} from \"./types.js\";\n\nexport class Auth<\n TExtra = {}, // eslint-disable-line @typescript-eslint/ban-types\n TAuthReturn extends BaseAuthReturn = BaseAuthReturn,\n TUser extends BaseUser = ToUserLike<TAuthReturn>\n> {\n /**\n * @internal\n * @ignore\n */\n \"~handlerCache\": {\n authenticate?: AuthenticateCallback<BaseAuthReturn>;\n callbacks?: Record<string, AnyCallback>;\n } = {};\n\n authenticate<T extends BaseAuthReturn>(\n cb: AuthenticateCallback<T>\n ): Auth<TExtra, T> {\n this[\"~handlerCache\"].authenticate = cb;\n return this as unknown as Auth<TExtra, T>;\n }\n\n on<T extends CallbackEvent>(event: T, callback: OnCallback<T, TUser>): this {\n this[\"~handlerCache\"].callbacks ??= {};\n const events: string[] = Array.isArray(event) ? event : [event];\n for (const event of events) {\n this[\"~handlerCache\"].callbacks[event] = callback as AnyCallback;\n }\n return this;\n }\n}\n\n/**\n * Check if the provided user was provided by LangGraph Studio.\n *\n * By default, if you add custom authorization on your resources, this will also apply to interactions made from the Studio.\n * If you want, you can handle logged-in Studio users in a special way.\n *\n * @param user - The user to check\n * @returns True if the user is a studio user, false otherwise\n */\nexport function isStudioUser(user: BaseUser) {\n if (\"kind\" in user && user.kind === \"StudioUser\") return true;\n return user.identity === \"langgraph-studio-user\";\n}\n\nexport type {\n Filters as AuthFilters,\n EventValueMap as AuthEventValueMap,\n} from \"./types.js\";\nexport { HTTPException } from \"./error.js\";\n"],"mappings":";;;AAUA,IAAa,OAAb,MAIE;;;;;CAKA,kBAGI;CAEJ,aACE,IACiB;AACjB,OAAK,iBAAiB,eAAe;AACrC,SAAO;;CAGT,GAA4B,OAAU,UAAsC;AAC1E,OAAK,iBAAiB,cAAc;EACpC,MAAMA,SAAmB,MAAM,QAAQ,SAAS,QAAQ,CAAC;AACzD,OAAK,MAAMC,WAAS,OAClB,MAAK,iBAAiB,UAAUA,WAAS;AAE3C,SAAO;;;;;;;;;;;;AAaX,SAAgB,aAAa,MAAgB;AAC3C,KAAI,UAAU,QAAQ,KAAK,SAAS,aAAc,QAAO;AACzD,QAAO,KAAK,aAAa"}
@@ -1,31 +0,0 @@
1
- import { AnyCallback, AuthenticateCallback, BaseAuthReturn, BaseUser, CallbackEvent, EventValueMap, Filters, OnCallback, ToUserLike } from "./types.cjs";
2
- import { HTTPException } from "./error.cjs";
3
-
4
- //#region src/auth/index.d.ts
5
- declare class Auth<TExtra = {},
6
- // eslint-disable-line @typescript-eslint/ban-types
7
- TAuthReturn extends BaseAuthReturn = BaseAuthReturn, TUser extends BaseUser = ToUserLike<TAuthReturn>> {
8
- /**
9
- * @internal
10
- * @ignore
11
- */
12
- "~handlerCache": {
13
- authenticate?: AuthenticateCallback<BaseAuthReturn>;
14
- callbacks?: Record<string, AnyCallback>;
15
- };
16
- authenticate<T extends BaseAuthReturn>(cb: AuthenticateCallback<T>): Auth<TExtra, T>;
17
- on<T extends CallbackEvent>(event: T, callback: OnCallback<T, TUser>): this;
18
- }
19
- /**
20
- * Check if the provided user was provided by LangGraph Studio.
21
- *
22
- * By default, if you add custom authorization on your resources, this will also apply to interactions made from the Studio.
23
- * If you want, you can handle logged-in Studio users in a special way.
24
- *
25
- * @param user - The user to check
26
- * @returns True if the user is a studio user, false otherwise
27
- */
28
- declare function isStudioUser(user: BaseUser): boolean;
29
- //#endregion
30
- export { Auth, type EventValueMap as AuthEventValueMap, type Filters as AuthFilters, HTTPException, isStudioUser };
31
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":["AuthenticateCallback","AnyCallback","CallbackEvent","OnCallback","BaseAuthReturn","ToUserLike","BaseUser","Auth","TAuthReturn","Record","T","TExtra","TUser","isStudioUser","Filters","AuthFilters","EventValueMap","AuthEventValueMap","HTTPException"],"sources":["../../src/auth/index.d.ts"],"sourcesContent":["import type { AuthenticateCallback, AnyCallback, CallbackEvent, OnCallback, BaseAuthReturn, ToUserLike, BaseUser } from \"./types.js\";\nexport declare class Auth<TExtra = {}, // eslint-disable-line @typescript-eslint/ban-types\nTAuthReturn extends BaseAuthReturn = BaseAuthReturn, TUser extends BaseUser = ToUserLike<TAuthReturn>> {\n /**\n * @internal\n * @ignore\n */\n \"~handlerCache\": {\n authenticate?: AuthenticateCallback<BaseAuthReturn>;\n callbacks?: Record<string, AnyCallback>;\n };\n authenticate<T extends BaseAuthReturn>(cb: AuthenticateCallback<T>): Auth<TExtra, T>;\n on<T extends CallbackEvent>(event: T, callback: OnCallback<T, TUser>): this;\n}\n/**\n * Check if the provided user was provided by LangGraph Studio.\n *\n * By default, if you add custom authorization on your resources, this will also apply to interactions made from the Studio.\n * If you want, you can handle logged-in Studio users in a special way.\n *\n * @param user - The user to check\n * @returns True if the user is a studio user, false otherwise\n */\nexport declare function isStudioUser(user: BaseUser): boolean;\nexport type { Filters as AuthFilters, EventValueMap as AuthEventValueMap, } from \"./types.js\";\nexport { HTTPException } from \"./error.js\";\n"],"mappings":";;;;cACqBO;;oBACDH,iBAAiBA,8BAA8BE,WAAWD,WAAWG;;AADzF;;;iBACqCJ,EAAAA;IAA8BE,YAAAA,CAAAA,EAM5CN,oBAN4CM,CAMvBF,cANuBE,CAAAA;IAAsBE,SAAAA,CAAAA,EAOrEC,MAPqED,CAAAA,MAAAA,EAOtDP,WAPsDO,CAAAA;;cAM7CJ,CAAAA,UAGjBA,cAHiBA,CAAAA,CAAAA,EAAAA,EAGGJ,oBAHHI,CAGwBM,CAHxBN,CAAAA,CAAAA,EAG6BG,IAH7BH,CAGkCO,MAHlCP,EAG0CM,CAH1CN,CAAAA;KAArBJ,UAINE,aAJMF,CAAAA,CAAAA,KAAAA,EAIgBU,CAJhBV,EAAAA,QAAAA,EAI6BG,UAJ7BH,CAIwCU,CAJxCV,EAI2CY,KAJ3CZ,CAAAA,CAAAA,EAAAA,IAAAA;;;;;;;;;;;AAIwCU,iBAWvCG,YAAAA,CAXuCH,IAAAA,EAWpBJ,QAXoBI,CAAAA,EAAAA,OAAAA"}
@@ -1,31 +0,0 @@
1
- import { AnyCallback, AuthenticateCallback, BaseAuthReturn, BaseUser, CallbackEvent, EventValueMap, Filters, OnCallback, ToUserLike } from "./types.js";
2
- import { HTTPException } from "./error.js";
3
-
4
- //#region src/auth/index.d.ts
5
- declare class Auth<TExtra = {},
6
- // eslint-disable-line @typescript-eslint/ban-types
7
- TAuthReturn extends BaseAuthReturn = BaseAuthReturn, TUser extends BaseUser = ToUserLike<TAuthReturn>> {
8
- /**
9
- * @internal
10
- * @ignore
11
- */
12
- "~handlerCache": {
13
- authenticate?: AuthenticateCallback<BaseAuthReturn>;
14
- callbacks?: Record<string, AnyCallback>;
15
- };
16
- authenticate<T extends BaseAuthReturn>(cb: AuthenticateCallback<T>): Auth<TExtra, T>;
17
- on<T extends CallbackEvent>(event: T, callback: OnCallback<T, TUser>): this;
18
- }
19
- /**
20
- * Check if the provided user was provided by LangGraph Studio.
21
- *
22
- * By default, if you add custom authorization on your resources, this will also apply to interactions made from the Studio.
23
- * If you want, you can handle logged-in Studio users in a special way.
24
- *
25
- * @param user - The user to check
26
- * @returns True if the user is a studio user, false otherwise
27
- */
28
- declare function isStudioUser(user: BaseUser): boolean;
29
- //#endregion
30
- export { Auth, type EventValueMap as AuthEventValueMap, type Filters as AuthFilters, HTTPException, isStudioUser };
31
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["AuthenticateCallback","AnyCallback","CallbackEvent","OnCallback","BaseAuthReturn","ToUserLike","BaseUser","Auth","TAuthReturn","Record","T","TExtra","TUser","isStudioUser","Filters","AuthFilters","EventValueMap","AuthEventValueMap","HTTPException"],"sources":["../../src/auth/index.d.ts"],"sourcesContent":["import type { AuthenticateCallback, AnyCallback, CallbackEvent, OnCallback, BaseAuthReturn, ToUserLike, BaseUser } from \"./types.js\";\nexport declare class Auth<TExtra = {}, // eslint-disable-line @typescript-eslint/ban-types\nTAuthReturn extends BaseAuthReturn = BaseAuthReturn, TUser extends BaseUser = ToUserLike<TAuthReturn>> {\n /**\n * @internal\n * @ignore\n */\n \"~handlerCache\": {\n authenticate?: AuthenticateCallback<BaseAuthReturn>;\n callbacks?: Record<string, AnyCallback>;\n };\n authenticate<T extends BaseAuthReturn>(cb: AuthenticateCallback<T>): Auth<TExtra, T>;\n on<T extends CallbackEvent>(event: T, callback: OnCallback<T, TUser>): this;\n}\n/**\n * Check if the provided user was provided by LangGraph Studio.\n *\n * By default, if you add custom authorization on your resources, this will also apply to interactions made from the Studio.\n * If you want, you can handle logged-in Studio users in a special way.\n *\n * @param user - The user to check\n * @returns True if the user is a studio user, false otherwise\n */\nexport declare function isStudioUser(user: BaseUser): boolean;\nexport type { Filters as AuthFilters, EventValueMap as AuthEventValueMap, } from \"./types.js\";\nexport { HTTPException } from \"./error.js\";\n"],"mappings":";;;;cACqBO;;oBACDH,iBAAiBA,8BAA8BE,WAAWD,WAAWG;;AADzF;;;iBACqCJ,EAAAA;IAA8BE,YAAAA,CAAAA,EAM5CN,oBAN4CM,CAMvBF,cANuBE,CAAAA;IAAsBE,SAAAA,CAAAA,EAOrEC,MAPqED,CAAAA,MAAAA,EAOtDP,WAPsDO,CAAAA;;cAM7CJ,CAAAA,UAGjBA,cAHiBA,CAAAA,CAAAA,EAAAA,EAGGJ,oBAHHI,CAGwBM,CAHxBN,CAAAA,CAAAA,EAG6BG,IAH7BH,CAGkCO,MAHlCP,EAG0CM,CAH1CN,CAAAA;KAArBJ,UAINE,aAJMF,CAAAA,CAAAA,KAAAA,EAIgBU,CAJhBV,EAAAA,QAAAA,EAI6BG,UAJ7BH,CAIwCU,CAJxCV,EAI2CY,KAJ3CZ,CAAAA,CAAAA,EAAAA,IAAAA;;;;;;;;;;;AAIwCU,iBAWvCG,YAAAA,CAXuCH,IAAAA,EAWpBJ,QAXoBI,CAAAA,EAAAA,OAAAA"}