pgbeam 0.3.6 → 0.3.8
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.
- package/dist/index.cjs +31 -2
- package/dist/index.d.cts +440 -2
- package/dist/index.d.mts +440 -2
- package/dist/index.mjs +31 -2
- package/dist/operations.cjs +111 -17
- package/dist/operations.d.cts +381 -0
- package/dist/operations.d.mts +381 -0
- package/dist/operations.mjs +111 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -224,6 +224,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
224
224
|
listRegions: {
|
|
225
225
|
method: "GET",
|
|
226
226
|
path: "/v1/regions"
|
|
227
|
+
},
|
|
228
|
+
listSelfHostEnrollments: {
|
|
229
|
+
method: "GET",
|
|
230
|
+
path: "/v1/organizations/{org_id}/self-host-enrollments"
|
|
231
|
+
},
|
|
232
|
+
createSelfHostEnrollment: {
|
|
233
|
+
method: "POST",
|
|
234
|
+
path: "/v1/organizations/{org_id}/self-host-enrollments"
|
|
235
|
+
},
|
|
236
|
+
revokeSelfHostEnrollment: {
|
|
237
|
+
method: "DELETE",
|
|
238
|
+
path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}"
|
|
227
239
|
}
|
|
228
240
|
},
|
|
229
241
|
migrations: {
|
|
@@ -594,6 +606,21 @@ const operationsByPath = {
|
|
|
594
606
|
path: "/v1/databases/{database_id}/replicas/{replica_id}",
|
|
595
607
|
operationId: "deleteReplica"
|
|
596
608
|
},
|
|
609
|
+
"GET /v1/organizations/{org_id}/self-host-enrollments": {
|
|
610
|
+
method: "GET",
|
|
611
|
+
path: "/v1/organizations/{org_id}/self-host-enrollments",
|
|
612
|
+
operationId: "listSelfHostEnrollments"
|
|
613
|
+
},
|
|
614
|
+
"POST /v1/organizations/{org_id}/self-host-enrollments": {
|
|
615
|
+
method: "POST",
|
|
616
|
+
path: "/v1/organizations/{org_id}/self-host-enrollments",
|
|
617
|
+
operationId: "createSelfHostEnrollment"
|
|
618
|
+
},
|
|
619
|
+
"DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
|
|
620
|
+
method: "DELETE",
|
|
621
|
+
path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
|
|
622
|
+
operationId: "revokeSelfHostEnrollment"
|
|
623
|
+
},
|
|
597
624
|
"GET /v1/organizations/{org_id}/support/cases": {
|
|
598
625
|
method: "GET",
|
|
599
626
|
path: "/v1/organizations/{org_id}/support/cases",
|
|
@@ -819,13 +846,15 @@ async function parseResponseBody(response) {
|
|
|
819
846
|
if (contentType?.includes("application/json")) {
|
|
820
847
|
return response.json();
|
|
821
848
|
}
|
|
822
|
-
//
|
|
849
|
+
// Non-JSON body (e.g. text/csv from audit-log export). Parse opportunistically
|
|
850
|
+
// in case the server mislabels JSON, but fall back to the raw text so callers
|
|
851
|
+
// get the payload instead of undefined. Only an empty body is undefined.
|
|
823
852
|
const text = await response.text();
|
|
824
853
|
if (!text) return undefined;
|
|
825
854
|
try {
|
|
826
855
|
return JSON.parse(text);
|
|
827
856
|
} catch {
|
|
828
|
-
return
|
|
857
|
+
return text;
|
|
829
858
|
}
|
|
830
859
|
}
|
|
831
860
|
function sleep(ms) {
|