@fern-api/postman 0.0.2

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 (275) hide show
  1. package/README.md +271 -0
  2. package/dist/cjs/BaseClient.d.ts +39 -0
  3. package/dist/cjs/BaseClient.js +62 -0
  4. package/dist/cjs/Client.d.ts +25 -0
  5. package/dist/cjs/Client.js +103 -0
  6. package/dist/cjs/api/index.d.ts +1 -0
  7. package/dist/cjs/api/index.js +17 -0
  8. package/dist/cjs/api/resources/collection/client/Client.d.ts +43 -0
  9. package/dist/cjs/api/resources/collection/client/Client.js +165 -0
  10. package/dist/cjs/api/resources/collection/client/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/collection/client/index.js +17 -0
  12. package/dist/cjs/api/resources/collection/client/requests/PublishCollectionRequest.d.ts +12 -0
  13. package/dist/cjs/api/resources/collection/client/requests/PublishCollectionRequest.js +3 -0
  14. package/dist/cjs/api/resources/collection/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/collection/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/collection/errors/CollectionDoesNotExistError.d.ts +6 -0
  17. package/dist/cjs/api/resources/collection/errors/CollectionDoesNotExistError.js +54 -0
  18. package/dist/cjs/api/resources/collection/errors/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/collection/errors/index.js +17 -0
  20. package/dist/cjs/api/resources/collection/index.d.ts +3 -0
  21. package/dist/cjs/api/resources/collection/index.js +19 -0
  22. package/dist/cjs/api/resources/collection/types/CollectionId.d.ts +4 -0
  23. package/dist/cjs/api/resources/collection/types/CollectionId.js +3 -0
  24. package/dist/cjs/api/resources/collection/types/CollectionStatusFailed.d.ts +3 -0
  25. package/dist/cjs/api/resources/collection/types/CollectionStatusFailed.js +3 -0
  26. package/dist/cjs/api/resources/collection/types/CollectionStatusPublished.d.ts +4 -0
  27. package/dist/cjs/api/resources/collection/types/CollectionStatusPublished.js +3 -0
  28. package/dist/cjs/api/resources/collection/types/CollectionStatusPublishing.d.ts +3 -0
  29. package/dist/cjs/api/resources/collection/types/CollectionStatusPublishing.js +3 -0
  30. package/dist/cjs/api/resources/collection/types/GetCollectionStatusResponse.d.ts +25 -0
  31. package/dist/cjs/api/resources/collection/types/GetCollectionStatusResponse.js +3 -0
  32. package/dist/cjs/api/resources/collection/types/TeamId.d.ts +4 -0
  33. package/dist/cjs/api/resources/collection/types/TeamId.js +3 -0
  34. package/dist/cjs/api/resources/collection/types/UserId.d.ts +4 -0
  35. package/dist/cjs/api/resources/collection/types/UserId.js +3 -0
  36. package/dist/cjs/api/resources/collection/types/index.d.ts +7 -0
  37. package/dist/cjs/api/resources/collection/types/index.js +23 -0
  38. package/dist/cjs/api/resources/index.d.ts +4 -0
  39. package/dist/cjs/api/resources/index.js +43 -0
  40. package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
  41. package/dist/cjs/auth/BearerAuthProvider.js +79 -0
  42. package/dist/cjs/auth/index.d.ts +1 -0
  43. package/dist/cjs/auth/index.js +5 -0
  44. package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
  45. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  46. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  47. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  48. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  49. package/dist/cjs/core/auth/BasicAuth.js +27 -0
  50. package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
  51. package/dist/cjs/core/auth/BearerToken.js +16 -0
  52. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  53. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  54. package/dist/cjs/core/auth/index.d.ts +5 -0
  55. package/dist/cjs/core/auth/index.js +9 -0
  56. package/dist/cjs/core/base64.d.ts +2 -0
  57. package/dist/cjs/core/base64.js +26 -0
  58. package/dist/cjs/core/exports.d.ts +1 -0
  59. package/dist/cjs/core/exports.js +17 -0
  60. package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
  61. package/dist/cjs/core/fetcher/APIResponse.js +2 -0
  62. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
  63. package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
  64. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
  65. package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
  66. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
  67. package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
  68. package/dist/cjs/core/fetcher/Fetcher.d.ts +48 -0
  69. package/dist/cjs/core/fetcher/Fetcher.js +316 -0
  70. package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
  71. package/dist/cjs/core/fetcher/Headers.js +84 -0
  72. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
  73. package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
  74. package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
  75. package/dist/cjs/core/fetcher/RawResponse.js +44 -0
  76. package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
  77. package/dist/cjs/core/fetcher/Supplier.js +22 -0
  78. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
  79. package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
  80. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
  81. package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
  82. package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
  83. package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
  84. package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
  85. package/dist/cjs/core/fetcher/getHeader.js +11 -0
  86. package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
  87. package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
  88. package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
  89. package/dist/cjs/core/fetcher/getResponseBody.js +69 -0
  90. package/dist/cjs/core/fetcher/index.d.ts +11 -0
  91. package/dist/cjs/core/fetcher/index.js +17 -0
  92. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
  93. package/dist/cjs/core/fetcher/makeRequest.js +40 -0
  94. package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
  95. package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
  96. package/dist/cjs/core/fetcher/signals.d.ts +5 -0
  97. package/dist/cjs/core/fetcher/signals.js +24 -0
  98. package/dist/cjs/core/headers.d.ts +2 -0
  99. package/dist/cjs/core/headers.js +31 -0
  100. package/dist/cjs/core/index.d.ts +6 -0
  101. package/dist/cjs/core/index.js +45 -0
  102. package/dist/cjs/core/json.d.ts +15 -0
  103. package/dist/cjs/core/json.js +24 -0
  104. package/dist/cjs/core/logging/exports.d.ts +18 -0
  105. package/dist/cjs/core/logging/exports.js +45 -0
  106. package/dist/cjs/core/logging/index.d.ts +1 -0
  107. package/dist/cjs/core/logging/index.js +17 -0
  108. package/dist/cjs/core/logging/logger.d.ts +126 -0
  109. package/dist/cjs/core/logging/logger.js +144 -0
  110. package/dist/cjs/core/runtime/index.d.ts +1 -0
  111. package/dist/cjs/core/runtime/index.js +5 -0
  112. package/dist/cjs/core/runtime/runtime.d.ts +9 -0
  113. package/dist/cjs/core/runtime/runtime.js +103 -0
  114. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  115. package/dist/cjs/core/url/encodePathParam.js +21 -0
  116. package/dist/cjs/core/url/index.d.ts +3 -0
  117. package/dist/cjs/core/url/index.js +9 -0
  118. package/dist/cjs/core/url/join.d.ts +1 -0
  119. package/dist/cjs/core/url/join.js +68 -0
  120. package/dist/cjs/core/url/qs.d.ts +6 -0
  121. package/dist/cjs/core/url/qs.js +64 -0
  122. package/dist/cjs/environments.d.ts +5 -0
  123. package/dist/cjs/environments.js +8 -0
  124. package/dist/cjs/errors/FernPostmanError.d.ts +12 -0
  125. package/dist/cjs/errors/FernPostmanError.js +32 -0
  126. package/dist/cjs/errors/FernPostmanTimeoutError.d.ts +3 -0
  127. package/dist/cjs/errors/FernPostmanTimeoutError.js +15 -0
  128. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  129. package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
  130. package/dist/cjs/errors/index.d.ts +2 -0
  131. package/dist/cjs/errors/index.js +7 -0
  132. package/dist/cjs/exports.d.ts +1 -0
  133. package/dist/cjs/exports.js +17 -0
  134. package/dist/cjs/index.d.ts +6 -0
  135. package/dist/cjs/index.js +48 -0
  136. package/dist/cjs/version.d.ts +1 -0
  137. package/dist/cjs/version.js +4 -0
  138. package/dist/esm/BaseClient.d.mts +39 -0
  139. package/dist/esm/BaseClient.mjs +25 -0
  140. package/dist/esm/Client.d.mts +25 -0
  141. package/dist/esm/Client.mjs +66 -0
  142. package/dist/esm/api/index.d.mts +1 -0
  143. package/dist/esm/api/index.mjs +1 -0
  144. package/dist/esm/api/resources/collection/client/Client.d.mts +43 -0
  145. package/dist/esm/api/resources/collection/client/Client.mjs +128 -0
  146. package/dist/esm/api/resources/collection/client/index.d.mts +1 -0
  147. package/dist/esm/api/resources/collection/client/index.mjs +1 -0
  148. package/dist/esm/api/resources/collection/client/requests/PublishCollectionRequest.d.mts +12 -0
  149. package/dist/esm/api/resources/collection/client/requests/PublishCollectionRequest.mjs +2 -0
  150. package/dist/esm/api/resources/collection/client/requests/index.d.mts +1 -0
  151. package/dist/esm/api/resources/collection/client/requests/index.mjs +1 -0
  152. package/dist/esm/api/resources/collection/errors/CollectionDoesNotExistError.d.mts +6 -0
  153. package/dist/esm/api/resources/collection/errors/CollectionDoesNotExistError.mjs +17 -0
  154. package/dist/esm/api/resources/collection/errors/index.d.mts +1 -0
  155. package/dist/esm/api/resources/collection/errors/index.mjs +1 -0
  156. package/dist/esm/api/resources/collection/index.d.mts +3 -0
  157. package/dist/esm/api/resources/collection/index.mjs +3 -0
  158. package/dist/esm/api/resources/collection/types/CollectionId.d.mts +4 -0
  159. package/dist/esm/api/resources/collection/types/CollectionId.mjs +2 -0
  160. package/dist/esm/api/resources/collection/types/CollectionStatusFailed.d.mts +3 -0
  161. package/dist/esm/api/resources/collection/types/CollectionStatusFailed.mjs +2 -0
  162. package/dist/esm/api/resources/collection/types/CollectionStatusPublished.d.mts +4 -0
  163. package/dist/esm/api/resources/collection/types/CollectionStatusPublished.mjs +2 -0
  164. package/dist/esm/api/resources/collection/types/CollectionStatusPublishing.d.mts +3 -0
  165. package/dist/esm/api/resources/collection/types/CollectionStatusPublishing.mjs +2 -0
  166. package/dist/esm/api/resources/collection/types/GetCollectionStatusResponse.d.mts +25 -0
  167. package/dist/esm/api/resources/collection/types/GetCollectionStatusResponse.mjs +2 -0
  168. package/dist/esm/api/resources/collection/types/TeamId.d.mts +4 -0
  169. package/dist/esm/api/resources/collection/types/TeamId.mjs +2 -0
  170. package/dist/esm/api/resources/collection/types/UserId.d.mts +4 -0
  171. package/dist/esm/api/resources/collection/types/UserId.mjs +2 -0
  172. package/dist/esm/api/resources/collection/types/index.d.mts +7 -0
  173. package/dist/esm/api/resources/collection/types/index.mjs +7 -0
  174. package/dist/esm/api/resources/index.d.mts +4 -0
  175. package/dist/esm/api/resources/index.mjs +4 -0
  176. package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
  177. package/dist/esm/auth/BearerAuthProvider.mjs +42 -0
  178. package/dist/esm/auth/index.d.mts +1 -0
  179. package/dist/esm/auth/index.mjs +1 -0
  180. package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
  181. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  182. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  183. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  184. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  185. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  186. package/dist/esm/core/auth/BearerToken.d.mts +7 -0
  187. package/dist/esm/core/auth/BearerToken.mjs +13 -0
  188. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  189. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  190. package/dist/esm/core/auth/index.d.mts +5 -0
  191. package/dist/esm/core/auth/index.mjs +3 -0
  192. package/dist/esm/core/base64.d.mts +2 -0
  193. package/dist/esm/core/base64.mjs +22 -0
  194. package/dist/esm/core/exports.d.mts +1 -0
  195. package/dist/esm/core/exports.mjs +1 -0
  196. package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
  197. package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
  198. package/dist/esm/core/fetcher/BinaryResponse.d.mts +19 -0
  199. package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
  200. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
  201. package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
  202. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
  203. package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
  204. package/dist/esm/core/fetcher/Fetcher.d.mts +48 -0
  205. package/dist/esm/core/fetcher/Fetcher.mjs +312 -0
  206. package/dist/esm/core/fetcher/Headers.d.mts +2 -0
  207. package/dist/esm/core/fetcher/Headers.mjs +82 -0
  208. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
  209. package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
  210. package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
  211. package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
  212. package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
  213. package/dist/esm/core/fetcher/Supplier.mjs +19 -0
  214. package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
  215. package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
  216. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
  217. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
  218. package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
  219. package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
  220. package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
  221. package/dist/esm/core/fetcher/getHeader.mjs +8 -0
  222. package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
  223. package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
  224. package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
  225. package/dist/esm/core/fetcher/getResponseBody.mjs +66 -0
  226. package/dist/esm/core/fetcher/index.d.mts +11 -0
  227. package/dist/esm/core/fetcher/index.mjs +6 -0
  228. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
  229. package/dist/esm/core/fetcher/makeRequest.mjs +36 -0
  230. package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
  231. package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
  232. package/dist/esm/core/fetcher/signals.d.mts +5 -0
  233. package/dist/esm/core/fetcher/signals.mjs +20 -0
  234. package/dist/esm/core/headers.d.mts +2 -0
  235. package/dist/esm/core/headers.mjs +27 -0
  236. package/dist/esm/core/index.d.mts +6 -0
  237. package/dist/esm/core/index.mjs +6 -0
  238. package/dist/esm/core/json.d.mts +15 -0
  239. package/dist/esm/core/json.mjs +19 -0
  240. package/dist/esm/core/logging/exports.d.mts +18 -0
  241. package/dist/esm/core/logging/exports.mjs +9 -0
  242. package/dist/esm/core/logging/index.d.mts +1 -0
  243. package/dist/esm/core/logging/index.mjs +1 -0
  244. package/dist/esm/core/logging/logger.d.mts +126 -0
  245. package/dist/esm/core/logging/logger.mjs +138 -0
  246. package/dist/esm/core/runtime/index.d.mts +1 -0
  247. package/dist/esm/core/runtime/index.mjs +1 -0
  248. package/dist/esm/core/runtime/runtime.d.mts +9 -0
  249. package/dist/esm/core/runtime/runtime.mjs +100 -0
  250. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  251. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  252. package/dist/esm/core/url/index.d.mts +3 -0
  253. package/dist/esm/core/url/index.mjs +3 -0
  254. package/dist/esm/core/url/join.d.mts +1 -0
  255. package/dist/esm/core/url/join.mjs +65 -0
  256. package/dist/esm/core/url/qs.d.mts +6 -0
  257. package/dist/esm/core/url/qs.mjs +61 -0
  258. package/dist/esm/environments.d.mts +5 -0
  259. package/dist/esm/environments.mjs +5 -0
  260. package/dist/esm/errors/FernPostmanError.d.mts +12 -0
  261. package/dist/esm/errors/FernPostmanError.mjs +28 -0
  262. package/dist/esm/errors/FernPostmanTimeoutError.d.mts +3 -0
  263. package/dist/esm/errors/FernPostmanTimeoutError.mjs +11 -0
  264. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  265. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  266. package/dist/esm/errors/index.d.mts +2 -0
  267. package/dist/esm/errors/index.mjs +2 -0
  268. package/dist/esm/exports.d.mts +1 -0
  269. package/dist/esm/exports.mjs +1 -0
  270. package/dist/esm/index.d.mts +6 -0
  271. package/dist/esm/index.mjs +5 -0
  272. package/dist/esm/version.d.mts +1 -0
  273. package/dist/esm/version.mjs +1 -0
  274. package/package.json +69 -0
  275. package/reference.md +193 -0
@@ -0,0 +1,66 @@
1
+ // This file was auto-generated by Fern from our API Definition.
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
+ import { CollectionClient } from "./api/resources/collection/client/Client.mjs";
12
+ import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
13
+ import { mergeHeaders } from "./core/headers.mjs";
14
+ import * as core from "./core/index.mjs";
15
+ import * as environments from "./environments.mjs";
16
+ import { handleNonStatusCodeError } from "./errors/handleNonStatusCodeError.mjs";
17
+ import * as errors from "./errors/index.mjs";
18
+ export class FernPostmanClient {
19
+ constructor(options) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ get collection() {
23
+ var _a;
24
+ return ((_a = this._collection) !== null && _a !== void 0 ? _a : (this._collection = new CollectionClient(this._options)));
25
+ }
26
+ /**
27
+ * Check endpoint to verify the API key is valid.
28
+ *
29
+ * @param {FernPostmanClient.RequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @example
32
+ * await client.check()
33
+ */
34
+ check(requestOptions) {
35
+ return core.HttpResponsePromise.fromPromise(this.__check(requestOptions));
36
+ }
37
+ __check(requestOptions) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
40
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
41
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
42
+ const _response = yield core.fetcher({
43
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernPostmanEnvironment.Production, "/api/postman/check"),
44
+ method: "GET",
45
+ headers: _headers,
46
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
47
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
48
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
49
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
50
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
51
+ logging: this._options.logging,
52
+ });
53
+ if (_response.ok) {
54
+ return { data: undefined, rawResponse: _response.rawResponse };
55
+ }
56
+ if (_response.error.reason === "status-code") {
57
+ throw new errors.FernPostmanError({
58
+ statusCode: _response.error.statusCode,
59
+ body: _response.error.body,
60
+ rawResponse: _response.rawResponse,
61
+ });
62
+ }
63
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/postman/check");
64
+ });
65
+ }
66
+ }
@@ -0,0 +1 @@
1
+ export * from "./resources/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./resources/index.mjs";
@@ -0,0 +1,43 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as FernPostman from "../../../index.mjs";
5
+ export declare namespace CollectionClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class CollectionClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<CollectionClient.Options>;
12
+ constructor(options: CollectionClient.Options);
13
+ /**
14
+ * Returns the publishing status of the Postman collection as documentation.
15
+ *
16
+ * @param {FernPostman.CollectionId} collectionId
17
+ * @param {CollectionClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link FernPostman.CollectionDoesNotExistError}
20
+ *
21
+ * @example
22
+ * await client.collection.getStatus("collectionId")
23
+ */
24
+ getStatus(collectionId: FernPostman.CollectionId, requestOptions?: CollectionClient.RequestOptions): core.HttpResponsePromise<FernPostman.GetCollectionStatusResponse>;
25
+ private __getStatus;
26
+ /**
27
+ * Initiates a request to publish the Postman collection as a Fern documentation site.
28
+ *
29
+ * @param {FernPostman.CollectionId} collectionId
30
+ * @param {FernPostman.PublishCollectionRequest} request
31
+ * @param {CollectionClient.RequestOptions} requestOptions - Request-specific configuration.
32
+ *
33
+ * @throws {@link FernPostman.CollectionDoesNotExistError}
34
+ *
35
+ * @example
36
+ * await client.collection.publish("collectionId", {
37
+ * userId: "userId",
38
+ * teamId: "teamId"
39
+ * })
40
+ */
41
+ publish(collectionId: FernPostman.CollectionId, request: FernPostman.PublishCollectionRequest, requestOptions?: CollectionClient.RequestOptions): core.HttpResponsePromise<void>;
42
+ private __publish;
43
+ }
@@ -0,0 +1,128 @@
1
+ // This file was auto-generated by Fern from our API Definition.
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
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as FernPostman from "../../../index.mjs";
18
+ export class CollectionClient {
19
+ constructor(options) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Returns the publishing status of the Postman collection as documentation.
24
+ *
25
+ * @param {FernPostman.CollectionId} collectionId
26
+ * @param {CollectionClient.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link FernPostman.CollectionDoesNotExistError}
29
+ *
30
+ * @example
31
+ * await client.collection.getStatus("collectionId")
32
+ */
33
+ getStatus(collectionId, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__getStatus(collectionId, requestOptions));
35
+ }
36
+ __getStatus(collectionId, requestOptions) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
40
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
41
+ const _response = yield core.fetcher({
42
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernPostmanEnvironment.Production, `/api/postman/publish/collection/${core.url.encodePathParam(collectionId)}/status`),
43
+ method: "GET",
44
+ headers: _headers,
45
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
46
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
47
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
48
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
49
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
50
+ logging: this._options.logging,
51
+ });
52
+ if (_response.ok) {
53
+ return {
54
+ data: _response.body,
55
+ rawResponse: _response.rawResponse,
56
+ };
57
+ }
58
+ if (_response.error.reason === "status-code") {
59
+ switch (_response.error.statusCode) {
60
+ case 404:
61
+ throw new FernPostman.CollectionDoesNotExistError(_response.error.body, _response.rawResponse);
62
+ default:
63
+ throw new errors.FernPostmanError({
64
+ statusCode: _response.error.statusCode,
65
+ body: _response.error.body,
66
+ rawResponse: _response.rawResponse,
67
+ });
68
+ }
69
+ }
70
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/postman/publish/collection/{collectionId}/status");
71
+ });
72
+ }
73
+ /**
74
+ * Initiates a request to publish the Postman collection as a Fern documentation site.
75
+ *
76
+ * @param {FernPostman.CollectionId} collectionId
77
+ * @param {FernPostman.PublishCollectionRequest} request
78
+ * @param {CollectionClient.RequestOptions} requestOptions - Request-specific configuration.
79
+ *
80
+ * @throws {@link FernPostman.CollectionDoesNotExistError}
81
+ *
82
+ * @example
83
+ * await client.collection.publish("collectionId", {
84
+ * userId: "userId",
85
+ * teamId: "teamId"
86
+ * })
87
+ */
88
+ publish(collectionId, request, requestOptions) {
89
+ return core.HttpResponsePromise.fromPromise(this.__publish(collectionId, request, requestOptions));
90
+ }
91
+ __publish(collectionId, request, requestOptions) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
94
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
95
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
96
+ const _response = yield core.fetcher({
97
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernPostmanEnvironment.Production, `/api/postman/publish/collection/${core.url.encodePathParam(collectionId)}`),
98
+ method: "POST",
99
+ headers: _headers,
100
+ contentType: "application/json",
101
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
102
+ requestType: "json",
103
+ body: request,
104
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
105
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
106
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
108
+ logging: this._options.logging,
109
+ });
110
+ if (_response.ok) {
111
+ return { data: undefined, rawResponse: _response.rawResponse };
112
+ }
113
+ if (_response.error.reason === "status-code") {
114
+ switch (_response.error.statusCode) {
115
+ case 404:
116
+ throw new FernPostman.CollectionDoesNotExistError(_response.error.body, _response.rawResponse);
117
+ default:
118
+ throw new errors.FernPostmanError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.body,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
124
+ }
125
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/postman/publish/collection/{collectionId}");
126
+ });
127
+ }
128
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,12 @@
1
+ import type * as FernPostman from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * userId: "userId",
6
+ * teamId: "teamId"
7
+ * }
8
+ */
9
+ export interface PublishCollectionRequest {
10
+ userId: FernPostman.UserId;
11
+ teamId: FernPostman.TeamId;
12
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { PublishCollectionRequest } from "./PublishCollectionRequest.mjs";
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ import type * as FernPostman from "../../../index.mjs";
4
+ export declare class CollectionDoesNotExistError extends errors.FernPostmanError {
5
+ constructor(body: FernPostman.CollectionId, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class CollectionDoesNotExistError extends errors.FernPostmanError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "CollectionDoesNotExistError",
7
+ statusCode: 404,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export * from "./CollectionDoesNotExistError.mjs";
@@ -0,0 +1 @@
1
+ export * from "./CollectionDoesNotExistError.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
3
+ export * from "./types/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
3
+ export * from "./types/index.mjs";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The unique identifier for a Collection
3
+ */
4
+ export type CollectionId = string;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface CollectionStatusFailed {
2
+ reason: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface CollectionStatusPublished {
2
+ url: string;
3
+ publishedAt: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface CollectionStatusPublishing {
2
+ startedAt: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,25 @@
1
+ import type * as FernPostman from "../../../index.mjs";
2
+ /**
3
+ * Discriminated union representing the status of publishing the collection as documentation.
4
+ */
5
+ export type GetCollectionStatusResponse =
6
+ /**
7
+ * The collection publication is in progress. */
8
+ FernPostman.GetCollectionStatusResponse.Publishing
9
+ /**
10
+ * The collection has been successfully published as documentation. */
11
+ | FernPostman.GetCollectionStatusResponse.Published
12
+ /**
13
+ * The collection publication failed. */
14
+ | FernPostman.GetCollectionStatusResponse.Failed;
15
+ export declare namespace GetCollectionStatusResponse {
16
+ interface Publishing extends FernPostman.CollectionStatusPublishing {
17
+ type: "publishing";
18
+ }
19
+ interface Published extends FernPostman.CollectionStatusPublished {
20
+ type: "published";
21
+ }
22
+ interface Failed extends FernPostman.CollectionStatusFailed {
23
+ type: "failed";
24
+ }
25
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The unique identifier for a Team
3
+ */
4
+ export type TeamId = string;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The unique identifier for a User
3
+ */
4
+ export type UserId = string;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from "./CollectionId.mjs";
2
+ export * from "./CollectionStatusFailed.mjs";
3
+ export * from "./CollectionStatusPublished.mjs";
4
+ export * from "./CollectionStatusPublishing.mjs";
5
+ export * from "./GetCollectionStatusResponse.mjs";
6
+ export * from "./TeamId.mjs";
7
+ export * from "./UserId.mjs";
@@ -0,0 +1,7 @@
1
+ export * from "./CollectionId.mjs";
2
+ export * from "./CollectionStatusFailed.mjs";
3
+ export * from "./CollectionStatusPublished.mjs";
4
+ export * from "./CollectionStatusPublishing.mjs";
5
+ export * from "./GetCollectionStatusResponse.mjs";
6
+ export * from "./TeamId.mjs";
7
+ export * from "./UserId.mjs";
@@ -0,0 +1,4 @@
1
+ export * from "./collection/client/requests/index.mjs";
2
+ export * from "./collection/errors/index.mjs";
3
+ export * as collection from "./collection/index.mjs";
4
+ export * from "./collection/types/index.mjs";
@@ -0,0 +1,4 @@
1
+ export * from "./collection/client/requests/index.mjs";
2
+ export * from "./collection/errors/index.mjs";
3
+ export * as collection from "./collection/index.mjs";
4
+ export * from "./collection/types/index.mjs";
@@ -0,0 +1,20 @@
1
+ import * as core from "../core/index.mjs";
2
+ declare const TOKEN_PARAM: "token";
3
+ export declare class BearerAuthProvider implements core.AuthProvider {
4
+ private readonly options;
5
+ constructor(options: BearerAuthProvider.Options);
6
+ static canCreate(options: Partial<BearerAuthProvider.Options>): boolean;
7
+ getAuthRequest({ endpointMetadata, }?: {
8
+ endpointMetadata?: core.EndpointMetadata;
9
+ }): Promise<core.AuthRequest>;
10
+ }
11
+ export declare namespace BearerAuthProvider {
12
+ const AUTH_SCHEME: "bearer";
13
+ const AUTH_CONFIG_ERROR_MESSAGE: string;
14
+ type Options = AuthOptions;
15
+ type AuthOptions = {
16
+ [TOKEN_PARAM]: core.Supplier<core.BearerToken>;
17
+ };
18
+ function createInstance(options: Options): core.AuthProvider;
19
+ }
20
+ export {};
@@ -0,0 +1,42 @@
1
+ // This file was auto-generated by Fern from our API Definition.
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
+ import * as core from "../core/index.mjs";
12
+ import * as errors from "../errors/index.mjs";
13
+ const TOKEN_PARAM = "token";
14
+ export class BearerAuthProvider {
15
+ constructor(options) {
16
+ this.options = options;
17
+ }
18
+ static canCreate(options) {
19
+ return (options === null || options === void 0 ? void 0 : options[TOKEN_PARAM]) != null;
20
+ }
21
+ getAuthRequest() {
22
+ return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
23
+ const token = yield core.Supplier.get(this.options[TOKEN_PARAM]);
24
+ if (token == null) {
25
+ throw new errors.FernPostmanError({
26
+ message: BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
27
+ });
28
+ }
29
+ return {
30
+ headers: { Authorization: `Bearer ${token}` },
31
+ };
32
+ });
33
+ }
34
+ }
35
+ (function (BearerAuthProvider) {
36
+ BearerAuthProvider.AUTH_SCHEME = "bearer";
37
+ BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${TOKEN_PARAM}' when initializing the client`;
38
+ function createInstance(options) {
39
+ return new BearerAuthProvider(options);
40
+ }
41
+ BearerAuthProvider.createInstance = createInstance;
42
+ })(BearerAuthProvider || (BearerAuthProvider = {}));
@@ -0,0 +1 @@
1
+ export { BearerAuthProvider } from "./BearerAuthProvider.mjs";
@@ -0,0 +1 @@
1
+ export { BearerAuthProvider } from "./BearerAuthProvider.mjs";
@@ -0,0 +1,7 @@
1
+ import type { EndpointMetadata } from "../fetcher/EndpointMetadata.mjs";
2
+ import type { AuthRequest } from "./AuthRequest.mjs";
3
+ export interface AuthProvider {
4
+ getAuthRequest(arg?: {
5
+ endpointMetadata?: EndpointMetadata;
6
+ }): Promise<AuthRequest>;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Request parameters for authentication requests.
3
+ */
4
+ export interface AuthRequest {
5
+ /**
6
+ * The headers to be included in the request.
7
+ */
8
+ headers: Record<string, string>;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface BasicAuth {
2
+ username: string;
3
+ password: string;
4
+ }
5
+ export declare const BasicAuth: {
6
+ toAuthorizationHeader: (basicAuth: BasicAuth | undefined) => string | undefined;
7
+ fromAuthorizationHeader: (header: string) => BasicAuth;
8
+ };
@@ -0,0 +1,24 @@
1
+ import { base64Decode, base64Encode } from "../base64.mjs";
2
+ const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
3
+ export const BasicAuth = {
4
+ toAuthorizationHeader: (basicAuth) => {
5
+ if (basicAuth == null) {
6
+ return undefined;
7
+ }
8
+ const token = base64Encode(`${basicAuth.username}:${basicAuth.password}`);
9
+ return `Basic ${token}`;
10
+ },
11
+ fromAuthorizationHeader: (header) => {
12
+ const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, "");
13
+ const decoded = base64Decode(credentials);
14
+ const [username, ...passwordParts] = decoded.split(":");
15
+ const password = passwordParts.length > 0 ? passwordParts.join(":") : undefined;
16
+ if (username == null || password == null) {
17
+ throw new Error("Invalid basic auth");
18
+ }
19
+ return {
20
+ username,
21
+ password,
22
+ };
23
+ },
24
+ };
@@ -0,0 +1,7 @@
1
+ export type BearerToken = string;
2
+ declare function toAuthorizationHeader(token: string | undefined): string | undefined;
3
+ export declare const BearerToken: {
4
+ toAuthorizationHeader: typeof toAuthorizationHeader;
5
+ fromAuthorizationHeader: (header: string) => BearerToken;
6
+ };
7
+ export {};
@@ -0,0 +1,13 @@
1
+ const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i;
2
+ function toAuthorizationHeader(token) {
3
+ if (token == null) {
4
+ return undefined;
5
+ }
6
+ return `Bearer ${token}`;
7
+ }
8
+ export const BearerToken = {
9
+ toAuthorizationHeader: toAuthorizationHeader,
10
+ fromAuthorizationHeader: (header) => {
11
+ return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim();
12
+ },
13
+ };
@@ -0,0 +1,5 @@
1
+ import type { AuthProvider } from "./AuthProvider.mjs";
2
+ import type { AuthRequest } from "./AuthRequest.mjs";
3
+ export declare class NoOpAuthProvider implements AuthProvider {
4
+ getAuthRequest(): Promise<AuthRequest>;
5
+ }
@@ -0,0 +1,5 @@
1
+ export class NoOpAuthProvider {
2
+ getAuthRequest() {
3
+ return Promise.resolve({ headers: {} });
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ export type { AuthProvider } from "./AuthProvider.mjs";
2
+ export type { AuthRequest } from "./AuthRequest.mjs";
3
+ export { BasicAuth } from "./BasicAuth.mjs";
4
+ export { BearerToken } from "./BearerToken.mjs";
5
+ export { NoOpAuthProvider } from "./NoOpAuthProvider.mjs";
@@ -0,0 +1,3 @@
1
+ export { BasicAuth } from "./BasicAuth.mjs";
2
+ export { BearerToken } from "./BearerToken.mjs";
3
+ export { NoOpAuthProvider } from "./NoOpAuthProvider.mjs";
@@ -0,0 +1,2 @@
1
+ export declare function base64Encode(input: string): string;
2
+ export declare function base64Decode(input: string): string;