@surgeapi/node 0.25.3

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 (326) hide show
  1. package/Client.d.ts +43 -0
  2. package/Client.js +37 -0
  3. package/LICENSE +21 -0
  4. package/README.md +171 -0
  5. package/api/errors/ConflictError.d.ts +8 -0
  6. package/api/errors/ConflictError.js +51 -0
  7. package/api/errors/UnprocessableEntityError.d.ts +8 -0
  8. package/api/errors/UnprocessableEntityError.js +51 -0
  9. package/api/errors/index.d.ts +2 -0
  10. package/api/errors/index.js +18 -0
  11. package/api/index.d.ts +3 -0
  12. package/api/index.js +19 -0
  13. package/api/resources/blasts/client/Client.d.ts +50 -0
  14. package/api/resources/blasts/client/Client.js +123 -0
  15. package/api/resources/blasts/client/index.d.ts +1 -0
  16. package/api/resources/blasts/client/index.js +17 -0
  17. package/api/resources/blasts/client/requests/BlastRequest.d.ts +30 -0
  18. package/api/resources/blasts/client/requests/BlastRequest.js +5 -0
  19. package/api/resources/blasts/client/requests/index.d.ts +1 -0
  20. package/api/resources/blasts/client/requests/index.js +2 -0
  21. package/api/resources/blasts/index.d.ts +1 -0
  22. package/api/resources/blasts/index.js +17 -0
  23. package/api/resources/contacts/client/Client.d.ts +78 -0
  24. package/api/resources/contacts/client/Client.js +224 -0
  25. package/api/resources/contacts/client/index.d.ts +1 -0
  26. package/api/resources/contacts/client/index.js +2 -0
  27. package/api/resources/contacts/index.d.ts +1 -0
  28. package/api/resources/contacts/index.js +17 -0
  29. package/api/resources/index.d.ts +9 -0
  30. package/api/resources/index.js +48 -0
  31. package/api/resources/messages/client/Client.d.ts +55 -0
  32. package/api/resources/messages/client/Client.js +128 -0
  33. package/api/resources/messages/client/index.d.ts +1 -0
  34. package/api/resources/messages/client/index.js +17 -0
  35. package/api/resources/messages/client/requests/MessageRequest.d.ts +28 -0
  36. package/api/resources/messages/client/requests/MessageRequest.js +5 -0
  37. package/api/resources/messages/client/requests/index.d.ts +1 -0
  38. package/api/resources/messages/client/requests/index.js +2 -0
  39. package/api/resources/messages/index.d.ts +1 -0
  40. package/api/resources/messages/index.js +17 -0
  41. package/api/resources/users/client/Client.d.ts +59 -0
  42. package/api/resources/users/client/Client.js +168 -0
  43. package/api/resources/users/client/index.d.ts +1 -0
  44. package/api/resources/users/client/index.js +17 -0
  45. package/api/resources/users/client/requests/UserRequest.d.ts +25 -0
  46. package/api/resources/users/client/requests/UserRequest.js +5 -0
  47. package/api/resources/users/client/requests/index.d.ts +1 -0
  48. package/api/resources/users/client/requests/index.js +2 -0
  49. package/api/resources/users/index.d.ts +1 -0
  50. package/api/resources/users/index.js +17 -0
  51. package/api/resources/verifications/client/Client.d.ts +58 -0
  52. package/api/resources/verifications/client/Client.js +176 -0
  53. package/api/resources/verifications/client/index.d.ts +1 -0
  54. package/api/resources/verifications/client/index.js +17 -0
  55. package/api/resources/verifications/client/requests/VerificationCheckRequest.d.ts +13 -0
  56. package/api/resources/verifications/client/requests/VerificationCheckRequest.js +5 -0
  57. package/api/resources/verifications/client/requests/VerificationRequest.d.ts +13 -0
  58. package/api/resources/verifications/client/requests/VerificationRequest.js +5 -0
  59. package/api/resources/verifications/client/requests/index.d.ts +2 -0
  60. package/api/resources/verifications/client/requests/index.js +2 -0
  61. package/api/resources/verifications/index.d.ts +1 -0
  62. package/api/resources/verifications/index.js +17 -0
  63. package/api/types/AttachmentParams.d.ts +10 -0
  64. package/api/types/AttachmentParams.js +5 -0
  65. package/api/types/AttachmentResponse.d.ts +14 -0
  66. package/api/types/AttachmentResponse.js +5 -0
  67. package/api/types/BlastResponse.d.ts +18 -0
  68. package/api/types/BlastResponse.js +5 -0
  69. package/api/types/BlastResponseAttachmentsItem.d.ts +7 -0
  70. package/api/types/BlastResponseAttachmentsItem.js +5 -0
  71. package/api/types/Contact.d.ts +16 -0
  72. package/api/types/Contact.js +5 -0
  73. package/api/types/ContactRequest.d.ts +18 -0
  74. package/api/types/ContactRequest.js +5 -0
  75. package/api/types/ContactResponse.d.ts +20 -0
  76. package/api/types/ContactResponse.js +5 -0
  77. package/api/types/Conversation.d.ts +12 -0
  78. package/api/types/Conversation.js +5 -0
  79. package/api/types/MessageConversationContactParams.d.ts +16 -0
  80. package/api/types/MessageConversationContactParams.js +5 -0
  81. package/api/types/MessageConversationParams.d.ts +12 -0
  82. package/api/types/MessageConversationParams.js +5 -0
  83. package/api/types/MessageResponse.d.ts +15 -0
  84. package/api/types/MessageResponse.js +5 -0
  85. package/api/types/UserResponse.d.ts +18 -0
  86. package/api/types/UserResponse.js +5 -0
  87. package/api/types/Verification.d.ts +17 -0
  88. package/api/types/Verification.js +5 -0
  89. package/api/types/VerificationCheckAlreadyVerifiedResponse.d.ts +12 -0
  90. package/api/types/VerificationCheckAlreadyVerifiedResponse.js +5 -0
  91. package/api/types/VerificationCheckAlreadyVerifiedResponseResult.d.ts +14 -0
  92. package/api/types/VerificationCheckAlreadyVerifiedResponseResult.js +13 -0
  93. package/api/types/VerificationCheckIncorrectResponse.d.ts +12 -0
  94. package/api/types/VerificationCheckIncorrectResponse.js +5 -0
  95. package/api/types/VerificationCheckIncorrectResponseResult.d.ts +12 -0
  96. package/api/types/VerificationCheckIncorrectResponseResult.js +11 -0
  97. package/api/types/VerificationCheckOkResponse.d.ts +21 -0
  98. package/api/types/VerificationCheckOkResponse.js +5 -0
  99. package/api/types/VerificationCheckOkResponseResult.d.ts +21 -0
  100. package/api/types/VerificationCheckOkResponseResult.js +13 -0
  101. package/api/types/VerificationStatus.d.ts +13 -0
  102. package/api/types/VerificationStatus.js +12 -0
  103. package/api/types/index.d.ts +20 -0
  104. package/api/types/index.js +36 -0
  105. package/core/auth/BasicAuth.d.ts +8 -0
  106. package/core/auth/BasicAuth.js +26 -0
  107. package/core/auth/BearerToken.d.ts +5 -0
  108. package/core/auth/BearerToken.js +15 -0
  109. package/core/auth/index.d.ts +2 -0
  110. package/core/auth/index.js +7 -0
  111. package/core/fetcher/APIResponse.d.ts +10 -0
  112. package/core/fetcher/APIResponse.js +2 -0
  113. package/core/fetcher/Fetcher.d.ts +39 -0
  114. package/core/fetcher/Fetcher.js +100 -0
  115. package/core/fetcher/Supplier.d.ts +4 -0
  116. package/core/fetcher/Supplier.js +22 -0
  117. package/core/fetcher/createRequestUrl.d.ts +1 -0
  118. package/core/fetcher/createRequestUrl.js +12 -0
  119. package/core/fetcher/getFetchFn.d.ts +4 -0
  120. package/core/fetcher/getFetchFn.js +68 -0
  121. package/core/fetcher/getHeader.d.ts +1 -0
  122. package/core/fetcher/getHeader.js +11 -0
  123. package/core/fetcher/getRequestBody.d.ts +7 -0
  124. package/core/fetcher/getRequestBody.js +23 -0
  125. package/core/fetcher/getResponseBody.d.ts +1 -0
  126. package/core/fetcher/getResponseBody.js +54 -0
  127. package/core/fetcher/index.d.ts +5 -0
  128. package/core/fetcher/index.js +9 -0
  129. package/core/fetcher/makeRequest.d.ts +1 -0
  130. package/core/fetcher/makeRequest.js +42 -0
  131. package/core/fetcher/requestWithRetries.d.ts +1 -0
  132. package/core/fetcher/requestWithRetries.js +40 -0
  133. package/core/fetcher/signals.d.ts +11 -0
  134. package/core/fetcher/signals.js +36 -0
  135. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  136. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  137. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  138. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  139. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  140. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  141. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  142. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  143. package/core/index.d.ts +3 -0
  144. package/core/index.js +19 -0
  145. package/core/json.d.ts +15 -0
  146. package/core/json.js +24 -0
  147. package/core/runtime/index.d.ts +1 -0
  148. package/core/runtime/index.js +5 -0
  149. package/core/runtime/runtime.d.ts +9 -0
  150. package/core/runtime/runtime.js +103 -0
  151. package/dist/Client.d.ts +43 -0
  152. package/dist/Client.js +37 -0
  153. package/dist/api/errors/ConflictError.d.ts +8 -0
  154. package/dist/api/errors/ConflictError.js +51 -0
  155. package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
  156. package/dist/api/errors/UnprocessableEntityError.js +51 -0
  157. package/dist/api/errors/index.d.ts +2 -0
  158. package/dist/api/errors/index.js +18 -0
  159. package/dist/api/index.d.ts +3 -0
  160. package/dist/api/index.js +19 -0
  161. package/dist/api/resources/blasts/client/Client.d.ts +50 -0
  162. package/dist/api/resources/blasts/client/Client.js +123 -0
  163. package/dist/api/resources/blasts/client/index.d.ts +1 -0
  164. package/dist/api/resources/blasts/client/index.js +17 -0
  165. package/dist/api/resources/blasts/client/requests/BlastRequest.d.ts +30 -0
  166. package/dist/api/resources/blasts/client/requests/BlastRequest.js +5 -0
  167. package/dist/api/resources/blasts/client/requests/index.d.ts +1 -0
  168. package/dist/api/resources/blasts/client/requests/index.js +2 -0
  169. package/dist/api/resources/blasts/index.d.ts +1 -0
  170. package/dist/api/resources/blasts/index.js +17 -0
  171. package/dist/api/resources/contacts/client/Client.d.ts +78 -0
  172. package/dist/api/resources/contacts/client/Client.js +224 -0
  173. package/dist/api/resources/contacts/client/index.d.ts +1 -0
  174. package/dist/api/resources/contacts/client/index.js +2 -0
  175. package/dist/api/resources/contacts/index.d.ts +1 -0
  176. package/dist/api/resources/contacts/index.js +17 -0
  177. package/dist/api/resources/index.d.ts +9 -0
  178. package/dist/api/resources/index.js +48 -0
  179. package/dist/api/resources/messages/client/Client.d.ts +55 -0
  180. package/dist/api/resources/messages/client/Client.js +128 -0
  181. package/dist/api/resources/messages/client/index.d.ts +1 -0
  182. package/dist/api/resources/messages/client/index.js +17 -0
  183. package/dist/api/resources/messages/client/requests/MessageRequest.d.ts +28 -0
  184. package/dist/api/resources/messages/client/requests/MessageRequest.js +5 -0
  185. package/dist/api/resources/messages/client/requests/index.d.ts +1 -0
  186. package/dist/api/resources/messages/client/requests/index.js +2 -0
  187. package/dist/api/resources/messages/index.d.ts +1 -0
  188. package/dist/api/resources/messages/index.js +17 -0
  189. package/dist/api/resources/users/client/Client.d.ts +59 -0
  190. package/dist/api/resources/users/client/Client.js +168 -0
  191. package/dist/api/resources/users/client/index.d.ts +1 -0
  192. package/dist/api/resources/users/client/index.js +17 -0
  193. package/dist/api/resources/users/client/requests/UserRequest.d.ts +25 -0
  194. package/dist/api/resources/users/client/requests/UserRequest.js +5 -0
  195. package/dist/api/resources/users/client/requests/index.d.ts +1 -0
  196. package/dist/api/resources/users/client/requests/index.js +2 -0
  197. package/dist/api/resources/users/index.d.ts +1 -0
  198. package/dist/api/resources/users/index.js +17 -0
  199. package/dist/api/resources/verifications/client/Client.d.ts +58 -0
  200. package/dist/api/resources/verifications/client/Client.js +176 -0
  201. package/dist/api/resources/verifications/client/index.d.ts +1 -0
  202. package/dist/api/resources/verifications/client/index.js +17 -0
  203. package/dist/api/resources/verifications/client/requests/VerificationCheckRequest.d.ts +13 -0
  204. package/dist/api/resources/verifications/client/requests/VerificationCheckRequest.js +5 -0
  205. package/dist/api/resources/verifications/client/requests/VerificationRequest.d.ts +13 -0
  206. package/dist/api/resources/verifications/client/requests/VerificationRequest.js +5 -0
  207. package/dist/api/resources/verifications/client/requests/index.d.ts +2 -0
  208. package/dist/api/resources/verifications/client/requests/index.js +2 -0
  209. package/dist/api/resources/verifications/index.d.ts +1 -0
  210. package/dist/api/resources/verifications/index.js +17 -0
  211. package/dist/api/types/AttachmentParams.d.ts +10 -0
  212. package/dist/api/types/AttachmentParams.js +5 -0
  213. package/dist/api/types/AttachmentResponse.d.ts +14 -0
  214. package/dist/api/types/AttachmentResponse.js +5 -0
  215. package/dist/api/types/BlastResponse.d.ts +18 -0
  216. package/dist/api/types/BlastResponse.js +5 -0
  217. package/dist/api/types/BlastResponseAttachmentsItem.d.ts +7 -0
  218. package/dist/api/types/BlastResponseAttachmentsItem.js +5 -0
  219. package/dist/api/types/Contact.d.ts +16 -0
  220. package/dist/api/types/Contact.js +5 -0
  221. package/dist/api/types/ContactRequest.d.ts +18 -0
  222. package/dist/api/types/ContactRequest.js +5 -0
  223. package/dist/api/types/ContactResponse.d.ts +20 -0
  224. package/dist/api/types/ContactResponse.js +5 -0
  225. package/dist/api/types/Conversation.d.ts +12 -0
  226. package/dist/api/types/Conversation.js +5 -0
  227. package/dist/api/types/MessageConversationContactParams.d.ts +16 -0
  228. package/dist/api/types/MessageConversationContactParams.js +5 -0
  229. package/dist/api/types/MessageConversationParams.d.ts +12 -0
  230. package/dist/api/types/MessageConversationParams.js +5 -0
  231. package/dist/api/types/MessageResponse.d.ts +15 -0
  232. package/dist/api/types/MessageResponse.js +5 -0
  233. package/dist/api/types/UserResponse.d.ts +18 -0
  234. package/dist/api/types/UserResponse.js +5 -0
  235. package/dist/api/types/Verification.d.ts +17 -0
  236. package/dist/api/types/Verification.js +5 -0
  237. package/dist/api/types/VerificationCheckAlreadyVerifiedResponse.d.ts +12 -0
  238. package/dist/api/types/VerificationCheckAlreadyVerifiedResponse.js +5 -0
  239. package/dist/api/types/VerificationCheckAlreadyVerifiedResponseResult.d.ts +14 -0
  240. package/dist/api/types/VerificationCheckAlreadyVerifiedResponseResult.js +13 -0
  241. package/dist/api/types/VerificationCheckIncorrectResponse.d.ts +12 -0
  242. package/dist/api/types/VerificationCheckIncorrectResponse.js +5 -0
  243. package/dist/api/types/VerificationCheckIncorrectResponseResult.d.ts +12 -0
  244. package/dist/api/types/VerificationCheckIncorrectResponseResult.js +11 -0
  245. package/dist/api/types/VerificationCheckOkResponse.d.ts +21 -0
  246. package/dist/api/types/VerificationCheckOkResponse.js +5 -0
  247. package/dist/api/types/VerificationCheckOkResponseResult.d.ts +21 -0
  248. package/dist/api/types/VerificationCheckOkResponseResult.js +13 -0
  249. package/dist/api/types/VerificationStatus.d.ts +13 -0
  250. package/dist/api/types/VerificationStatus.js +12 -0
  251. package/dist/api/types/index.d.ts +20 -0
  252. package/dist/api/types/index.js +36 -0
  253. package/dist/core/auth/BasicAuth.d.ts +8 -0
  254. package/dist/core/auth/BasicAuth.js +26 -0
  255. package/dist/core/auth/BearerToken.d.ts +5 -0
  256. package/dist/core/auth/BearerToken.js +15 -0
  257. package/dist/core/auth/index.d.ts +2 -0
  258. package/dist/core/auth/index.js +7 -0
  259. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  260. package/dist/core/fetcher/APIResponse.js +2 -0
  261. package/dist/core/fetcher/Fetcher.d.ts +39 -0
  262. package/dist/core/fetcher/Fetcher.js +100 -0
  263. package/dist/core/fetcher/Supplier.d.ts +4 -0
  264. package/dist/core/fetcher/Supplier.js +22 -0
  265. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  266. package/dist/core/fetcher/createRequestUrl.js +12 -0
  267. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  268. package/dist/core/fetcher/getFetchFn.js +68 -0
  269. package/dist/core/fetcher/getHeader.d.ts +1 -0
  270. package/dist/core/fetcher/getHeader.js +11 -0
  271. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  272. package/dist/core/fetcher/getRequestBody.js +23 -0
  273. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  274. package/dist/core/fetcher/getResponseBody.js +54 -0
  275. package/dist/core/fetcher/index.d.ts +5 -0
  276. package/dist/core/fetcher/index.js +9 -0
  277. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  278. package/dist/core/fetcher/makeRequest.js +42 -0
  279. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  280. package/dist/core/fetcher/requestWithRetries.js +40 -0
  281. package/dist/core/fetcher/signals.d.ts +11 -0
  282. package/dist/core/fetcher/signals.js +36 -0
  283. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  284. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  285. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  286. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  287. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  288. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  289. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  290. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  291. package/dist/core/index.d.ts +3 -0
  292. package/dist/core/index.js +19 -0
  293. package/dist/core/json.d.ts +15 -0
  294. package/dist/core/json.js +24 -0
  295. package/dist/core/runtime/index.d.ts +1 -0
  296. package/dist/core/runtime/index.js +5 -0
  297. package/dist/core/runtime/runtime.d.ts +9 -0
  298. package/dist/core/runtime/runtime.js +103 -0
  299. package/dist/environments.d.ts +7 -0
  300. package/dist/environments.js +9 -0
  301. package/dist/errors/SurgeError.d.ts +12 -0
  302. package/dist/errors/SurgeError.js +33 -0
  303. package/dist/errors/SurgeTimeoutError.d.ts +6 -0
  304. package/dist/errors/SurgeTimeoutError.js +13 -0
  305. package/dist/errors/index.d.ts +2 -0
  306. package/dist/errors/index.js +7 -0
  307. package/dist/index.d.ts +4 -0
  308. package/dist/index.js +44 -0
  309. package/dist/version.d.ts +1 -0
  310. package/dist/version.js +4 -0
  311. package/environments.d.ts +7 -0
  312. package/environments.js +9 -0
  313. package/errors/SurgeError.d.ts +12 -0
  314. package/errors/SurgeError.js +33 -0
  315. package/errors/SurgeTimeoutError.d.ts +6 -0
  316. package/errors/SurgeTimeoutError.js +13 -0
  317. package/errors/index.d.ts +2 -0
  318. package/errors/index.js +7 -0
  319. package/index.d.ts +4 -0
  320. package/index.js +44 -0
  321. package/jest.config.mjs +8 -0
  322. package/package.json +44 -0
  323. package/reference.md +681 -0
  324. package/scripts/rename-to-esm-files.js +115 -0
  325. package/version.d.ts +1 -0
  326. package/version.js +4 -0
@@ -0,0 +1,229 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UndiciStreamWrapper = void 0;
13
+ class UndiciStreamWrapper {
14
+ constructor(readableStream) {
15
+ this.readableStream = readableStream;
16
+ this.reader = this.readableStream.getReader();
17
+ this.events = {
18
+ data: [],
19
+ end: [],
20
+ error: [],
21
+ readable: [],
22
+ close: [],
23
+ pause: [],
24
+ resume: [],
25
+ };
26
+ this.paused = false;
27
+ this.resumeCallback = null;
28
+ this.encoding = null;
29
+ }
30
+ on(event, callback) {
31
+ var _a;
32
+ (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.push(callback);
33
+ }
34
+ off(event, callback) {
35
+ var _a;
36
+ this.events[event] = (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.filter((cb) => cb !== callback);
37
+ }
38
+ pipe(dest) {
39
+ this.on("data", (chunk) => {
40
+ if (dest instanceof UndiciStreamWrapper) {
41
+ dest._write(chunk);
42
+ }
43
+ else {
44
+ const writer = dest.getWriter();
45
+ writer.write(chunk).then(() => writer.releaseLock());
46
+ }
47
+ });
48
+ this.on("end", () => {
49
+ if (dest instanceof UndiciStreamWrapper) {
50
+ dest._end();
51
+ }
52
+ else {
53
+ const writer = dest.getWriter();
54
+ writer.close();
55
+ }
56
+ });
57
+ this.on("error", (error) => {
58
+ if (dest instanceof UndiciStreamWrapper) {
59
+ dest._error(error);
60
+ }
61
+ else {
62
+ const writer = dest.getWriter();
63
+ writer.abort(error);
64
+ }
65
+ });
66
+ this._startReading();
67
+ return dest;
68
+ }
69
+ pipeTo(dest) {
70
+ return this.pipe(dest);
71
+ }
72
+ unpipe(dest) {
73
+ this.off("data", (chunk) => {
74
+ if (dest instanceof UndiciStreamWrapper) {
75
+ dest._write(chunk);
76
+ }
77
+ else {
78
+ const writer = dest.getWriter();
79
+ writer.write(chunk).then(() => writer.releaseLock());
80
+ }
81
+ });
82
+ this.off("end", () => {
83
+ if (dest instanceof UndiciStreamWrapper) {
84
+ dest._end();
85
+ }
86
+ else {
87
+ const writer = dest.getWriter();
88
+ writer.close();
89
+ }
90
+ });
91
+ this.off("error", (error) => {
92
+ if (dest instanceof UndiciStreamWrapper) {
93
+ dest._error(error);
94
+ }
95
+ else {
96
+ const writer = dest.getWriter();
97
+ writer.abort(error);
98
+ }
99
+ });
100
+ }
101
+ destroy(error) {
102
+ this.reader
103
+ .cancel(error)
104
+ .then(() => {
105
+ this._emit("close");
106
+ })
107
+ .catch((err) => {
108
+ this._emit("error", err);
109
+ });
110
+ }
111
+ pause() {
112
+ this.paused = true;
113
+ this._emit("pause");
114
+ }
115
+ resume() {
116
+ if (this.paused) {
117
+ this.paused = false;
118
+ this._emit("resume");
119
+ if (this.resumeCallback) {
120
+ this.resumeCallback();
121
+ this.resumeCallback = null;
122
+ }
123
+ }
124
+ }
125
+ get isPaused() {
126
+ return this.paused;
127
+ }
128
+ read() {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ if (this.paused) {
131
+ yield new Promise((resolve) => {
132
+ this.resumeCallback = resolve;
133
+ });
134
+ }
135
+ const { done, value } = yield this.reader.read();
136
+ if (done) {
137
+ return undefined;
138
+ }
139
+ return value;
140
+ });
141
+ }
142
+ setEncoding(encoding) {
143
+ this.encoding = encoding;
144
+ }
145
+ text() {
146
+ return __awaiter(this, void 0, void 0, function* () {
147
+ const chunks = [];
148
+ while (true) {
149
+ const { done, value } = yield this.reader.read();
150
+ if (done) {
151
+ break;
152
+ }
153
+ if (value) {
154
+ chunks.push(value);
155
+ }
156
+ }
157
+ const decoder = new TextDecoder(this.encoding || "utf-8");
158
+ return decoder.decode(yield new Blob(chunks).arrayBuffer());
159
+ });
160
+ }
161
+ json() {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ const text = yield this.text();
164
+ return JSON.parse(text);
165
+ });
166
+ }
167
+ _write(chunk) {
168
+ this._emit("data", chunk);
169
+ }
170
+ _end() {
171
+ this._emit("end");
172
+ }
173
+ _error(error) {
174
+ this._emit("error", error);
175
+ }
176
+ _emit(event, data) {
177
+ if (this.events[event]) {
178
+ for (const callback of this.events[event] || []) {
179
+ callback(data);
180
+ }
181
+ }
182
+ }
183
+ _startReading() {
184
+ return __awaiter(this, void 0, void 0, function* () {
185
+ try {
186
+ this._emit("readable");
187
+ while (true) {
188
+ if (this.paused) {
189
+ yield new Promise((resolve) => {
190
+ this.resumeCallback = resolve;
191
+ });
192
+ }
193
+ const { done, value } = yield this.reader.read();
194
+ if (done) {
195
+ this._emit("end");
196
+ this._emit("close");
197
+ break;
198
+ }
199
+ if (value) {
200
+ this._emit("data", value);
201
+ }
202
+ }
203
+ }
204
+ catch (error) {
205
+ this._emit("error", error);
206
+ }
207
+ });
208
+ }
209
+ [Symbol.asyncIterator]() {
210
+ return {
211
+ next: () => __awaiter(this, void 0, void 0, function* () {
212
+ if (this.paused) {
213
+ yield new Promise((resolve) => {
214
+ this.resumeCallback = resolve;
215
+ });
216
+ }
217
+ const { done, value } = yield this.reader.read();
218
+ if (done) {
219
+ return { done: true, value: undefined };
220
+ }
221
+ return { done: false, value };
222
+ }),
223
+ [Symbol.asyncIterator]() {
224
+ return this;
225
+ },
226
+ };
227
+ }
228
+ }
229
+ exports.UndiciStreamWrapper = UndiciStreamWrapper;
@@ -0,0 +1,18 @@
1
+ export type EventCallback = (data?: any) => void;
2
+ export interface StreamWrapper<WritableStream, ReadFormat> {
3
+ setEncoding(encoding?: string): void;
4
+ on(event: string, callback: EventCallback): void;
5
+ off(event: string, callback: EventCallback): void;
6
+ pipe(dest: WritableStream): WritableStream;
7
+ pipeTo(dest: WritableStream): WritableStream;
8
+ unpipe(dest?: WritableStream): void;
9
+ destroy(error?: Error): void;
10
+ pause(): void;
11
+ resume(): void;
12
+ get isPaused(): boolean;
13
+ read(): Promise<ReadFormat | undefined>;
14
+ text(): Promise<string>;
15
+ json<T>(): Promise<T>;
16
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
17
+ }
18
+ export declare function chooseStreamWrapper(responseBody: any): Promise<Promise<StreamWrapper<any, any>>>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.chooseStreamWrapper = chooseStreamWrapper;
46
+ const runtime_1 = require("../../runtime");
47
+ function chooseStreamWrapper(responseBody) {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
50
+ return new (yield Promise.resolve().then(() => __importStar(require("./Node18UniversalStreamWrapper")))).Node18UniversalStreamWrapper(responseBody);
51
+ }
52
+ else if (runtime_1.RUNTIME.type !== "node" && typeof fetch === "function") {
53
+ return new (yield Promise.resolve().then(() => __importStar(require("./UndiciStreamWrapper")))).UndiciStreamWrapper(responseBody);
54
+ }
55
+ else {
56
+ return new (yield Promise.resolve().then(() => __importStar(require("./NodePre18StreamWrapper")))).NodePre18StreamWrapper(responseBody);
57
+ }
58
+ });
59
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./fetcher";
2
+ export * from "./auth";
3
+ export * from "./runtime";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./fetcher"), exports);
18
+ __exportStar(require("./auth"), exports);
19
+ __exportStar(require("./runtime"), exports);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Serialize a value to JSON
3
+ * @param value A JavaScript value, usually an object or array, to be converted.
4
+ * @param replacer A function that transforms the results.
5
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
6
+ * @returns JSON string
7
+ */
8
+ export declare const toJson: (value: unknown, replacer?: (this: unknown, key: string, value: unknown) => unknown, space?: string | number) => string;
9
+ /**
10
+ * Parse JSON string to object, array, or other type
11
+ * @param text A valid JSON string.
12
+ * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
13
+ * @returns Parsed object, array, or other type
14
+ */
15
+ export declare function fromJson<T = unknown>(text: string, reviver?: (this: unknown, key: string, value: unknown) => unknown): T;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toJson = void 0;
4
+ exports.fromJson = fromJson;
5
+ /**
6
+ * Serialize a value to JSON
7
+ * @param value A JavaScript value, usually an object or array, to be converted.
8
+ * @param replacer A function that transforms the results.
9
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
10
+ * @returns JSON string
11
+ */
12
+ const toJson = (value, replacer, space) => {
13
+ return JSON.stringify(value, replacer, space);
14
+ };
15
+ exports.toJson = toJson;
16
+ /**
17
+ * Parse JSON string to object, array, or other type
18
+ * @param text A valid JSON string.
19
+ * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
20
+ * @returns Parsed object, array, or other type
21
+ */
22
+ function fromJson(text, reviver) {
23
+ return JSON.parse(text, reviver);
24
+ }
@@ -0,0 +1 @@
1
+ export { RUNTIME } from "./runtime";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RUNTIME = void 0;
4
+ var runtime_1 = require("./runtime");
5
+ Object.defineProperty(exports, "RUNTIME", { enumerable: true, get: function () { return runtime_1.RUNTIME; } });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A constant that indicates which environment and version the SDK is running in.
3
+ */
4
+ export declare const RUNTIME: Runtime;
5
+ export interface Runtime {
6
+ type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
7
+ version?: string;
8
+ parsedVersion?: number;
9
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RUNTIME = void 0;
4
+ /**
5
+ * A constant that indicates which environment and version the SDK is running in.
6
+ */
7
+ exports.RUNTIME = evaluateRuntime();
8
+ function evaluateRuntime() {
9
+ var _a, _b, _c, _d, _e;
10
+ /**
11
+ * A constant that indicates whether the environment the code is running is a Web Browser.
12
+ */
13
+ const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
14
+ if (isBrowser) {
15
+ return {
16
+ type: "browser",
17
+ version: window.navigator.userAgent,
18
+ };
19
+ }
20
+ /**
21
+ * A constant that indicates whether the environment the code is running is Cloudflare.
22
+ * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent
23
+ */
24
+ const isCloudflare = typeof globalThis !== "undefined" && ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === "Cloudflare-Workers";
25
+ if (isCloudflare) {
26
+ return {
27
+ type: "workerd",
28
+ };
29
+ }
30
+ /**
31
+ * A constant that indicates whether the environment the code is running is Edge Runtime.
32
+ * https://vercel.com/docs/functions/runtimes/edge-runtime#check-if-you're-running-on-the-edge-runtime
33
+ */
34
+ const isEdgeRuntime = typeof EdgeRuntime === "string";
35
+ if (isEdgeRuntime) {
36
+ return {
37
+ type: "edge-runtime",
38
+ };
39
+ }
40
+ /**
41
+ * A constant that indicates whether the environment the code is running is a Web Worker.
42
+ */
43
+ const isWebWorker = typeof self === "object" &&
44
+ // @ts-ignore
45
+ typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
46
+ (((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "DedicatedWorkerGlobalScope" ||
47
+ ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "ServiceWorkerGlobalScope" ||
48
+ ((_d = self.constructor) === null || _d === void 0 ? void 0 : _d.name) === "SharedWorkerGlobalScope");
49
+ if (isWebWorker) {
50
+ return {
51
+ type: "web-worker",
52
+ };
53
+ }
54
+ /**
55
+ * A constant that indicates whether the environment the code is running is Deno.
56
+ * FYI Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
57
+ */
58
+ const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
59
+ if (isDeno) {
60
+ return {
61
+ type: "deno",
62
+ version: Deno.version.deno,
63
+ };
64
+ }
65
+ /**
66
+ * A constant that indicates whether the environment the code is running is Bun.sh.
67
+ */
68
+ const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
69
+ if (isBun) {
70
+ return {
71
+ type: "bun",
72
+ version: Bun.version,
73
+ };
74
+ }
75
+ /**
76
+ * A constant that indicates whether the environment the code is running is Node.JS.
77
+ */
78
+ const isNode = typeof process !== "undefined" &&
79
+ "version" in process &&
80
+ !!process.version &&
81
+ "versions" in process &&
82
+ !!((_e = process.versions) === null || _e === void 0 ? void 0 : _e.node);
83
+ if (isNode) {
84
+ return {
85
+ type: "node",
86
+ version: process.versions.node,
87
+ parsedVersion: Number(process.versions.node.split(".")[0]),
88
+ };
89
+ }
90
+ /**
91
+ * A constant that indicates whether the environment the code is running is in React-Native.
92
+ * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
93
+ */
94
+ const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
95
+ if (isReactNative) {
96
+ return {
97
+ type: "react-native",
98
+ };
99
+ }
100
+ return {
101
+ type: "unknown",
102
+ };
103
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare const SurgeEnvironment: {
5
+ readonly Default: "https://api.surge.app";
6
+ };
7
+ export type SurgeEnvironment = typeof SurgeEnvironment.Default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SurgeEnvironment = void 0;
7
+ exports.SurgeEnvironment = {
8
+ Default: "https://api.surge.app",
9
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare class SurgeError extends Error {
5
+ readonly statusCode?: number;
6
+ readonly body?: unknown;
7
+ constructor({ message, statusCode, body }: {
8
+ message?: string;
9
+ statusCode?: number;
10
+ body?: unknown;
11
+ });
12
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SurgeError = void 0;
7
+ const json_1 = require("../core/json");
8
+ class SurgeError extends Error {
9
+ constructor({ message, statusCode, body }) {
10
+ super(buildMessage({ message, statusCode, body }));
11
+ Object.setPrototypeOf(this, SurgeError.prototype);
12
+ if (statusCode != null) {
13
+ this.statusCode = statusCode;
14
+ }
15
+ if (body !== undefined) {
16
+ this.body = body;
17
+ }
18
+ }
19
+ }
20
+ exports.SurgeError = SurgeError;
21
+ function buildMessage({ message, statusCode, body, }) {
22
+ let lines = [];
23
+ if (message != null) {
24
+ lines.push(message);
25
+ }
26
+ if (statusCode != null) {
27
+ lines.push(`Status code: ${statusCode.toString()}`);
28
+ }
29
+ if (body != null) {
30
+ lines.push(`Body: ${(0, json_1.toJson)(body, undefined, 2)}`);
31
+ }
32
+ return lines.join("\n");
33
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare class SurgeTimeoutError extends Error {
5
+ constructor(message: string);
6
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SurgeTimeoutError = void 0;
7
+ class SurgeTimeoutError extends Error {
8
+ constructor(message) {
9
+ super(message);
10
+ Object.setPrototypeOf(this, SurgeTimeoutError.prototype);
11
+ }
12
+ }
13
+ exports.SurgeTimeoutError = SurgeTimeoutError;
@@ -0,0 +1,2 @@
1
+ export { SurgeError } from "./SurgeError";
2
+ export { SurgeTimeoutError } from "./SurgeTimeoutError";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurgeTimeoutError = exports.SurgeError = void 0;
4
+ var SurgeError_1 = require("./SurgeError");
5
+ Object.defineProperty(exports, "SurgeError", { enumerable: true, get: function () { return SurgeError_1.SurgeError; } });
6
+ var SurgeTimeoutError_1 = require("./SurgeTimeoutError");
7
+ Object.defineProperty(exports, "SurgeTimeoutError", { enumerable: true, get: function () { return SurgeTimeoutError_1.SurgeTimeoutError; } });
@@ -0,0 +1,4 @@
1
+ export * as Surge from "./api";
2
+ export { SurgeClient } from "./Client";
3
+ export { SurgeEnvironment } from "./environments";
4
+ export { SurgeError, SurgeTimeoutError } from "./errors";
package/dist/index.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.SurgeTimeoutError = exports.SurgeError = exports.SurgeEnvironment = exports.SurgeClient = exports.Surge = void 0;
37
+ exports.Surge = __importStar(require("./api"));
38
+ var Client_1 = require("./Client");
39
+ Object.defineProperty(exports, "SurgeClient", { enumerable: true, get: function () { return Client_1.SurgeClient; } });
40
+ var environments_1 = require("./environments");
41
+ Object.defineProperty(exports, "SurgeEnvironment", { enumerable: true, get: function () { return environments_1.SurgeEnvironment; } });
42
+ var errors_1 = require("./errors");
43
+ Object.defineProperty(exports, "SurgeError", { enumerable: true, get: function () { return errors_1.SurgeError; } });
44
+ Object.defineProperty(exports, "SurgeTimeoutError", { enumerable: true, get: function () { return errors_1.SurgeTimeoutError; } });
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "0.25.3";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDK_VERSION = void 0;
4
+ exports.SDK_VERSION = "0.25.3";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare const SurgeEnvironment: {
5
+ readonly Default: "https://api.surge.app";
6
+ };
7
+ export type SurgeEnvironment = typeof SurgeEnvironment.Default;