@fern-api/venus-api-sdk 5.4.0 → 5.5.0

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
46
- "X-Fern-SDK-Version": "5.4.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/5.4.0",
46
+ "X-Fern-SDK-Version": "5.5.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/5.5.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -44,12 +44,19 @@ export declare class FernVenusApiClient {
44
44
  healthHealthGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthHealthGet.Error>>;
45
45
  private __healthHealthGet;
46
46
  /**
47
- * Post-flip smoke check: ping each configured RDS engine.
47
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
48
+ *
49
+ * @example
50
+ * await client.pingPingGet()
51
+ */
52
+ pingPingGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<string, FernVenusApi.pingPingGet.Error>>;
53
+ private __pingPingGet;
54
+ /**
55
+ * RDS smoke check: ping each configured RDS engine.
48
56
  *
49
57
  * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
50
58
  * 503 if any engine is unhealthy. Returns 200 with ``configured: false``
51
- * when venus is running Supabase-only (no RDS engines), so the check is
52
- * safe to call before the cutover wires RDS in.
59
+ * when no RDS engines are configured.
53
60
  *
54
61
  * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
55
62
  *
@@ -172,12 +172,58 @@ class FernVenusApiClient {
172
172
  });
173
173
  }
174
174
  /**
175
- * Post-flip smoke check: ping each configured RDS engine.
175
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
176
+ *
177
+ * @example
178
+ * await client.pingPingGet()
179
+ */
180
+ pingPingGet(requestOptions) {
181
+ return core.HttpResponsePromise.fromPromise(this.__pingPingGet(requestOptions));
182
+ }
183
+ __pingPingGet(requestOptions) {
184
+ return __awaiter(this, void 0, void 0, function* () {
185
+ var _a, _b, _c, _d, _e, _f, _g, _h;
186
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
187
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
188
+ const _response = yield core.fetcher({
189
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "ping"),
190
+ method: "GET",
191
+ headers: _headers,
192
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
193
+ responseType: "text",
194
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
195
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
196
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
197
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
198
+ logging: this._options.logging,
199
+ });
200
+ if (_response.ok) {
201
+ return {
202
+ data: {
203
+ ok: true,
204
+ body: _response.body,
205
+ headers: _response.headers,
206
+ rawResponse: _response.rawResponse,
207
+ },
208
+ rawResponse: _response.rawResponse,
209
+ };
210
+ }
211
+ return {
212
+ data: {
213
+ ok: false,
214
+ error: FernVenusApi.pingPingGet.Error._unknown(_response.error),
215
+ rawResponse: _response.rawResponse,
216
+ },
217
+ rawResponse: _response.rawResponse,
218
+ };
219
+ });
220
+ }
221
+ /**
222
+ * RDS smoke check: ping each configured RDS engine.
176
223
  *
177
224
  * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
178
225
  * 503 if any engine is unhealthy. Returns 200 with ``configured: false``
179
- * when venus is running Supabase-only (no RDS engines), so the check is
180
- * safe to call before the cutover wires RDS in.
226
+ * when no RDS engines are configured.
181
227
  *
182
228
  * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
183
229
  *
@@ -1,3 +1,4 @@
1
1
  export * as healthHealthGet from "./healthHealthGet.js";
2
2
  export * as healthRdsHealthRdsGet from "./healthRdsHealthRdsGet.js";
3
3
  export * as metricsMetricsGet from "./metricsMetricsGet.js";
4
+ export * as pingPingGet from "./pingPingGet.js";
@@ -33,7 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.metricsMetricsGet = exports.healthRdsHealthRdsGet = exports.healthHealthGet = void 0;
36
+ exports.pingPingGet = exports.metricsMetricsGet = exports.healthRdsHealthRdsGet = exports.healthHealthGet = void 0;
37
37
  exports.healthHealthGet = __importStar(require("./healthHealthGet.js"));
38
38
  exports.healthRdsHealthRdsGet = __importStar(require("./healthRdsHealthRdsGet.js"));
39
39
  exports.metricsMetricsGet = __importStar(require("./metricsMetricsGet.js"));
40
+ exports.pingPingGet = __importStar(require("./pingPingGet.js"));
@@ -0,0 +1,19 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as FernVenusApi from "../index.js";
3
+ export type Error = FernVenusApi.pingPingGet.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface _Unknown extends _Utils {
6
+ statusCode: void;
7
+ content: core.Fetcher.Error;
8
+ }
9
+ interface _Utils {
10
+ _visit: <_Result>(visitor: FernVenusApi.pingPingGet.Error._Visitor<_Result>) => _Result;
11
+ }
12
+ interface _Visitor<_Result> {
13
+ _other: (value: core.Fetcher.Error) => _Result;
14
+ }
15
+ }
16
+ export declare const Error: {
17
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.pingPingGet.Error._Unknown;
18
+ readonly _visit: <_Result>(value: FernVenusApi.pingPingGet.Error, visitor: FernVenusApi.pingPingGet.Error._Visitor<_Result>) => _Result;
19
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Error = void 0;
38
+ const FernVenusApi = __importStar(require("../index.js"));
39
+ exports.Error = {
40
+ _unknown: (fetcherError) => {
41
+ return {
42
+ statusCode: undefined,
43
+ content: fetcherError,
44
+ _visit: function (visitor) {
45
+ return FernVenusApi.pingPingGet.Error._visit(this, visitor);
46
+ },
47
+ };
48
+ },
49
+ _visit: (value, visitor) => {
50
+ switch (value.statusCode) {
51
+ default:
52
+ return visitor._other(value.content);
53
+ }
54
+ },
55
+ };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.4.0";
1
+ export declare const SDK_VERSION = "5.5.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "5.4.0";
4
+ exports.SDK_VERSION = "5.5.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
9
- "X-Fern-SDK-Version": "5.4.0",
10
- "User-Agent": "@fern-api/venus-api-sdk/5.4.0",
9
+ "X-Fern-SDK-Version": "5.5.0",
10
+ "User-Agent": "@fern-api/venus-api-sdk/5.5.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -44,12 +44,19 @@ export declare class FernVenusApiClient {
44
44
  healthHealthGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthHealthGet.Error>>;
45
45
  private __healthHealthGet;
46
46
  /**
47
- * Post-flip smoke check: ping each configured RDS engine.
47
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
48
+ *
49
+ * @example
50
+ * await client.pingPingGet()
51
+ */
52
+ pingPingGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<string, FernVenusApi.pingPingGet.Error>>;
53
+ private __pingPingGet;
54
+ /**
55
+ * RDS smoke check: ping each configured RDS engine.
48
56
  *
49
57
  * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
50
58
  * 503 if any engine is unhealthy. Returns 200 with ``configured: false``
51
- * when venus is running Supabase-only (no RDS engines), so the check is
52
- * safe to call before the cutover wires RDS in.
59
+ * when no RDS engines are configured.
53
60
  *
54
61
  * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
55
62
  *
@@ -136,12 +136,58 @@ export class FernVenusApiClient {
136
136
  });
137
137
  }
138
138
  /**
139
- * Post-flip smoke check: ping each configured RDS engine.
139
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
140
+ *
141
+ * @example
142
+ * await client.pingPingGet()
143
+ */
144
+ pingPingGet(requestOptions) {
145
+ return core.HttpResponsePromise.fromPromise(this.__pingPingGet(requestOptions));
146
+ }
147
+ __pingPingGet(requestOptions) {
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ var _a, _b, _c, _d, _e, _f, _g, _h;
150
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
151
+ 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);
152
+ const _response = yield core.fetcher({
153
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "ping"),
154
+ method: "GET",
155
+ headers: _headers,
156
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
157
+ responseType: "text",
158
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
159
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
160
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
161
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
162
+ logging: this._options.logging,
163
+ });
164
+ if (_response.ok) {
165
+ return {
166
+ data: {
167
+ ok: true,
168
+ body: _response.body,
169
+ headers: _response.headers,
170
+ rawResponse: _response.rawResponse,
171
+ },
172
+ rawResponse: _response.rawResponse,
173
+ };
174
+ }
175
+ return {
176
+ data: {
177
+ ok: false,
178
+ error: FernVenusApi.pingPingGet.Error._unknown(_response.error),
179
+ rawResponse: _response.rawResponse,
180
+ },
181
+ rawResponse: _response.rawResponse,
182
+ };
183
+ });
184
+ }
185
+ /**
186
+ * RDS smoke check: ping each configured RDS engine.
140
187
  *
141
188
  * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
142
189
  * 503 if any engine is unhealthy. Returns 200 with ``configured: false``
143
- * when venus is running Supabase-only (no RDS engines), so the check is
144
- * safe to call before the cutover wires RDS in.
190
+ * when no RDS engines are configured.
145
191
  *
146
192
  * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
147
193
  *
@@ -1,3 +1,4 @@
1
1
  export * as healthHealthGet from "./healthHealthGet.mjs";
2
2
  export * as healthRdsHealthRdsGet from "./healthRdsHealthRdsGet.mjs";
3
3
  export * as metricsMetricsGet from "./metricsMetricsGet.mjs";
4
+ export * as pingPingGet from "./pingPingGet.mjs";
@@ -1,3 +1,4 @@
1
1
  export * as healthHealthGet from "./healthHealthGet.mjs";
2
2
  export * as healthRdsHealthRdsGet from "./healthRdsHealthRdsGet.mjs";
3
3
  export * as metricsMetricsGet from "./metricsMetricsGet.mjs";
4
+ export * as pingPingGet from "./pingPingGet.mjs";
@@ -0,0 +1,19 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as FernVenusApi from "../index.mjs";
3
+ export type Error = FernVenusApi.pingPingGet.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface _Unknown extends _Utils {
6
+ statusCode: void;
7
+ content: core.Fetcher.Error;
8
+ }
9
+ interface _Utils {
10
+ _visit: <_Result>(visitor: FernVenusApi.pingPingGet.Error._Visitor<_Result>) => _Result;
11
+ }
12
+ interface _Visitor<_Result> {
13
+ _other: (value: core.Fetcher.Error) => _Result;
14
+ }
15
+ }
16
+ export declare const Error: {
17
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.pingPingGet.Error._Unknown;
18
+ readonly _visit: <_Result>(value: FernVenusApi.pingPingGet.Error, visitor: FernVenusApi.pingPingGet.Error._Visitor<_Result>) => _Result;
19
+ };
@@ -0,0 +1,19 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as FernVenusApi from "../index.mjs";
3
+ export const Error = {
4
+ _unknown: (fetcherError) => {
5
+ return {
6
+ statusCode: undefined,
7
+ content: fetcherError,
8
+ _visit: function (visitor) {
9
+ return FernVenusApi.pingPingGet.Error._visit(this, visitor);
10
+ },
11
+ };
12
+ },
13
+ _visit: (value, visitor) => {
14
+ switch (value.statusCode) {
15
+ default:
16
+ return visitor._other(value.content);
17
+ }
18
+ },
19
+ };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.4.0";
1
+ export declare const SDK_VERSION = "5.5.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.4.0";
1
+ export const SDK_VERSION = "5.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/venus-api-sdk",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -91,6 +91,47 @@ await client.healthHealthGet();
91
91
  </dl>
92
92
 
93
93
 
94
+ </dd>
95
+ </dl>
96
+ </details>
97
+
98
+ <details><summary><code>client.<a href="/src/Client.ts">pingPingGet</a>() -> core.APIResponse&lt;string, FernVenusApi.pingPingGet.Error&gt;</code></summary>
99
+ <dl>
100
+ <dd>
101
+
102
+ #### 🔌 Usage
103
+
104
+ <dl>
105
+ <dd>
106
+
107
+ <dl>
108
+ <dd>
109
+
110
+ ```typescript
111
+ await client.pingPingGet();
112
+
113
+ ```
114
+ </dd>
115
+ </dl>
116
+ </dd>
117
+ </dl>
118
+
119
+ #### ⚙️ Parameters
120
+
121
+ <dl>
122
+ <dd>
123
+
124
+ <dl>
125
+ <dd>
126
+
127
+ **requestOptions:** `FernVenusApiClient.RequestOptions`
128
+
129
+ </dd>
130
+ </dl>
131
+ </dd>
132
+ </dl>
133
+
134
+
94
135
  </dd>
95
136
  </dl>
96
137
  </details>
@@ -107,12 +148,11 @@ await client.healthHealthGet();
107
148
  <dl>
108
149
  <dd>
109
150
 
110
- Post-flip smoke check: ping each configured RDS engine.
151
+ RDS smoke check: ping each configured RDS engine.
111
152
 
112
153
  Returns 200 only if every configured RDS engine answers ``SELECT 1``;
113
154
  503 if any engine is unhealthy. Returns 200 with ``configured: false``
114
- when venus is running Supabase-only (no RDS engines), so the check is
115
- safe to call before the cutover wires RDS in.
155
+ when no RDS engines are configured.
116
156
  </dd>
117
157
  </dl>
118
158
  </dd>