@neon/sdk 0.2.0 → 1.1.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.
- package/README.md +135 -5
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +2 -2
- package/dist/client/raw.gen.d.ts +4282 -0
- package/dist/client/raw.gen.d.ts.map +1 -0
- package/dist/client/raw.gen.js +170 -0
- package/dist/client/raw.gen.js.map +1 -0
- package/dist/client/sdk.gen.d.ts +252 -2
- package/dist/client/sdk.gen.d.ts.map +1 -1
- package/dist/client/sdk.gen.js +634 -1
- package/dist/client/sdk.gen.js.map +1 -1
- package/dist/client/types.gen.d.ts +2092 -1010
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/neon/client.d.ts +10 -0
- package/dist/neon/client.d.ts.map +1 -1
- package/dist/neon/client.js +10 -0
- package/dist/neon/client.js.map +1 -1
- package/dist/neon/client.test-d.js +17 -0
- package/dist/neon/client.test-d.js.map +1 -1
- package/dist/neon/coverage.d.ts.map +1 -1
- package/dist/neon/coverage.js +57 -0
- package/dist/neon/coverage.js.map +1 -1
- package/dist/neon/raw-wrap.d.ts +63 -0
- package/dist/neon/raw-wrap.d.ts.map +1 -0
- package/dist/neon/raw-wrap.js +47 -0
- package/dist/neon/raw-wrap.js.map +1 -0
- package/dist/neon/resources/ai-gateway.d.ts +16 -0
- package/dist/neon/resources/ai-gateway.d.ts.map +1 -0
- package/dist/neon/resources/ai-gateway.js +23 -0
- package/dist/neon/resources/ai-gateway.js.map +1 -0
- package/dist/neon/resources/auth.d.ts +81 -0
- package/dist/neon/resources/auth.d.ts.map +1 -0
- package/dist/neon/resources/auth.js +197 -0
- package/dist/neon/resources/auth.js.map +1 -0
- package/dist/neon/resources/branches.d.ts +7 -0
- package/dist/neon/resources/branches.d.ts.map +1 -1
- package/dist/neon/resources/branches.js +11 -1
- package/dist/neon/resources/branches.js.map +1 -1
- package/dist/neon/resources/bucket-objects.d.ts +33 -0
- package/dist/neon/resources/bucket-objects.d.ts.map +1 -0
- package/dist/neon/resources/bucket-objects.js +74 -0
- package/dist/neon/resources/bucket-objects.js.map +1 -0
- package/dist/neon/resources/buckets.d.ts +23 -0
- package/dist/neon/resources/buckets.d.ts.map +1 -0
- package/dist/neon/resources/buckets.js +45 -0
- package/dist/neon/resources/buckets.js.map +1 -0
- package/dist/neon/resources/credentials.d.ts +23 -0
- package/dist/neon/resources/credentials.d.ts.map +1 -0
- package/dist/neon/resources/credentials.js +45 -0
- package/dist/neon/resources/credentials.js.map +1 -0
- package/dist/neon/resources/endpoints.d.ts +3 -0
- package/dist/neon/resources/endpoints.d.ts.map +1 -1
- package/dist/neon/resources/endpoints.js +11 -1
- package/dist/neon/resources/endpoints.js.map +1 -1
- package/dist/neon/resources/functions.d.ts +30 -0
- package/dist/neon/resources/functions.d.ts.map +1 -0
- package/dist/neon/resources/functions.js +79 -0
- package/dist/neon/resources/functions.js.map +1 -0
- package/dist/neon/resources/projects.d.ts +26 -2
- package/dist/neon/resources/projects.d.ts.map +1 -1
- package/dist/neon/resources/projects.js +44 -2
- package/dist/neon/resources/projects.js.map +1 -1
- package/dist/neon/resources/snapshots.d.ts +16 -5
- package/dist/neon/resources/snapshots.d.ts.map +1 -1
- package/dist/neon/resources/snapshots.js +4 -1
- package/dist/neon/resources/snapshots.js.map +1 -1
- package/dist/neon/resources/storage.d.ts +24 -0
- package/dist/neon/resources/storage.d.ts.map +1 -0
- package/dist/neon/resources/storage.js +32 -0
- package/dist/neon/resources/storage.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js +4 -3
- package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/source-map.js +1 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +1 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +1 -1
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +1 -1
- package/dist/node_modules/.pnpm/vitest@3.0.9_@types_debug@4.1.13_@types_node@20.19.17_jiti@2.7.0_jsdom@26.1.0_lightning_fb7ae83398b95c49208c9194029bba02/node_modules/vitest/dist/index.js +2 -2
- package/dist/raw.d.ts +4 -3
- package/dist/raw.js +24 -3
- package/dist/raw.js.map +1 -1
- package/package.json +4 -4
package/dist/client/sdk.gen.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formDataBodySerializer } from "./core/bodySerializer.gen.js";
|
|
1
2
|
import { client } from "./client.gen.js";
|
|
2
3
|
//#region src/client/sdk.gen.ts
|
|
3
4
|
/**
|
|
@@ -2579,6 +2580,38 @@ const setDefaultProjectBranch = (options) => (options.client ?? client).post({
|
|
|
2579
2580
|
...options
|
|
2580
2581
|
});
|
|
2581
2582
|
/**
|
|
2583
|
+
* Recover a deleted branch
|
|
2584
|
+
*
|
|
2585
|
+
* Recovers a deleted branch within the 7-day deletion recovery period.
|
|
2586
|
+
* The branch must have been soft deleted and not yet permanently deleted.
|
|
2587
|
+
* Recovery restores the branch and its endpoints to an idle state.
|
|
2588
|
+
* Connection strings remain valid after recovery.
|
|
2589
|
+
* TTL branches become non-TTL branches after recovery.
|
|
2590
|
+
*
|
|
2591
|
+
* To list deleted branches available for recovery, use `GET /projects/{project_id}/branches?include_deleted=true`.
|
|
2592
|
+
*
|
|
2593
|
+
*/
|
|
2594
|
+
const recoverProjectBranch = (options) => (options.client ?? client).post({
|
|
2595
|
+
security: [
|
|
2596
|
+
{
|
|
2597
|
+
scheme: "bearer",
|
|
2598
|
+
type: "http"
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
in: "cookie",
|
|
2602
|
+
name: "zenith",
|
|
2603
|
+
type: "apiKey"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
in: "cookie",
|
|
2607
|
+
name: "keycloak_token",
|
|
2608
|
+
type: "apiKey"
|
|
2609
|
+
}
|
|
2610
|
+
],
|
|
2611
|
+
url: "/projects/{project_id}/branches/{branch_id}/recover",
|
|
2612
|
+
...options
|
|
2613
|
+
});
|
|
2614
|
+
/**
|
|
2582
2615
|
* Finalize branch restore from snapshot
|
|
2583
2616
|
*
|
|
2584
2617
|
* Finalize the restore operation for a branch created from a snapshot.
|
|
@@ -4016,6 +4049,9 @@ const getCurrentUserInfo = (options) => (options?.client ?? client).get({
|
|
|
4016
4049
|
*
|
|
4017
4050
|
* Retrieves the organizations that the currently authenticated user belongs to.
|
|
4018
4051
|
*
|
|
4052
|
+
* When called with an organization- or project-scoped API key (which is not
|
|
4053
|
+
* tied to a user), this returns the single organization that owns the key.
|
|
4054
|
+
*
|
|
4019
4055
|
*/
|
|
4020
4056
|
const getCurrentUserOrganizations = (options) => (options?.client ?? client).get({
|
|
4021
4057
|
security: [
|
|
@@ -4309,7 +4345,604 @@ const setSnapshotSchedule = (options) => (options.client ?? client).put({
|
|
|
4309
4345
|
...options.headers
|
|
4310
4346
|
}
|
|
4311
4347
|
});
|
|
4348
|
+
/**
|
|
4349
|
+
* List buckets on the branch
|
|
4350
|
+
*
|
|
4351
|
+
* Lists branchable object-storage buckets visible on the specified branch,
|
|
4352
|
+
* including those inherited from ancestor branches.
|
|
4353
|
+
*
|
|
4354
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4355
|
+
*
|
|
4356
|
+
*/
|
|
4357
|
+
const listProjectBranchBuckets = (options) => (options.client ?? client).get({
|
|
4358
|
+
security: [
|
|
4359
|
+
{
|
|
4360
|
+
scheme: "bearer",
|
|
4361
|
+
type: "http"
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
in: "cookie",
|
|
4365
|
+
name: "zenith",
|
|
4366
|
+
type: "apiKey"
|
|
4367
|
+
},
|
|
4368
|
+
{
|
|
4369
|
+
in: "cookie",
|
|
4370
|
+
name: "keycloak_token",
|
|
4371
|
+
type: "apiKey"
|
|
4372
|
+
}
|
|
4373
|
+
],
|
|
4374
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets",
|
|
4375
|
+
...options
|
|
4376
|
+
});
|
|
4377
|
+
/**
|
|
4378
|
+
* Create a bucket on the branch
|
|
4379
|
+
*
|
|
4380
|
+
* Creates a new branchable object-storage bucket on the specified branch.
|
|
4381
|
+
* Buckets are managed by the Neon Platform branchable-storage service.
|
|
4382
|
+
*
|
|
4383
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4384
|
+
*
|
|
4385
|
+
*/
|
|
4386
|
+
const createProjectBranchBucket = (options) => (options.client ?? client).post({
|
|
4387
|
+
security: [
|
|
4388
|
+
{
|
|
4389
|
+
scheme: "bearer",
|
|
4390
|
+
type: "http"
|
|
4391
|
+
},
|
|
4392
|
+
{
|
|
4393
|
+
in: "cookie",
|
|
4394
|
+
name: "zenith",
|
|
4395
|
+
type: "apiKey"
|
|
4396
|
+
},
|
|
4397
|
+
{
|
|
4398
|
+
in: "cookie",
|
|
4399
|
+
name: "keycloak_token",
|
|
4400
|
+
type: "apiKey"
|
|
4401
|
+
}
|
|
4402
|
+
],
|
|
4403
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets",
|
|
4404
|
+
...options,
|
|
4405
|
+
headers: {
|
|
4406
|
+
"Content-Type": "application/json",
|
|
4407
|
+
...options.headers
|
|
4408
|
+
}
|
|
4409
|
+
});
|
|
4410
|
+
/**
|
|
4411
|
+
* Delete a bucket on the branch
|
|
4412
|
+
*
|
|
4413
|
+
* Deletes the named bucket from the specified branch.
|
|
4414
|
+
*
|
|
4415
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4416
|
+
*
|
|
4417
|
+
*/
|
|
4418
|
+
const deleteProjectBranchBucket = (options) => (options.client ?? client).delete({
|
|
4419
|
+
security: [
|
|
4420
|
+
{
|
|
4421
|
+
scheme: "bearer",
|
|
4422
|
+
type: "http"
|
|
4423
|
+
},
|
|
4424
|
+
{
|
|
4425
|
+
in: "cookie",
|
|
4426
|
+
name: "zenith",
|
|
4427
|
+
type: "apiKey"
|
|
4428
|
+
},
|
|
4429
|
+
{
|
|
4430
|
+
in: "cookie",
|
|
4431
|
+
name: "keycloak_token",
|
|
4432
|
+
type: "apiKey"
|
|
4433
|
+
}
|
|
4434
|
+
],
|
|
4435
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}",
|
|
4436
|
+
...options
|
|
4437
|
+
});
|
|
4438
|
+
/**
|
|
4439
|
+
* Get branch storage state
|
|
4440
|
+
*
|
|
4441
|
+
* Returns whether branchable object-storage is usable for the specified
|
|
4442
|
+
* branch. A 200 response means the branch is registered in the storage
|
|
4443
|
+
* service and the S3 data plane will accept requests for it. A 404
|
|
4444
|
+
* response includes a `reason` field indicating why storage is unavailable.
|
|
4445
|
+
*
|
|
4446
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4447
|
+
*
|
|
4448
|
+
*/
|
|
4449
|
+
const getProjectBranchStorage = (options) => (options.client ?? client).get({
|
|
4450
|
+
security: [
|
|
4451
|
+
{
|
|
4452
|
+
scheme: "bearer",
|
|
4453
|
+
type: "http"
|
|
4454
|
+
},
|
|
4455
|
+
{
|
|
4456
|
+
in: "cookie",
|
|
4457
|
+
name: "zenith",
|
|
4458
|
+
type: "apiKey"
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
in: "cookie",
|
|
4462
|
+
name: "keycloak_token",
|
|
4463
|
+
type: "apiKey"
|
|
4464
|
+
}
|
|
4465
|
+
],
|
|
4466
|
+
url: "/projects/{project_id}/branches/{branch_id}/storage",
|
|
4467
|
+
...options
|
|
4468
|
+
});
|
|
4469
|
+
/**
|
|
4470
|
+
* Get branch AI Gateway endpoint
|
|
4471
|
+
*
|
|
4472
|
+
* Returns the AI Gateway endpoint host for the specified branch, used to
|
|
4473
|
+
* render code-snippet base URLs. A 200 response means the branch is
|
|
4474
|
+
* registered and this region serves the AI gateway. A 404 response
|
|
4475
|
+
* includes a `reason` field indicating why the gateway is unavailable.
|
|
4476
|
+
*
|
|
4477
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4478
|
+
*
|
|
4479
|
+
*/
|
|
4480
|
+
const getProjectBranchAiGateway = (options) => (options.client ?? client).get({
|
|
4481
|
+
security: [
|
|
4482
|
+
{
|
|
4483
|
+
scheme: "bearer",
|
|
4484
|
+
type: "http"
|
|
4485
|
+
},
|
|
4486
|
+
{
|
|
4487
|
+
in: "cookie",
|
|
4488
|
+
name: "zenith",
|
|
4489
|
+
type: "apiKey"
|
|
4490
|
+
},
|
|
4491
|
+
{
|
|
4492
|
+
in: "cookie",
|
|
4493
|
+
name: "keycloak_token",
|
|
4494
|
+
type: "apiKey"
|
|
4495
|
+
}
|
|
4496
|
+
],
|
|
4497
|
+
url: "/projects/{project_id}/branches/{branch_id}/ai_gateway",
|
|
4498
|
+
...options
|
|
4499
|
+
});
|
|
4500
|
+
/**
|
|
4501
|
+
* List objects in a bucket
|
|
4502
|
+
*
|
|
4503
|
+
* Lists objects visible in the named bucket on the specified branch,
|
|
4504
|
+
* including those inherited from ancestor branches. Listing is served by
|
|
4505
|
+
* the user's session (no customer S3 credentials required).
|
|
4506
|
+
*
|
|
4507
|
+
* When `delimiter` is supplied (typically `/`), keys are collapsed into
|
|
4508
|
+
* common prefixes (`folders`) so callers can render a folder-style
|
|
4509
|
+
* browser; keys that do not contain the delimiter after `prefix` are
|
|
4510
|
+
* returned as `objects`.
|
|
4511
|
+
*
|
|
4512
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4513
|
+
*
|
|
4514
|
+
*/
|
|
4515
|
+
const listProjectBranchBucketObjects = (options) => (options.client ?? client).get({
|
|
4516
|
+
security: [
|
|
4517
|
+
{
|
|
4518
|
+
scheme: "bearer",
|
|
4519
|
+
type: "http"
|
|
4520
|
+
},
|
|
4521
|
+
{
|
|
4522
|
+
in: "cookie",
|
|
4523
|
+
name: "zenith",
|
|
4524
|
+
type: "apiKey"
|
|
4525
|
+
},
|
|
4526
|
+
{
|
|
4527
|
+
in: "cookie",
|
|
4528
|
+
name: "keycloak_token",
|
|
4529
|
+
type: "apiKey"
|
|
4530
|
+
}
|
|
4531
|
+
],
|
|
4532
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects",
|
|
4533
|
+
...options
|
|
4534
|
+
});
|
|
4535
|
+
/**
|
|
4536
|
+
* Delete an object in a bucket
|
|
4537
|
+
*
|
|
4538
|
+
* Deletes the named object from the bucket on the specified branch.
|
|
4539
|
+
* Served by the user's session (no customer S3 credentials required).
|
|
4540
|
+
*
|
|
4541
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4542
|
+
*
|
|
4543
|
+
*/
|
|
4544
|
+
const deleteProjectBranchBucketObject = (options) => (options.client ?? client).delete({
|
|
4545
|
+
security: [
|
|
4546
|
+
{
|
|
4547
|
+
scheme: "bearer",
|
|
4548
|
+
type: "http"
|
|
4549
|
+
},
|
|
4550
|
+
{
|
|
4551
|
+
in: "cookie",
|
|
4552
|
+
name: "zenith",
|
|
4553
|
+
type: "apiKey"
|
|
4554
|
+
},
|
|
4555
|
+
{
|
|
4556
|
+
in: "cookie",
|
|
4557
|
+
name: "keycloak_token",
|
|
4558
|
+
type: "apiKey"
|
|
4559
|
+
}
|
|
4560
|
+
],
|
|
4561
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}",
|
|
4562
|
+
...options
|
|
4563
|
+
});
|
|
4564
|
+
/**
|
|
4565
|
+
* Download an object's bytes
|
|
4566
|
+
*
|
|
4567
|
+
* Streams the raw bytes of the named object from the bucket on the
|
|
4568
|
+
* specified branch, including objects inherited from ancestor branches.
|
|
4569
|
+
* Served by the user's session (no customer S3 credentials required).
|
|
4570
|
+
*
|
|
4571
|
+
* The body is returned as `application/octet-stream` so a browser treats
|
|
4572
|
+
* it as a download; the `Content-Length` and `ETag` response headers echo
|
|
4573
|
+
* the stored object metadata.
|
|
4574
|
+
*
|
|
4575
|
+
* BINARY-STREAM EXCEPTION TO THE BUILD-GENERATED-TYPES RULE (#7029): the
|
|
4576
|
+
* successful 200 body is the raw object stream, proxied verbatim from the
|
|
4577
|
+
* platform storage admin endpoint. It is modeled as an
|
|
4578
|
+
* `application/octet-stream` binary body (not a JSON response schema) and
|
|
4579
|
+
* is streamed without buffering the whole object in memory. Error
|
|
4580
|
+
* responses still use the generated `GeneralError` shape.
|
|
4581
|
+
*
|
|
4582
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4583
|
+
*
|
|
4584
|
+
*/
|
|
4585
|
+
const getProjectBranchBucketObject = (options) => (options.client ?? client).get({
|
|
4586
|
+
security: [
|
|
4587
|
+
{
|
|
4588
|
+
scheme: "bearer",
|
|
4589
|
+
type: "http"
|
|
4590
|
+
},
|
|
4591
|
+
{
|
|
4592
|
+
in: "cookie",
|
|
4593
|
+
name: "zenith",
|
|
4594
|
+
type: "apiKey"
|
|
4595
|
+
},
|
|
4596
|
+
{
|
|
4597
|
+
in: "cookie",
|
|
4598
|
+
name: "keycloak_token",
|
|
4599
|
+
type: "apiKey"
|
|
4600
|
+
}
|
|
4601
|
+
],
|
|
4602
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download",
|
|
4603
|
+
...options
|
|
4604
|
+
});
|
|
4605
|
+
/**
|
|
4606
|
+
* Delete every object under a key prefix (folder) in a bucket
|
|
4607
|
+
*
|
|
4608
|
+
* Soft-deletes every object on the specified branch whose key starts with
|
|
4609
|
+
* `prefix`, in a single call. Intended to back a "delete folder" action in
|
|
4610
|
+
* an object browser: a `prefix` of `app/avatars/` removes every object
|
|
4611
|
+
* beneath that folder. Served by the user's session (no customer S3
|
|
4612
|
+
* credentials required).
|
|
4613
|
+
*
|
|
4614
|
+
* `prefix` must be non-empty, end with `/`, be at most 1024 bytes, and
|
|
4615
|
+
* contain no control characters - a partial-segment prefix cannot
|
|
4616
|
+
* accidentally delete sibling keys. Returns the number of objects
|
|
4617
|
+
* soft-deleted (`deleted`), which may be 0 when no live object matched the
|
|
4618
|
+
* prefix on this branch.
|
|
4619
|
+
*
|
|
4620
|
+
* Only objects physically present on this branch are tombstoned; objects
|
|
4621
|
+
* inherited from an ancestor branch via copy-on-write (not materialized on
|
|
4622
|
+
* this branch) are out of scope.
|
|
4623
|
+
*
|
|
4624
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4625
|
+
*
|
|
4626
|
+
*/
|
|
4627
|
+
const deleteProjectBranchBucketObjectsByPrefix = (options) => (options.client ?? client).delete({
|
|
4628
|
+
security: [
|
|
4629
|
+
{
|
|
4630
|
+
scheme: "bearer",
|
|
4631
|
+
type: "http"
|
|
4632
|
+
},
|
|
4633
|
+
{
|
|
4634
|
+
in: "cookie",
|
|
4635
|
+
name: "zenith",
|
|
4636
|
+
type: "apiKey"
|
|
4637
|
+
},
|
|
4638
|
+
{
|
|
4639
|
+
in: "cookie",
|
|
4640
|
+
name: "keycloak_token",
|
|
4641
|
+
type: "apiKey"
|
|
4642
|
+
}
|
|
4643
|
+
],
|
|
4644
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix",
|
|
4645
|
+
...options
|
|
4646
|
+
});
|
|
4647
|
+
/**
|
|
4648
|
+
* Presign an upload or download for an object in a bucket
|
|
4649
|
+
*
|
|
4650
|
+
* Returns a presigned URL that transfers bytes directly to or from the
|
|
4651
|
+
* object's bucket on the specified branch, without the caller ever
|
|
4652
|
+
* handling S3 credentials. The `operation` field selects the direction:
|
|
4653
|
+
*
|
|
4654
|
+
* - `upload` returns a presigned `PUT` URL (the caller `PUT`s the file
|
|
4655
|
+
* bytes straight to `url` with the returned `headers`). Authorized with
|
|
4656
|
+
* project write access.
|
|
4657
|
+
* - `download` returns a presigned `GET` URL (the caller `GET`s the
|
|
4658
|
+
* bytes straight from `url`). Authorized with project read access.
|
|
4659
|
+
*
|
|
4660
|
+
* The platform mints a short-lived credential and builds the SigV4-signed
|
|
4661
|
+
* URL against the branch's S3 data-plane host, returning it together with
|
|
4662
|
+
* the HTTP method, any headers the caller must echo, and the URL's expiry.
|
|
4663
|
+
*
|
|
4664
|
+
* Served by the user's session (no customer S3 credentials required).
|
|
4665
|
+
*
|
|
4666
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4667
|
+
*
|
|
4668
|
+
*/
|
|
4669
|
+
const presignProjectBranchBucketObject = (options) => (options.client ?? client).post({
|
|
4670
|
+
security: [
|
|
4671
|
+
{
|
|
4672
|
+
scheme: "bearer",
|
|
4673
|
+
type: "http"
|
|
4674
|
+
},
|
|
4675
|
+
{
|
|
4676
|
+
in: "cookie",
|
|
4677
|
+
name: "zenith",
|
|
4678
|
+
type: "apiKey"
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
in: "cookie",
|
|
4682
|
+
name: "keycloak_token",
|
|
4683
|
+
type: "apiKey"
|
|
4684
|
+
}
|
|
4685
|
+
],
|
|
4686
|
+
url: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign",
|
|
4687
|
+
...options,
|
|
4688
|
+
headers: {
|
|
4689
|
+
"Content-Type": "application/json",
|
|
4690
|
+
...options.headers
|
|
4691
|
+
}
|
|
4692
|
+
});
|
|
4693
|
+
/**
|
|
4694
|
+
* List credentials on the branch
|
|
4695
|
+
*
|
|
4696
|
+
* Returns metadata for customer-issued credentials on the branch.
|
|
4697
|
+
* Secrets are never included.
|
|
4698
|
+
*
|
|
4699
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4700
|
+
*
|
|
4701
|
+
*/
|
|
4702
|
+
const listCredentials = (options) => (options.client ?? client).get({
|
|
4703
|
+
security: [
|
|
4704
|
+
{
|
|
4705
|
+
scheme: "bearer",
|
|
4706
|
+
type: "http"
|
|
4707
|
+
},
|
|
4708
|
+
{
|
|
4709
|
+
in: "cookie",
|
|
4710
|
+
name: "zenith",
|
|
4711
|
+
type: "apiKey"
|
|
4712
|
+
},
|
|
4713
|
+
{
|
|
4714
|
+
in: "cookie",
|
|
4715
|
+
name: "keycloak_token",
|
|
4716
|
+
type: "apiKey"
|
|
4717
|
+
}
|
|
4718
|
+
],
|
|
4719
|
+
url: "/projects/{project_id}/branches/{branch_id}/credentials",
|
|
4720
|
+
...options
|
|
4721
|
+
});
|
|
4722
|
+
/**
|
|
4723
|
+
* Issue a scoped credential on the branch
|
|
4724
|
+
*
|
|
4725
|
+
* Issues a new scoped service credential anchored to the specified
|
|
4726
|
+
* branch. The response carries `api_token` and `s3_secret_access_key`
|
|
4727
|
+
* exactly once — they are not stored server-side.
|
|
4728
|
+
*
|
|
4729
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4730
|
+
*
|
|
4731
|
+
*/
|
|
4732
|
+
const createCredential = (options) => (options.client ?? client).post({
|
|
4733
|
+
security: [
|
|
4734
|
+
{
|
|
4735
|
+
scheme: "bearer",
|
|
4736
|
+
type: "http"
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
in: "cookie",
|
|
4740
|
+
name: "zenith",
|
|
4741
|
+
type: "apiKey"
|
|
4742
|
+
},
|
|
4743
|
+
{
|
|
4744
|
+
in: "cookie",
|
|
4745
|
+
name: "keycloak_token",
|
|
4746
|
+
type: "apiKey"
|
|
4747
|
+
}
|
|
4748
|
+
],
|
|
4749
|
+
url: "/projects/{project_id}/branches/{branch_id}/credentials",
|
|
4750
|
+
...options,
|
|
4751
|
+
headers: {
|
|
4752
|
+
"Content-Type": "application/json",
|
|
4753
|
+
...options.headers
|
|
4754
|
+
}
|
|
4755
|
+
});
|
|
4756
|
+
/**
|
|
4757
|
+
* Revoke a credential
|
|
4758
|
+
*
|
|
4759
|
+
* Soft-deletes the credential. Idempotent.
|
|
4760
|
+
*
|
|
4761
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4762
|
+
*
|
|
4763
|
+
*/
|
|
4764
|
+
const revokeCredential = (options) => (options.client ?? client).delete({
|
|
4765
|
+
security: [
|
|
4766
|
+
{
|
|
4767
|
+
scheme: "bearer",
|
|
4768
|
+
type: "http"
|
|
4769
|
+
},
|
|
4770
|
+
{
|
|
4771
|
+
in: "cookie",
|
|
4772
|
+
name: "zenith",
|
|
4773
|
+
type: "apiKey"
|
|
4774
|
+
},
|
|
4775
|
+
{
|
|
4776
|
+
in: "cookie",
|
|
4777
|
+
name: "keycloak_token",
|
|
4778
|
+
type: "apiKey"
|
|
4779
|
+
}
|
|
4780
|
+
],
|
|
4781
|
+
url: "/projects/{project_id}/branches/{branch_id}/credentials/{token_id}",
|
|
4782
|
+
...options
|
|
4783
|
+
});
|
|
4784
|
+
/**
|
|
4785
|
+
* List functions on the branch
|
|
4786
|
+
*
|
|
4787
|
+
* Lists functions on the specified branch.
|
|
4788
|
+
*
|
|
4789
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4790
|
+
*
|
|
4791
|
+
*/
|
|
4792
|
+
const listProjectBranchFunctions = (options) => (options.client ?? client).get({
|
|
4793
|
+
security: [
|
|
4794
|
+
{
|
|
4795
|
+
scheme: "bearer",
|
|
4796
|
+
type: "http"
|
|
4797
|
+
},
|
|
4798
|
+
{
|
|
4799
|
+
in: "cookie",
|
|
4800
|
+
name: "zenith",
|
|
4801
|
+
type: "apiKey"
|
|
4802
|
+
},
|
|
4803
|
+
{
|
|
4804
|
+
in: "cookie",
|
|
4805
|
+
name: "keycloak_token",
|
|
4806
|
+
type: "apiKey"
|
|
4807
|
+
}
|
|
4808
|
+
],
|
|
4809
|
+
url: "/projects/{project_id}/branches/{branch_id}/functions",
|
|
4810
|
+
...options
|
|
4811
|
+
});
|
|
4812
|
+
/**
|
|
4813
|
+
* Delete a function on the branch
|
|
4814
|
+
*
|
|
4815
|
+
* Deletes the function identified by its slug.
|
|
4816
|
+
*
|
|
4817
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4818
|
+
*
|
|
4819
|
+
*/
|
|
4820
|
+
const deleteProjectBranchFunction = (options) => (options.client ?? client).delete({
|
|
4821
|
+
security: [
|
|
4822
|
+
{
|
|
4823
|
+
scheme: "bearer",
|
|
4824
|
+
type: "http"
|
|
4825
|
+
},
|
|
4826
|
+
{
|
|
4827
|
+
in: "cookie",
|
|
4828
|
+
name: "zenith",
|
|
4829
|
+
type: "apiKey"
|
|
4830
|
+
},
|
|
4831
|
+
{
|
|
4832
|
+
in: "cookie",
|
|
4833
|
+
name: "keycloak_token",
|
|
4834
|
+
type: "apiKey"
|
|
4835
|
+
}
|
|
4836
|
+
],
|
|
4837
|
+
url: "/projects/{project_id}/branches/{branch_id}/functions/{slug}",
|
|
4838
|
+
...options
|
|
4839
|
+
});
|
|
4840
|
+
/**
|
|
4841
|
+
* Get function details
|
|
4842
|
+
*
|
|
4843
|
+
* Returns the function identified by its slug.
|
|
4844
|
+
*
|
|
4845
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4846
|
+
*
|
|
4847
|
+
*/
|
|
4848
|
+
const getProjectBranchFunction = (options) => (options.client ?? client).get({
|
|
4849
|
+
security: [
|
|
4850
|
+
{
|
|
4851
|
+
scheme: "bearer",
|
|
4852
|
+
type: "http"
|
|
4853
|
+
},
|
|
4854
|
+
{
|
|
4855
|
+
in: "cookie",
|
|
4856
|
+
name: "zenith",
|
|
4857
|
+
type: "apiKey"
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
in: "cookie",
|
|
4861
|
+
name: "keycloak_token",
|
|
4862
|
+
type: "apiKey"
|
|
4863
|
+
}
|
|
4864
|
+
],
|
|
4865
|
+
url: "/projects/{project_id}/branches/{branch_id}/functions/{slug}",
|
|
4866
|
+
...options
|
|
4867
|
+
});
|
|
4868
|
+
/**
|
|
4869
|
+
* Update a function
|
|
4870
|
+
*
|
|
4871
|
+
* Updates the function's mutable metadata — currently only the display
|
|
4872
|
+
* `name`. A string sets the display name; `null` clears it, after which
|
|
4873
|
+
* the function's `name` falls back to its slug. Leading and trailing
|
|
4874
|
+
* whitespace is trimmed; a whitespace-only name is rejected. Acts only
|
|
4875
|
+
* on a function owned by the branch: a slug that is only inherited from
|
|
4876
|
+
* an ancestor branch returns 404 — rename it on the branch that owns
|
|
4877
|
+
* it. Like every other change on a branch, a rename is isolated per
|
|
4878
|
+
* branch: a branch forked before the rename keeps the name it had at
|
|
4879
|
+
* fork time.
|
|
4880
|
+
*
|
|
4881
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4882
|
+
*
|
|
4883
|
+
*/
|
|
4884
|
+
const updateProjectBranchFunction = (options) => (options.client ?? client).patch({
|
|
4885
|
+
security: [
|
|
4886
|
+
{
|
|
4887
|
+
scheme: "bearer",
|
|
4888
|
+
type: "http"
|
|
4889
|
+
},
|
|
4890
|
+
{
|
|
4891
|
+
in: "cookie",
|
|
4892
|
+
name: "zenith",
|
|
4893
|
+
type: "apiKey"
|
|
4894
|
+
},
|
|
4895
|
+
{
|
|
4896
|
+
in: "cookie",
|
|
4897
|
+
name: "keycloak_token",
|
|
4898
|
+
type: "apiKey"
|
|
4899
|
+
}
|
|
4900
|
+
],
|
|
4901
|
+
url: "/projects/{project_id}/branches/{branch_id}/functions/{slug}",
|
|
4902
|
+
...options,
|
|
4903
|
+
headers: {
|
|
4904
|
+
"Content-Type": "application/json",
|
|
4905
|
+
...options.headers
|
|
4906
|
+
}
|
|
4907
|
+
});
|
|
4908
|
+
/**
|
|
4909
|
+
* Deploy code to a function
|
|
4910
|
+
*
|
|
4911
|
+
* Creates a deployment for the function. Supply any subset of zip,
|
|
4912
|
+
* environment, and runtime; omitted fields inherit the
|
|
4913
|
+
* function's latest version. At least one field must be supplied. The
|
|
4914
|
+
* first deployment of a function must include zip. The newest deployment
|
|
4915
|
+
* becomes active.
|
|
4916
|
+
*
|
|
4917
|
+
* **Note**: This endpoint is currently in Private Beta.
|
|
4918
|
+
*
|
|
4919
|
+
*/
|
|
4920
|
+
const createProjectBranchFunctionDeployment = (options) => (options.client ?? client).post({
|
|
4921
|
+
...formDataBodySerializer,
|
|
4922
|
+
security: [
|
|
4923
|
+
{
|
|
4924
|
+
scheme: "bearer",
|
|
4925
|
+
type: "http"
|
|
4926
|
+
},
|
|
4927
|
+
{
|
|
4928
|
+
in: "cookie",
|
|
4929
|
+
name: "zenith",
|
|
4930
|
+
type: "apiKey"
|
|
4931
|
+
},
|
|
4932
|
+
{
|
|
4933
|
+
in: "cookie",
|
|
4934
|
+
name: "keycloak_token",
|
|
4935
|
+
type: "apiKey"
|
|
4936
|
+
}
|
|
4937
|
+
],
|
|
4938
|
+
url: "/projects/{project_id}/branches/{branch_id}/functions/{slug}/deployments",
|
|
4939
|
+
...options,
|
|
4940
|
+
headers: {
|
|
4941
|
+
"Content-Type": null,
|
|
4942
|
+
...options.headers
|
|
4943
|
+
}
|
|
4944
|
+
});
|
|
4312
4945
|
//#endregion
|
|
4313
|
-
export { acceptProjectTransferRequest, addBranchNeonAuthOauthProvider, addBranchNeonAuthTrustedDomain, addNeonAuthDomainToRedirectUriWhitelist, addNeonAuthOauthProvider, addProjectJwks, assignOrganizationVpcEndpoint, assignProjectVpcEndpoint, countProjectBranches, createApiKey, createBranchNeonAuthNewUser, createNeonAuth, createNeonAuthIntegration, createNeonAuthNewUser, createNeonAuthProviderSdkKeys, createOrgApiKey, createOrganizationInvitations, createProject, createProjectBranch, createProjectBranchAnonymized, createProjectBranchDataApi, createProjectBranchDatabase, createProjectBranchRole, createProjectEndpoint, createProjectTransferRequest, createSnapshot, deleteBranchNeonAuthOauthProvider, deleteBranchNeonAuthTrustedDomain, deleteBranchNeonAuthUser, deleteNeonAuthDomainFromRedirectUriWhitelist, deleteNeonAuthIntegration, deleteNeonAuthOauthProvider, deleteNeonAuthUser, deleteOrganizationSpendingLimit, deleteOrganizationVpcEndpoint, deleteProject, deleteProjectBranch, deleteProjectBranchDataApi, deleteProjectBranchDatabase, deleteProjectBranchRole, deleteProjectEndpoint, deleteProjectJwks, deleteProjectVpcEndpoint, deleteSnapshot, disableNeonAuth, finalizeRestoreBranch, getActiveRegions, getAnonymizedBranchStatus, getAuthDetails, getAvailablePreloadLibraries, getConnectionUri, getConsumptionHistoryPerBranchV2, getConsumptionHistoryPerProject, getConsumptionHistoryPerProjectV2, getCurrentUserInfo, getCurrentUserOrganizations, getMaskingRules, getNeonAuth, getNeonAuthAllowLocalhost, getNeonAuthEmailAndPasswordConfig, getNeonAuthEmailProvider, getNeonAuthEmailServer, getNeonAuthPhoneNumberPlugin, getNeonAuthPluginConfigs, getNeonAuthWebhookConfig, getOrganization, getOrganizationInvitations, getOrganizationMember, getOrganizationMembers, getOrganizationSpendingLimit, getOrganizationVpcEndpointDetails, getProject, getProjectAdvisorSecurityIssues, getProjectBranch, getProjectBranchDataApi, getProjectBranchDatabase, getProjectBranchRole, getProjectBranchRolePassword, getProjectBranchSchema, getProjectBranchSchemaComparison, getProjectEndpoint, getProjectJwks, getProjectOperation, getSnapshotSchedule, grantPermissionToProject, listApiKeys, listBranchNeonAuthOauthProviders, listBranchNeonAuthTrustedDomains, listNeonAuthIntegrations, listNeonAuthOauthProviders, listNeonAuthRedirectUriWhitelistDomains, listOrgApiKeys, listOrganizationVpcEndpoints, listOrganizationVpcEndpointsAllRegions, listProjectBranchDatabases, listProjectBranchEndpoints, listProjectBranchRoles, listProjectBranches, listProjectEndpoints, listProjectOperations, listProjectPermissions, listProjectVpcEndpoints, listProjects, listSharedProjects, listSnapshots, recoverProject, removeOrganizationMember, resetProjectBranchRolePassword, restartProjectEndpoint, restoreProjectBranch, restoreSnapshot, revokeApiKey, revokeOrgApiKey, revokePermissionFromProject, sendNeonAuthTestEmail, setDefaultProjectBranch, setOrganizationSpendingLimit, setSnapshotSchedule, startAnonymization, startProjectEndpoint, suspendProjectEndpoint, transferNeonAuthProviderProject, transferProjectsFromOrgToOrg, transferProjectsFromUserToOrg, updateBranchNeonAuthOauthProvider, updateMaskingRules, updateNeonAuthAllowLocalhost, updateNeonAuthConfig, updateNeonAuthEmailAndPasswordConfig, updateNeonAuthEmailProvider, updateNeonAuthEmailServer, updateNeonAuthMagicLinkPlugin, updateNeonAuthOauthProvider, updateNeonAuthOrganizationPlugin, updateNeonAuthPhoneNumberPlugin, updateNeonAuthUserRole, updateNeonAuthWebhookConfig, updateOrganizationMember, updateProject, updateProjectBranch, updateProjectBranchDataApi, updateProjectBranchDatabase, updateProjectEndpoint, updateSnapshot };
|
|
4946
|
+
export { acceptProjectTransferRequest, addBranchNeonAuthOauthProvider, addBranchNeonAuthTrustedDomain, addNeonAuthDomainToRedirectUriWhitelist, addNeonAuthOauthProvider, addProjectJwks, assignOrganizationVpcEndpoint, assignProjectVpcEndpoint, countProjectBranches, createApiKey, createBranchNeonAuthNewUser, createCredential, createNeonAuth, createNeonAuthIntegration, createNeonAuthNewUser, createNeonAuthProviderSdkKeys, createOrgApiKey, createOrganizationInvitations, createProject, createProjectBranch, createProjectBranchAnonymized, createProjectBranchBucket, createProjectBranchDataApi, createProjectBranchDatabase, createProjectBranchFunctionDeployment, createProjectBranchRole, createProjectEndpoint, createProjectTransferRequest, createSnapshot, deleteBranchNeonAuthOauthProvider, deleteBranchNeonAuthTrustedDomain, deleteBranchNeonAuthUser, deleteNeonAuthDomainFromRedirectUriWhitelist, deleteNeonAuthIntegration, deleteNeonAuthOauthProvider, deleteNeonAuthUser, deleteOrganizationSpendingLimit, deleteOrganizationVpcEndpoint, deleteProject, deleteProjectBranch, deleteProjectBranchBucket, deleteProjectBranchBucketObject, deleteProjectBranchBucketObjectsByPrefix, deleteProjectBranchDataApi, deleteProjectBranchDatabase, deleteProjectBranchFunction, deleteProjectBranchRole, deleteProjectEndpoint, deleteProjectJwks, deleteProjectVpcEndpoint, deleteSnapshot, disableNeonAuth, finalizeRestoreBranch, getActiveRegions, getAnonymizedBranchStatus, getAuthDetails, getAvailablePreloadLibraries, getConnectionUri, getConsumptionHistoryPerBranchV2, getConsumptionHistoryPerProject, getConsumptionHistoryPerProjectV2, getCurrentUserInfo, getCurrentUserOrganizations, getMaskingRules, getNeonAuth, getNeonAuthAllowLocalhost, getNeonAuthEmailAndPasswordConfig, getNeonAuthEmailProvider, getNeonAuthEmailServer, getNeonAuthPhoneNumberPlugin, getNeonAuthPluginConfigs, getNeonAuthWebhookConfig, getOrganization, getOrganizationInvitations, getOrganizationMember, getOrganizationMembers, getOrganizationSpendingLimit, getOrganizationVpcEndpointDetails, getProject, getProjectAdvisorSecurityIssues, getProjectBranch, getProjectBranchAiGateway, getProjectBranchBucketObject, getProjectBranchDataApi, getProjectBranchDatabase, getProjectBranchFunction, getProjectBranchRole, getProjectBranchRolePassword, getProjectBranchSchema, getProjectBranchSchemaComparison, getProjectBranchStorage, getProjectEndpoint, getProjectJwks, getProjectOperation, getSnapshotSchedule, grantPermissionToProject, listApiKeys, listBranchNeonAuthOauthProviders, listBranchNeonAuthTrustedDomains, listCredentials, listNeonAuthIntegrations, listNeonAuthOauthProviders, listNeonAuthRedirectUriWhitelistDomains, listOrgApiKeys, listOrganizationVpcEndpoints, listOrganizationVpcEndpointsAllRegions, listProjectBranchBucketObjects, listProjectBranchBuckets, listProjectBranchDatabases, listProjectBranchEndpoints, listProjectBranchFunctions, listProjectBranchRoles, listProjectBranches, listProjectEndpoints, listProjectOperations, listProjectPermissions, listProjectVpcEndpoints, listProjects, listSharedProjects, listSnapshots, presignProjectBranchBucketObject, recoverProject, recoverProjectBranch, removeOrganizationMember, resetProjectBranchRolePassword, restartProjectEndpoint, restoreProjectBranch, restoreSnapshot, revokeApiKey, revokeCredential, revokeOrgApiKey, revokePermissionFromProject, sendNeonAuthTestEmail, setDefaultProjectBranch, setOrganizationSpendingLimit, setSnapshotSchedule, startAnonymization, startProjectEndpoint, suspendProjectEndpoint, transferNeonAuthProviderProject, transferProjectsFromOrgToOrg, transferProjectsFromUserToOrg, updateBranchNeonAuthOauthProvider, updateMaskingRules, updateNeonAuthAllowLocalhost, updateNeonAuthConfig, updateNeonAuthEmailAndPasswordConfig, updateNeonAuthEmailProvider, updateNeonAuthEmailServer, updateNeonAuthMagicLinkPlugin, updateNeonAuthOauthProvider, updateNeonAuthOrganizationPlugin, updateNeonAuthPhoneNumberPlugin, updateNeonAuthUserRole, updateNeonAuthWebhookConfig, updateOrganizationMember, updateProject, updateProjectBranch, updateProjectBranchDataApi, updateProjectBranchDatabase, updateProjectBranchFunction, updateProjectEndpoint, updateSnapshot };
|
|
4314
4947
|
|
|
4315
4948
|
//# sourceMappingURL=sdk.gen.js.map
|