@fern-api/venus-api-sdk 5.3.0 → 5.4.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.3.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/5.3.0",
46
+ "X-Fern-SDK-Version": "5.4.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/5.4.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);
@@ -43,4 +43,19 @@ export declare class FernVenusApiClient {
43
43
  */
44
44
  healthHealthGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthHealthGet.Error>>;
45
45
  private __healthHealthGet;
46
+ /**
47
+ * Post-flip smoke check: ping each configured RDS engine.
48
+ *
49
+ * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
50
+ * 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.
53
+ *
54
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @example
57
+ * await client.healthRdsHealthRdsGet()
58
+ */
59
+ healthRdsHealthRdsGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthRdsHealthRdsGet.Error>>;
60
+ private __healthRdsHealthRdsGet;
46
61
  }
@@ -171,5 +171,58 @@ class FernVenusApiClient {
171
171
  };
172
172
  });
173
173
  }
174
+ /**
175
+ * Post-flip smoke check: ping each configured RDS engine.
176
+ *
177
+ * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
178
+ * 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.
181
+ *
182
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
183
+ *
184
+ * @example
185
+ * await client.healthRdsHealthRdsGet()
186
+ */
187
+ healthRdsHealthRdsGet(requestOptions) {
188
+ return core.HttpResponsePromise.fromPromise(this.__healthRdsHealthRdsGet(requestOptions));
189
+ }
190
+ __healthRdsHealthRdsGet(requestOptions) {
191
+ return __awaiter(this, void 0, void 0, function* () {
192
+ var _a, _b, _c, _d, _e, _f, _g, _h;
193
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
194
+ 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);
195
+ const _response = yield core.fetcher({
196
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "health/rds"),
197
+ method: "GET",
198
+ headers: _headers,
199
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
200
+ 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,
201
+ 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,
202
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
203
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
204
+ logging: this._options.logging,
205
+ });
206
+ if (_response.ok) {
207
+ return {
208
+ data: {
209
+ ok: true,
210
+ body: _response.body,
211
+ headers: _response.headers,
212
+ rawResponse: _response.rawResponse,
213
+ },
214
+ rawResponse: _response.rawResponse,
215
+ };
216
+ }
217
+ return {
218
+ data: {
219
+ ok: false,
220
+ error: FernVenusApi.healthRdsHealthRdsGet.Error._unknown(_response.error),
221
+ rawResponse: _response.rawResponse,
222
+ },
223
+ rawResponse: _response.rawResponse,
224
+ };
225
+ });
226
+ }
174
227
  }
175
228
  exports.FernVenusApiClient = FernVenusApiClient;
@@ -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.healthRdsHealthRdsGet.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.healthRdsHealthRdsGet.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.healthRdsHealthRdsGet.Error._Unknown;
18
+ readonly _visit: <_Result>(value: FernVenusApi.healthRdsHealthRdsGet.Error, visitor: FernVenusApi.healthRdsHealthRdsGet.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.healthRdsHealthRdsGet.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,2 +1,3 @@
1
1
  export * as healthHealthGet from "./healthHealthGet.js";
2
+ export * as healthRdsHealthRdsGet from "./healthRdsHealthRdsGet.js";
2
3
  export * as metricsMetricsGet from "./metricsMetricsGet.js";
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.metricsMetricsGet = exports.healthHealthGet = void 0;
36
+ exports.metricsMetricsGet = exports.healthRdsHealthRdsGet = exports.healthHealthGet = void 0;
37
37
  exports.healthHealthGet = __importStar(require("./healthHealthGet.js"));
38
+ exports.healthRdsHealthRdsGet = __importStar(require("./healthRdsHealthRdsGet.js"));
38
39
  exports.metricsMetricsGet = __importStar(require("./metricsMetricsGet.js"));
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.3.0";
1
+ export declare const SDK_VERSION = "5.4.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.3.0";
4
+ exports.SDK_VERSION = "5.4.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.3.0",
10
- "User-Agent": "@fern-api/venus-api-sdk/5.3.0",
9
+ "X-Fern-SDK-Version": "5.4.0",
10
+ "User-Agent": "@fern-api/venus-api-sdk/5.4.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);
@@ -43,4 +43,19 @@ export declare class FernVenusApiClient {
43
43
  */
44
44
  healthHealthGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthHealthGet.Error>>;
45
45
  private __healthHealthGet;
46
+ /**
47
+ * Post-flip smoke check: ping each configured RDS engine.
48
+ *
49
+ * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
50
+ * 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.
53
+ *
54
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @example
57
+ * await client.healthRdsHealthRdsGet()
58
+ */
59
+ healthRdsHealthRdsGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthRdsHealthRdsGet.Error>>;
60
+ private __healthRdsHealthRdsGet;
46
61
  }
@@ -135,4 +135,57 @@ export class FernVenusApiClient {
135
135
  };
136
136
  });
137
137
  }
138
+ /**
139
+ * Post-flip smoke check: ping each configured RDS engine.
140
+ *
141
+ * Returns 200 only if every configured RDS engine answers ``SELECT 1``;
142
+ * 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.
145
+ *
146
+ * @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
147
+ *
148
+ * @example
149
+ * await client.healthRdsHealthRdsGet()
150
+ */
151
+ healthRdsHealthRdsGet(requestOptions) {
152
+ return core.HttpResponsePromise.fromPromise(this.__healthRdsHealthRdsGet(requestOptions));
153
+ }
154
+ __healthRdsHealthRdsGet(requestOptions) {
155
+ return __awaiter(this, void 0, void 0, function* () {
156
+ var _a, _b, _c, _d, _e, _f, _g, _h;
157
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
158
+ 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);
159
+ const _response = yield core.fetcher({
160
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "health/rds"),
161
+ method: "GET",
162
+ headers: _headers,
163
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
+ 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,
165
+ 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,
166
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
168
+ logging: this._options.logging,
169
+ });
170
+ if (_response.ok) {
171
+ return {
172
+ data: {
173
+ ok: true,
174
+ body: _response.body,
175
+ headers: _response.headers,
176
+ rawResponse: _response.rawResponse,
177
+ },
178
+ rawResponse: _response.rawResponse,
179
+ };
180
+ }
181
+ return {
182
+ data: {
183
+ ok: false,
184
+ error: FernVenusApi.healthRdsHealthRdsGet.Error._unknown(_response.error),
185
+ rawResponse: _response.rawResponse,
186
+ },
187
+ rawResponse: _response.rawResponse,
188
+ };
189
+ });
190
+ }
138
191
  }
@@ -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.healthRdsHealthRdsGet.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.healthRdsHealthRdsGet.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.healthRdsHealthRdsGet.Error._Unknown;
18
+ readonly _visit: <_Result>(value: FernVenusApi.healthRdsHealthRdsGet.Error, visitor: FernVenusApi.healthRdsHealthRdsGet.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.healthRdsHealthRdsGet.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,2 +1,3 @@
1
1
  export * as healthHealthGet from "./healthHealthGet.mjs";
2
+ export * as healthRdsHealthRdsGet from "./healthRdsHealthRdsGet.mjs";
2
3
  export * as metricsMetricsGet from "./metricsMetricsGet.mjs";
@@ -1,2 +1,3 @@
1
1
  export * as healthHealthGet from "./healthHealthGet.mjs";
2
+ export * as healthRdsHealthRdsGet from "./healthRdsHealthRdsGet.mjs";
2
3
  export * as metricsMetricsGet from "./metricsMetricsGet.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.3.0";
1
+ export declare const SDK_VERSION = "5.4.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.3.0";
1
+ export const SDK_VERSION = "5.4.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/venus-api-sdk",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -91,6 +91,66 @@ 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">healthRdsHealthRdsGet</a>() -> core.APIResponse&lt;unknown, FernVenusApi.healthRdsHealthRdsGet.Error&gt;</code></summary>
99
+ <dl>
100
+ <dd>
101
+
102
+ #### 📝 Description
103
+
104
+ <dl>
105
+ <dd>
106
+
107
+ <dl>
108
+ <dd>
109
+
110
+ Post-flip smoke check: ping each configured RDS engine.
111
+
112
+ Returns 200 only if every configured RDS engine answers ``SELECT 1``;
113
+ 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.
116
+ </dd>
117
+ </dl>
118
+ </dd>
119
+ </dl>
120
+
121
+ #### 🔌 Usage
122
+
123
+ <dl>
124
+ <dd>
125
+
126
+ <dl>
127
+ <dd>
128
+
129
+ ```typescript
130
+ await client.healthRdsHealthRdsGet();
131
+
132
+ ```
133
+ </dd>
134
+ </dl>
135
+ </dd>
136
+ </dl>
137
+
138
+ #### ⚙️ Parameters
139
+
140
+ <dl>
141
+ <dd>
142
+
143
+ <dl>
144
+ <dd>
145
+
146
+ **requestOptions:** `FernVenusApiClient.RequestOptions`
147
+
148
+ </dd>
149
+ </dl>
150
+ </dd>
151
+ </dl>
152
+
153
+
94
154
  </dd>
95
155
  </dl>
96
156
  </details>