@sylphx/sdk 0.32.1 → 0.32.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.
- package/README.md +105 -0
- package/dist/access.d.ts +16 -1
- package/dist/access.js +1 -1
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +463 -25
- package/dist/agents.js +276 -5
- package/dist/agents.js.map +1 -1
- package/dist/ai.js +1 -1
- package/dist/ai.js.map +1 -1
- package/dist/analytics.d.ts +232 -0
- package/dist/analytics.js +126 -0
- package/dist/analytics.js.map +1 -0
- package/dist/artifacts.d.ts +47 -1
- package/dist/artifacts.js +30 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/assets.js +1 -1
- package/dist/assets.js.map +1 -1
- package/dist/auth/client.d.ts +34 -3
- package/dist/auth/client.js +42 -5
- package/dist/auth/client.js.map +1 -1
- package/dist/auth/continue-mock.d.ts +21 -0
- package/dist/auth/continue-mock.js +75 -0
- package/dist/auth/continue-mock.js.map +1 -0
- package/dist/auth/end-user-keys-mock.js +1 -1
- package/dist/auth/end-user-keys-mock.js.map +1 -1
- package/dist/auth/end-user-keys.js +1 -1
- package/dist/auth/end-user-keys.js.map +1 -1
- package/dist/auth/verify.js +1 -1
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +169 -0
- package/dist/auth.js +135 -1
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +13 -6
- package/dist/billing.js +3 -1
- package/dist/billing.js.map +1 -1
- package/dist/broker.d.ts +165 -33
- package/dist/broker.js +103 -7
- package/dist/broker.js.map +1 -1
- package/dist/browser-upload.d.ts +101 -0
- package/dist/browser-upload.js +130 -0
- package/dist/browser-upload.js.map +1 -0
- package/dist/build.js +1 -1
- package/dist/build.js.map +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/common.js.map +1 -1
- package/dist/config/flags.d.ts +12 -2
- package/dist/config/flags.js +54 -6
- package/dist/config/flags.js.map +1 -1
- package/dist/config.d.ts +24 -0
- package/dist/config.js +22 -1
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +128 -25
- package/dist/connections.js +72 -25
- package/dist/connections.js.map +1 -1
- package/dist/data.d.ts +306 -13
- package/dist/data.js +110 -9
- package/dist/data.js.map +1 -1
- package/dist/entitlement.js +1 -1
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.js +1 -1
- package/dist/events/realtime.js.map +1 -1
- package/dist/events/webhooks.js +1 -1
- package/dist/events/webhooks.js.map +1 -1
- package/dist/events.d.ts +36 -0
- package/dist/events.js +29 -1
- package/dist/events.js.map +1 -1
- package/dist/flags.d.ts +2 -0
- package/dist/flags.js +5 -1
- package/dist/flags.js.map +1 -1
- package/dist/hosting.js +1 -1
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +40 -0
- package/dist/ids.js +9 -1
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.js +1 -1
- package/dist/keys.js.map +1 -1
- package/dist/knowledge.d.ts +32 -9
- package/dist/knowledge.js +21 -11
- package/dist/knowledge.js.map +1 -1
- package/dist/localization.js +1 -1
- package/dist/localization.js.map +1 -1
- package/dist/methods.js +408 -8
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +263 -7
- package/dist/money.js +121 -7
- package/dist/money.js.map +1 -1
- package/dist/network.js +1 -1
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +340 -0
- package/dist/notify.js +304 -1
- package/dist/notify.js.map +1 -1
- package/dist/observability.js +1 -1
- package/dist/observability.js.map +1 -1
- package/dist/realtime.js +1 -1
- package/dist/realtime.js.map +1 -1
- package/dist/release.js +1 -1
- package/dist/release.js.map +1 -1
- package/dist/runners.js +1 -1
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.js +54 -1
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes/stream-mock.d.ts +124 -0
- package/dist/sandboxes/stream-mock.js +476 -0
- package/dist/sandboxes/stream-mock.js.map +1 -0
- package/dist/sandboxes/stream.d.ts +407 -0
- package/dist/sandboxes/stream.js +335 -0
- package/dist/sandboxes/stream.js.map +1 -0
- package/dist/sandboxes.d.ts +94 -17
- package/dist/sandboxes.js +33 -4
- package/dist/sandboxes.js.map +1 -1
- package/dist/secrets.js +1 -1
- package/dist/secrets.js.map +1 -1
- package/dist/workflows.js +1 -1
- package/dist/workflows.js.map +1 -1
- package/package.json +1 -1
package/dist/data.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type * as common from './common.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* A Bucket is one customer object store: bytes, size, and SHA-256 kept exact,
|
|
6
6
|
* with versions, delete markers, retention, multipart, and per-object
|
|
7
|
-
* visibility (private by default). Silo: each has its own
|
|
7
|
+
* visibility (private by default). Silo: each has its own store, access keys,
|
|
8
8
|
* backup, region, and deletion.
|
|
9
9
|
*/
|
|
10
10
|
export interface Bucket {
|
|
@@ -19,6 +19,74 @@ export interface Bucket {
|
|
|
19
19
|
/** Observed state. */
|
|
20
20
|
readonly status?: BucketStatus;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* BucketCorsRule lets one set of browser origins call the bucket's S3
|
|
24
|
+
* endpoint (presigned GET, single PUT, multipart parts).
|
|
25
|
+
*/
|
|
26
|
+
export interface BucketCorsRule {
|
|
27
|
+
/**
|
|
28
|
+
* Origins as `scheme://host[:port]`, for example `https://app.example.com`,
|
|
29
|
+
* with at most one `*` in the host (`https://*.example.com`), or a lone
|
|
30
|
+
* `*`. Required; at most 20.
|
|
31
|
+
*/
|
|
32
|
+
allowedOrigins?: string[];
|
|
33
|
+
/** Any of `GET`, `HEAD`, `PUT`, `POST`, `DELETE`. Required. */
|
|
34
|
+
allowedMethods?: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Request headers the browser may send, or `*`. A presigned PUT needs
|
|
37
|
+
* `Content-Type`; a multipart part needs none.
|
|
38
|
+
*/
|
|
39
|
+
allowedHeaders?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Response headers the page may read. Data adds `ETag` to a rule that
|
|
42
|
+
* allows `PUT` or `POST`, because a browser multipart upload cannot
|
|
43
|
+
* complete without each part's ETag, so a read of the rule always lists it.
|
|
44
|
+
*/
|
|
45
|
+
exposeHeaders?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* How long a browser may cache the preflight answer; default `3600s`,
|
|
48
|
+
* at most `86400s`.
|
|
49
|
+
*/
|
|
50
|
+
maxAge?: string;
|
|
51
|
+
}
|
|
52
|
+
/** BucketExpirationRule expires the objects under one key prefix. */
|
|
53
|
+
export interface BucketExpirationRule {
|
|
54
|
+
/**
|
|
55
|
+
* Applies to keys that start with this prefix, at most 1024 bytes; empty is
|
|
56
|
+
* the whole bucket.
|
|
57
|
+
*/
|
|
58
|
+
prefix?: string;
|
|
59
|
+
/** Expire an object this many days after it was written: 1 to 36500. */
|
|
60
|
+
days?: number;
|
|
61
|
+
}
|
|
62
|
+
/** BucketLifecycle removes objects and abandoned uploads on a schedule. */
|
|
63
|
+
export interface BucketLifecycle {
|
|
64
|
+
/**
|
|
65
|
+
* Abort a multipart upload that has not completed this many days after it
|
|
66
|
+
* started, and free its parts: 1 to 365. 0 keeps incomplete uploads until
|
|
67
|
+
* someone aborts them (and they are billed as stored bytes until then).
|
|
68
|
+
*/
|
|
69
|
+
abortIncompleteMultipartDays?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Expire current objects by key prefix, at most 50 rules with distinct
|
|
72
|
+
* prefixes. On a versioned bucket an expiry writes a delete marker.
|
|
73
|
+
*/
|
|
74
|
+
expirationRules?: BucketExpirationRule[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* BucketPublicAccess says which objects anyone may read with no key. Reads
|
|
78
|
+
* only; a write always needs a key. Per-object visibility still applies on
|
|
79
|
+
* top: a private object is never served.
|
|
80
|
+
*/
|
|
81
|
+
export interface BucketPublicAccess {
|
|
82
|
+
/** Which objects are public. */
|
|
83
|
+
mode?: BucketPublicAccessMode;
|
|
84
|
+
/**
|
|
85
|
+
* Key prefixes whose objects are public when `mode` is `READ_PREFIXES`, at
|
|
86
|
+
* most 50, each at most 1024 bytes.
|
|
87
|
+
*/
|
|
88
|
+
prefixes?: string[];
|
|
89
|
+
}
|
|
22
90
|
/** BucketSpec is the caller-writable state of a Bucket. */
|
|
23
91
|
export interface BucketSpec {
|
|
24
92
|
/** Keep every version and write delete markers. */
|
|
@@ -32,6 +100,20 @@ export interface BucketSpec {
|
|
|
32
100
|
region?: string;
|
|
33
101
|
/** While set, Delete fails with DELETION_PROTECTED. */
|
|
34
102
|
deletionProtection?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Browser access (CORS) rules for the bucket's S3 endpoint, in order; the
|
|
105
|
+
* first rule matching an origin and method answers. Empty answers no
|
|
106
|
+
* cross-origin request. At most 20 rules.
|
|
107
|
+
*/
|
|
108
|
+
cors?: BucketCorsRule[];
|
|
109
|
+
/** Rules that remove what a bucket no longer needs. Unset keeps everything. */
|
|
110
|
+
lifecycle?: BucketLifecycle;
|
|
111
|
+
/**
|
|
112
|
+
* Who may read the bucket's objects without a key. Unset is `OFF`. Set at
|
|
113
|
+
* creation; the bucket serves it once its S3 endpoint does, and until then
|
|
114
|
+
* every object stays private.
|
|
115
|
+
*/
|
|
116
|
+
publicAccess?: BucketPublicAccess;
|
|
35
117
|
}
|
|
36
118
|
/** BucketStatus is the observed state of a Bucket. */
|
|
37
119
|
export interface BucketStatus {
|
|
@@ -51,16 +133,44 @@ export interface BucketStatus {
|
|
|
51
133
|
readonly storageBytes?: string;
|
|
52
134
|
/** Current objects, at the last usage sample. */
|
|
53
135
|
readonly objectCount?: string;
|
|
136
|
+
/** The URL clients send object requests to: `https://{host}/v1/objects/{uid}`. */
|
|
137
|
+
readonly endpoint?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The base URL a key-less client reads public objects from, `{endpoint}`
|
|
140
|
+
* followed by the object key; empty while `spec.public_access` is off.
|
|
141
|
+
*/
|
|
142
|
+
readonly publicUrl?: string;
|
|
143
|
+
}
|
|
144
|
+
/** Request an owner-collected catalog observation for one database. */
|
|
145
|
+
export interface CheckDatabaseCatalogReadinessRequest {
|
|
146
|
+
/** Exact database name in the authorized environment. */
|
|
147
|
+
name: string;
|
|
148
|
+
/** A stale scheduled intent yields unknown without connecting. */
|
|
149
|
+
expectedGeneration?: string;
|
|
54
150
|
}
|
|
55
151
|
/** The request of ConnectBucket. */
|
|
56
152
|
export interface ConnectBucketRequest {
|
|
57
153
|
/** The name of the bucket. */
|
|
58
154
|
name: string;
|
|
155
|
+
/**
|
|
156
|
+
* How long the S3 keys last: `900s` to `604800s` (7 days), default `3600s`.
|
|
157
|
+
* Ask for what the work needs (a server that signs 7-day URLs asks for
|
|
158
|
+
* `604800s`); connect again for fresh keys, they are cheap.
|
|
159
|
+
*/
|
|
160
|
+
credentialTtl?: string;
|
|
59
161
|
}
|
|
60
162
|
/** The response of ConnectBucket. */
|
|
61
163
|
export interface ConnectBucketResponse {
|
|
62
|
-
/**
|
|
63
|
-
|
|
164
|
+
/**
|
|
165
|
+
* How to reach the same bucket over S3, with keys minted by this call.
|
|
166
|
+
* Unset while the bucket is not served over S3.
|
|
167
|
+
*/
|
|
168
|
+
s3?: S3Connection;
|
|
169
|
+
/**
|
|
170
|
+
* The URL clients send object requests to through the Data API; the same as
|
|
171
|
+
* `status.endpoint`.
|
|
172
|
+
*/
|
|
173
|
+
readonly endpoint?: string;
|
|
64
174
|
}
|
|
65
175
|
/** The request of ConnectDatabase. */
|
|
66
176
|
export interface ConnectDatabaseRequest {
|
|
@@ -101,7 +211,7 @@ export interface ConnectSearchIndexResponse {
|
|
|
101
211
|
export interface ConnectionInfo {
|
|
102
212
|
/** The endpoint host, `{ref}.sylphx.net`. */
|
|
103
213
|
host?: string;
|
|
104
|
-
/** The TLS port: 5432 Postgres, 6379
|
|
214
|
+
/** The TLS port: 5432 Postgres, 6379 key-value, 8108 search, 443 objects. */
|
|
105
215
|
port?: number;
|
|
106
216
|
/** The engine user. */
|
|
107
217
|
username?: string;
|
|
@@ -185,6 +295,50 @@ export interface Database {
|
|
|
185
295
|
/** Observed state. */
|
|
186
296
|
readonly status?: DatabaseStatus;
|
|
187
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* An owner-observed catalog result. Unknown is never successful evidence and
|
|
300
|
+
* cannot resolve an open episode. coverage_gap also identifies an observed
|
|
301
|
+
* missing collection prerequisite, independently of transport health.
|
|
302
|
+
*/
|
|
303
|
+
export interface DatabaseCatalogReadiness {
|
|
304
|
+
/** Exact authorized database name from the owner census. */
|
|
305
|
+
readonly resource?: string;
|
|
306
|
+
/** Resource generation against which the observation is fenced. */
|
|
307
|
+
readonly observedGeneration?: string;
|
|
308
|
+
/** Owner clock time at which the observation completed. */
|
|
309
|
+
readonly observedAt?: string;
|
|
310
|
+
/** Whether complete current evidence establishes coverage or a known gap. */
|
|
311
|
+
readonly state?: CatalogReadinessState;
|
|
312
|
+
/** Finite owner reason; never contains driver errors or credentials. */
|
|
313
|
+
readonly reason?: CatalogReadinessReason;
|
|
314
|
+
/** An affirmatively observed coverage defect that can open an episode. */
|
|
315
|
+
readonly coverageGap?: boolean;
|
|
316
|
+
/** Whether this attempt reached the exact approved database; absent if unobserved. */
|
|
317
|
+
readonly transportReachable?: boolean;
|
|
318
|
+
/** Authoritative declared signatures, present only for a complete catalog read. */
|
|
319
|
+
readonly declaredFunctionCount?: number;
|
|
320
|
+
/** The number of declared signatures which resolve, not unrelated functions. */
|
|
321
|
+
readonly observedFunctionCount?: number;
|
|
322
|
+
/** Declared signatures that did not resolve; absent for unknown observations. */
|
|
323
|
+
readonly missingFunctionCount?: number;
|
|
324
|
+
/** Resolved signatures lacking schema USAGE or function EXECUTE. */
|
|
325
|
+
readonly executeMissingCount?: number;
|
|
326
|
+
}
|
|
327
|
+
/** One authorized production database, including explicit non-observation entries. */
|
|
328
|
+
export interface DatabaseCatalogTarget {
|
|
329
|
+
/** Exact authorized database name from the owner census. */
|
|
330
|
+
readonly resource?: string;
|
|
331
|
+
/** Resource generation against which the observation is fenced. */
|
|
332
|
+
readonly observedGeneration?: string;
|
|
333
|
+
/**
|
|
334
|
+
* Protected and unsupported entries stay in the census with an explicit
|
|
335
|
+
* reason. CATALOG_READY here means pending collection, not observed reader
|
|
336
|
+
* eligibility or proven health.
|
|
337
|
+
*/
|
|
338
|
+
readonly collectionReason?: CatalogReadinessReason;
|
|
339
|
+
/** The existing resource binding is authoritative rather than a canonical Data record. */
|
|
340
|
+
readonly legacy?: boolean;
|
|
341
|
+
}
|
|
188
342
|
/** DatabaseSpec is the caller-writable state of a Database. */
|
|
189
343
|
export interface DatabaseSpec {
|
|
190
344
|
/**
|
|
@@ -204,6 +358,25 @@ export interface DatabaseSpec {
|
|
|
204
358
|
region?: string;
|
|
205
359
|
/** While set, Delete fails with DELETION_PROTECTED. */
|
|
206
360
|
deletionProtection?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Address ranges allowed to connect to the database's endpoint. An entry is
|
|
363
|
+
* an IPv4 or IPv6 range like `203.0.113.0/24` or `2001:db8::/32`, at most 50,
|
|
364
|
+
* applied on both the pooled and the direct host a connection can reach. A
|
|
365
|
+
* connection from any other address is refused at the endpoint with the
|
|
366
|
+
* database's own answer (SQLSTATE 28000), before it reaches Postgres; a
|
|
367
|
+
* connection from a listed address is served as usual. Empty serves every
|
|
368
|
+
* address (the field absent), so clearing it re-opens the endpoint. Send
|
|
369
|
+
* `client_allowlist_set` to store an empty list.
|
|
370
|
+
*/
|
|
371
|
+
clientAllowlist?: string[];
|
|
372
|
+
/**
|
|
373
|
+
* Stores `client_allowlist` as given, including an empty list that re-opens
|
|
374
|
+
* the endpoint. An empty repeated field is not a change on its own, so
|
|
375
|
+
* Update sends `client_allowlist_set` (or `clientAllowlistSet`) as `true`
|
|
376
|
+
* when it means to clear the list; any non-empty `client_allowlist` is
|
|
377
|
+
* stored whether or not this is set. Reads always report `false`.
|
|
378
|
+
*/
|
|
379
|
+
clientAllowlistSet?: boolean;
|
|
207
380
|
}
|
|
208
381
|
/** DatabaseStatus is the observed state of a Database. */
|
|
209
382
|
export interface DatabaseStatus {
|
|
@@ -505,9 +678,9 @@ export interface IncrementValueResponse {
|
|
|
505
678
|
value?: ValueRecord;
|
|
506
679
|
}
|
|
507
680
|
/**
|
|
508
|
-
* A KvNamespace is one
|
|
509
|
-
*
|
|
510
|
-
*
|
|
681
|
+
* A KvNamespace is one managed key-value store: versioned bytes with
|
|
682
|
+
* compare-and-set, TTL, prefix list, and a supported command profile.
|
|
683
|
+
* Silo: each has its own credentials,
|
|
511
684
|
* backup, region, and deletion.
|
|
512
685
|
*/
|
|
513
686
|
export interface KvNamespace {
|
|
@@ -847,6 +1020,22 @@ export interface PutValueResponse {
|
|
|
847
1020
|
/** The stored entry. */
|
|
848
1021
|
value?: ValueRecord;
|
|
849
1022
|
}
|
|
1023
|
+
/** Page the authorized production database census. */
|
|
1024
|
+
export interface QueryDatabaseCatalogTargetsRequest {
|
|
1025
|
+
/** Exact organization, project and environment parent. */
|
|
1026
|
+
parent: string;
|
|
1027
|
+
/** Maximum targets to return; defaults to 100 and is capped at 1000. */
|
|
1028
|
+
pageSize?: number;
|
|
1029
|
+
/** Opaque cursor from the preceding page in the same environment. */
|
|
1030
|
+
pageToken?: string;
|
|
1031
|
+
}
|
|
1032
|
+
/** A complete page of the authorized production census. */
|
|
1033
|
+
export interface QueryDatabaseCatalogTargetsResponse {
|
|
1034
|
+
/** Targets in stable resource order, including protected and legacy entries. */
|
|
1035
|
+
targets?: DatabaseCatalogTarget[];
|
|
1036
|
+
/** Cursor for the next page; empty when the census is complete. */
|
|
1037
|
+
nextPageToken?: string;
|
|
1038
|
+
}
|
|
850
1039
|
/** The request of RestoreDatabase. */
|
|
851
1040
|
export interface RestoreDatabaseRequest {
|
|
852
1041
|
/** The name of the database. */
|
|
@@ -894,6 +1083,82 @@ export interface RotateSearchIndexCredentialsRequest {
|
|
|
894
1083
|
/** Validate without acting. */
|
|
895
1084
|
validateOnly?: boolean;
|
|
896
1085
|
}
|
|
1086
|
+
/**
|
|
1087
|
+
* S3Connection is how a client reaches one bucket over the S3 protocol (SigV4):
|
|
1088
|
+
* aws-sdk, rclone, DuckDB, restic, or hand-signed requests. The keys are
|
|
1089
|
+
* minted for this call, scoped to this one bucket in this one environment, and
|
|
1090
|
+
* stop working at `expire_time`, on `RotateBucketCredentials`, or when the
|
|
1091
|
+
* bucket is deleted. They are not API keys and are returned only here.
|
|
1092
|
+
*/
|
|
1093
|
+
export interface S3Connection {
|
|
1094
|
+
/**
|
|
1095
|
+
* The S3 endpoint URL, for example `https://s3.sylphx.net`. One endpoint
|
|
1096
|
+
* serves every bucket.
|
|
1097
|
+
*/
|
|
1098
|
+
endpoint?: string;
|
|
1099
|
+
/** The SigV4 region name to sign with. */
|
|
1100
|
+
region?: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* True: address the bucket in the path (`{endpoint}/{bucket}/{key}`); the
|
|
1103
|
+
* endpoint has no per-bucket DNS name, so a client that defaults to
|
|
1104
|
+
* virtual-hosted style must be told to use path style.
|
|
1105
|
+
*/
|
|
1106
|
+
pathStyle?: boolean;
|
|
1107
|
+
/** The S3 bucket name to put in the path and in signed requests. */
|
|
1108
|
+
bucket?: string;
|
|
1109
|
+
/** The access key id. */
|
|
1110
|
+
accessKeyId?: string;
|
|
1111
|
+
/** The secret access key. */
|
|
1112
|
+
secretAccessKey?: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* The session token to send as `X-Amz-Security-Token`; empty when the keys
|
|
1115
|
+
* are not temporary credentials of a session.
|
|
1116
|
+
*/
|
|
1117
|
+
sessionToken?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* When the keys stop working; always set. A presigned URL made with them
|
|
1120
|
+
* stops working then too, whatever its own expiry says.
|
|
1121
|
+
*/
|
|
1122
|
+
expireTime?: string;
|
|
1123
|
+
/** What presigned URLs and multipart uploads may do on this endpoint. */
|
|
1124
|
+
presign?: S3PresignRules;
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* S3PresignRules are the limits on presigned URLs (SigV4 query signing) and
|
|
1128
|
+
* multipart uploads for every bucket. A presigned URL is valid for its own
|
|
1129
|
+
* `X-Amz-Expires` or until the keys that signed it expire, whichever comes
|
|
1130
|
+
* first; the endpoint refuses a longer `X-Amz-Expires` than `max_expires`.
|
|
1131
|
+
*/
|
|
1132
|
+
export interface S3PresignRules {
|
|
1133
|
+
/**
|
|
1134
|
+
* The longest `X-Amz-Expires` accepted: `604800s` (7 days). Keys that live
|
|
1135
|
+
* shorter cut a URL's life short; ask `credential_ttl` for a longer
|
|
1136
|
+
* lifetime when a URL must outlive the default keys.
|
|
1137
|
+
*/
|
|
1138
|
+
maxExpires?: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* Methods a presigned URL may sign on an object: `GET` and `HEAD` to read,
|
|
1141
|
+
* `PUT` to write in one request.
|
|
1142
|
+
*/
|
|
1143
|
+
methods?: string[];
|
|
1144
|
+
/**
|
|
1145
|
+
* A single `PUT` carries at most this many bytes (5 GiB); larger bodies
|
|
1146
|
+
* use multipart.
|
|
1147
|
+
*/
|
|
1148
|
+
maxSinglePutBytes?: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* A multipart upload presigns each of `CreateMultipartUpload` (`POST
|
|
1151
|
+
* ?uploads`), `UploadPart` (`PUT ?partNumber&uploadId`), `ListParts` (`GET
|
|
1152
|
+
* ?uploadId`, to resume after a dropped part), `CompleteMultipartUpload`
|
|
1153
|
+
* (`POST ?uploadId`) and `AbortMultipartUpload` (`DELETE ?uploadId`). Every
|
|
1154
|
+
* part but the last is at least this many bytes (5 MiB).
|
|
1155
|
+
*/
|
|
1156
|
+
minPartBytes?: string;
|
|
1157
|
+
/** A part is at most this many bytes (5 GiB). */
|
|
1158
|
+
maxPartBytes?: string;
|
|
1159
|
+
/** An upload has at most this many parts (10000, numbered from 1). */
|
|
1160
|
+
maxParts?: number;
|
|
1161
|
+
}
|
|
897
1162
|
/** The request of ScanValues. */
|
|
898
1163
|
export interface ScanValuesRequest {
|
|
899
1164
|
/** The namespace's id. */
|
|
@@ -1161,6 +1426,12 @@ export interface ZSetScoreValueResponse {
|
|
|
1161
1426
|
/** The member's score; unset when the member or the set is absent. */
|
|
1162
1427
|
score?: number;
|
|
1163
1428
|
}
|
|
1429
|
+
/** BucketPublicAccessMode is how much of a bucket is publicly readable. */
|
|
1430
|
+
export type BucketPublicAccessMode = 'off' | 'read' | 'read_prefixes' | (string & {});
|
|
1431
|
+
/** Finite owner evidence separating policy, transport and coverage outcomes. */
|
|
1432
|
+
export type CatalogReadinessReason = 'catalog_ready' | 'credential_missing' | 'authority_denied' | 'connect_failed' | 'catalog_unavailable' | 'reachable_zero_declared_functions' | 'declared_function_missing' | 'execute_missing' | 'generation_mismatch' | 'reader_boundary_failed' | 'unsupported_legacy' | 'protected_resource' | 'reader_not_ready' | 'declaration_invalid' | 'platform_owned_policy_excluded' | (string & {});
|
|
1433
|
+
/** Classification of the current bounded owner observation. */
|
|
1434
|
+
export type CatalogReadinessState = 'healthy' | 'unhealthy' | 'unknown' | (string & {});
|
|
1164
1435
|
/** ConnectionProfile is which Postgres path a connection takes. */
|
|
1165
1436
|
export type ConnectionProfile = 'pooled' | 'direct' | (string & {});
|
|
1166
1437
|
/** DatastoreState is whether a datastore is serving. */
|
|
@@ -1493,6 +1764,24 @@ export declare class DatabasesCollection {
|
|
|
1493
1764
|
list(request: ListDatabasesRequest): Promise<ListDatabasesResponse>;
|
|
1494
1765
|
/** Every item of every page of `list`. */
|
|
1495
1766
|
listAll(request: ListDatabasesRequest): AsyncGenerator<Database>;
|
|
1767
|
+
/**
|
|
1768
|
+
* Observes aggregate-read coverage using the database's approved reader.
|
|
1769
|
+
* Reads catalog metadata only; never accepts SQL, credentials or row data.
|
|
1770
|
+
*
|
|
1771
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/databases/*}:checkCatalogReadiness` · permission `data:read` · effect `read`
|
|
1772
|
+
*
|
|
1773
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
|
|
1774
|
+
*/
|
|
1775
|
+
checkCatalogReadiness(request: CheckDatabaseCatalogReadinessRequest): Promise<DatabaseCatalogReadiness>;
|
|
1776
|
+
/**
|
|
1777
|
+
* Pages the complete authorized production database population, including
|
|
1778
|
+
* legacy bindings and protected resources which cannot be observed.
|
|
1779
|
+
*
|
|
1780
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/databases:queryCatalogTargets` · permission `data:read` · effect `read`
|
|
1781
|
+
*
|
|
1782
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1783
|
+
*/
|
|
1784
|
+
queryCatalogTargets(request: QueryDatabaseCatalogTargetsRequest): Promise<QueryDatabaseCatalogTargetsResponse>;
|
|
1496
1785
|
/**
|
|
1497
1786
|
* Creates a database. The Operation is done when the controller settles it.
|
|
1498
1787
|
*
|
|
@@ -1643,7 +1932,9 @@ export declare class BucketsCollection {
|
|
|
1643
1932
|
*/
|
|
1644
1933
|
create(request: CreateBucketRequest): Promise<runtime.Operation<Bucket>>;
|
|
1645
1934
|
/**
|
|
1646
|
-
* Updates a bucket.
|
|
1935
|
+
* Updates a bucket's `spec.deletion_protection`, `spec.cors` and
|
|
1936
|
+
* `spec.lifecycle`; every other field is fixed at creation. A mask path
|
|
1937
|
+
* replaces the whole field (`spec.cors` replaces every rule).
|
|
1647
1938
|
*
|
|
1648
1939
|
* `PATCH /v1/{bucket.name=orgs/*\/projects/*\/envs/*\/buckets/*}` · permission `data:write` · effect `write`
|
|
1649
1940
|
*
|
|
@@ -1659,17 +1950,19 @@ export declare class BucketsCollection {
|
|
|
1659
1950
|
*/
|
|
1660
1951
|
delete(request: DeleteBucketRequest): Promise<runtime.Operation<Record<string, never>>>;
|
|
1661
1952
|
/**
|
|
1662
|
-
* Returns
|
|
1663
|
-
*
|
|
1953
|
+
* Returns where to reach the bucket: the Data API address, and, once the
|
|
1954
|
+
* bucket is served over S3, an S3 endpoint with keys scoped to this one
|
|
1955
|
+
* bucket (`s3`). It carries no username or password; each call mints new
|
|
1956
|
+
* S3 keys, and a client signs with those.
|
|
1664
1957
|
*
|
|
1665
1958
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/buckets/*}:connect` · permission `data:write` · effect `read`
|
|
1666
1959
|
*
|
|
1667
|
-
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`.
|
|
1960
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1668
1961
|
*/
|
|
1669
1962
|
connect(request: ConnectBucketRequest): Promise<ConnectBucketResponse>;
|
|
1670
1963
|
/**
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1964
|
+
* Revokes every S3 key `:connect` minted for the bucket, at once; connect
|
|
1965
|
+
* again for new ones. Keys of other buckets are untouched.
|
|
1673
1966
|
*
|
|
1674
1967
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/buckets/*}:rotateCredentials` · permission `data:write` · effect `write`
|
|
1675
1968
|
*
|
package/dist/data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by sylphx-gen
|
|
1
|
+
// @generated by sylphx-gen. Do not edit.
|
|
2
2
|
// `sylphx.data.v1`.
|
|
3
3
|
import * as runtime from './runtime.js';
|
|
4
4
|
import './common.js';
|
|
@@ -8,19 +8,41 @@ runtime.registerSchemas({
|
|
|
8
8
|
['spec', 'spec', 'sylphx.data.v1.BucketSpec'],
|
|
9
9
|
['status', 'status', 'sylphx.data.v1.BucketStatus'],
|
|
10
10
|
],
|
|
11
|
+
'sylphx.data.v1.BucketCorsRule': [
|
|
12
|
+
['allowedOrigins', 'allowed_origins'],
|
|
13
|
+
['allowedMethods', 'allowed_methods'],
|
|
14
|
+
['allowedHeaders', 'allowed_headers'],
|
|
15
|
+
['exposeHeaders', 'expose_headers'],
|
|
16
|
+
['maxAge', 'max_age'],
|
|
17
|
+
],
|
|
18
|
+
'sylphx.data.v1.BucketExpirationRule': [],
|
|
19
|
+
'sylphx.data.v1.BucketLifecycle': [
|
|
20
|
+
['abortIncompleteMultipartDays', 'abort_incomplete_multipart_days'],
|
|
21
|
+
['expirationRules', 'expiration_rules', 'sylphx.data.v1.BucketExpirationRule'],
|
|
22
|
+
],
|
|
23
|
+
'sylphx.data.v1.BucketPublicAccess': [],
|
|
11
24
|
'sylphx.data.v1.BucketSpec': [
|
|
12
25
|
['versioningEnabled', 'versioning_enabled'],
|
|
13
26
|
['deletionProtection', 'deletion_protection'],
|
|
27
|
+
['cors', 'cors', 'sylphx.data.v1.BucketCorsRule'],
|
|
28
|
+
['lifecycle', 'lifecycle', 'sylphx.data.v1.BucketLifecycle'],
|
|
29
|
+
['publicAccess', 'public_access', 'sylphx.data.v1.BucketPublicAccess'],
|
|
14
30
|
],
|
|
15
31
|
'sylphx.data.v1.BucketStatus': [
|
|
16
32
|
['observedGeneration', 'observed_generation'],
|
|
17
33
|
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
18
34
|
['storageBytes', 'storage_bytes'],
|
|
19
35
|
['objectCount', 'object_count'],
|
|
36
|
+
['publicUrl', 'public_url'],
|
|
37
|
+
],
|
|
38
|
+
'sylphx.data.v1.CheckDatabaseCatalogReadinessRequest': [
|
|
39
|
+
['expectedGeneration', 'expected_generation'],
|
|
40
|
+
],
|
|
41
|
+
'sylphx.data.v1.ConnectBucketRequest': [
|
|
42
|
+
['credentialTtl', 'credential_ttl'],
|
|
20
43
|
],
|
|
21
|
-
'sylphx.data.v1.ConnectBucketRequest': [],
|
|
22
44
|
'sylphx.data.v1.ConnectBucketResponse': [
|
|
23
|
-
['
|
|
45
|
+
['s3', 's3', 'sylphx.data.v1.S3Connection'],
|
|
24
46
|
],
|
|
25
47
|
'sylphx.data.v1.ConnectDatabaseRequest': [],
|
|
26
48
|
'sylphx.data.v1.ConnectDatabaseResponse': [
|
|
@@ -62,10 +84,26 @@ runtime.registerSchemas({
|
|
|
62
84
|
['spec', 'spec', 'sylphx.data.v1.DatabaseSpec'],
|
|
63
85
|
['status', 'status', 'sylphx.data.v1.DatabaseStatus'],
|
|
64
86
|
],
|
|
87
|
+
'sylphx.data.v1.DatabaseCatalogReadiness': [
|
|
88
|
+
['observedGeneration', 'observed_generation'],
|
|
89
|
+
['observedAt', 'observed_at'],
|
|
90
|
+
['coverageGap', 'coverage_gap'],
|
|
91
|
+
['transportReachable', 'transport_reachable'],
|
|
92
|
+
['declaredFunctionCount', 'declared_function_count'],
|
|
93
|
+
['observedFunctionCount', 'observed_function_count'],
|
|
94
|
+
['missingFunctionCount', 'missing_function_count'],
|
|
95
|
+
['executeMissingCount', 'execute_missing_count'],
|
|
96
|
+
],
|
|
97
|
+
'sylphx.data.v1.DatabaseCatalogTarget': [
|
|
98
|
+
['observedGeneration', 'observed_generation'],
|
|
99
|
+
['collectionReason', 'collection_reason'],
|
|
100
|
+
],
|
|
65
101
|
'sylphx.data.v1.DatabaseSpec': [
|
|
66
102
|
['postgresVersion', 'postgres_version'],
|
|
67
103
|
['computeUnits', 'compute_units'],
|
|
68
104
|
['deletionProtection', 'deletion_protection'],
|
|
105
|
+
['clientAllowlist', 'client_allowlist'],
|
|
106
|
+
['clientAllowlistSet', 'client_allowlist_set'],
|
|
69
107
|
],
|
|
70
108
|
'sylphx.data.v1.DatabaseStatus': [
|
|
71
109
|
['observedGeneration', 'observed_generation'],
|
|
@@ -309,6 +347,14 @@ runtime.registerSchemas({
|
|
|
309
347
|
'sylphx.data.v1.PutValueResponse': [
|
|
310
348
|
['value', 'value', 'sylphx.data.v1.ValueRecord'],
|
|
311
349
|
],
|
|
350
|
+
'sylphx.data.v1.QueryDatabaseCatalogTargetsRequest': [
|
|
351
|
+
['pageSize', 'page_size'],
|
|
352
|
+
['pageToken', 'page_token'],
|
|
353
|
+
],
|
|
354
|
+
'sylphx.data.v1.QueryDatabaseCatalogTargetsResponse': [
|
|
355
|
+
['targets', 'targets', 'sylphx.data.v1.DatabaseCatalogTarget'],
|
|
356
|
+
['nextPageToken', 'next_page_token'],
|
|
357
|
+
],
|
|
312
358
|
'sylphx.data.v1.RestoreDatabaseRequest': [
|
|
313
359
|
['restoreTime', 'restore_time'],
|
|
314
360
|
['validateOnly', 'validate_only'],
|
|
@@ -325,6 +371,21 @@ runtime.registerSchemas({
|
|
|
325
371
|
'sylphx.data.v1.RotateSearchIndexCredentialsRequest': [
|
|
326
372
|
['validateOnly', 'validate_only'],
|
|
327
373
|
],
|
|
374
|
+
'sylphx.data.v1.S3Connection': [
|
|
375
|
+
['pathStyle', 'path_style'],
|
|
376
|
+
['accessKeyId', 'access_key_id'],
|
|
377
|
+
['secretAccessKey', 'secret_access_key'],
|
|
378
|
+
['sessionToken', 'session_token'],
|
|
379
|
+
['expireTime', 'expire_time'],
|
|
380
|
+
['presign', 'presign', 'sylphx.data.v1.S3PresignRules'],
|
|
381
|
+
],
|
|
382
|
+
'sylphx.data.v1.S3PresignRules': [
|
|
383
|
+
['maxExpires', 'max_expires'],
|
|
384
|
+
['maxSinglePutBytes', 'max_single_put_bytes'],
|
|
385
|
+
['minPartBytes', 'min_part_bytes'],
|
|
386
|
+
['maxPartBytes', 'max_part_bytes'],
|
|
387
|
+
['maxParts', 'max_parts'],
|
|
388
|
+
],
|
|
328
389
|
'sylphx.data.v1.ScanValuesRequest': [
|
|
329
390
|
['namespaceId', 'namespace_id'],
|
|
330
391
|
],
|
|
@@ -1102,6 +1163,42 @@ export class DatabasesCollection {
|
|
|
1102
1163
|
next = { ...request, pageToken: page.nextPageToken };
|
|
1103
1164
|
}
|
|
1104
1165
|
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Observes aggregate-read coverage using the database's approved reader.
|
|
1168
|
+
* Reads catalog metadata only; never accepts SQL, credentials or row data.
|
|
1169
|
+
*
|
|
1170
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/databases/*}:checkCatalogReadiness` · permission `data:read` · effect `read`
|
|
1171
|
+
*
|
|
1172
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
|
|
1173
|
+
*/
|
|
1174
|
+
async checkCatalogReadiness(request) {
|
|
1175
|
+
return this.client.call({
|
|
1176
|
+
method: 'POST',
|
|
1177
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/databases/*', 'name')}:checkCatalogReadiness`,
|
|
1178
|
+
body: runtime.omit(request, ['name']),
|
|
1179
|
+
bodyType: 'sylphx.data.v1.CheckDatabaseCatalogReadinessRequest',
|
|
1180
|
+
responseType: 'sylphx.data.v1.DatabaseCatalogReadiness',
|
|
1181
|
+
mutation: true,
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Pages the complete authorized production database population, including
|
|
1186
|
+
* legacy bindings and protected resources which cannot be observed.
|
|
1187
|
+
*
|
|
1188
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/databases:queryCatalogTargets` · permission `data:read` · effect `read`
|
|
1189
|
+
*
|
|
1190
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1191
|
+
*/
|
|
1192
|
+
async queryCatalogTargets(request) {
|
|
1193
|
+
return this.client.call({
|
|
1194
|
+
method: 'POST',
|
|
1195
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/databases:queryCatalogTargets`,
|
|
1196
|
+
body: runtime.omit(request, ['parent']),
|
|
1197
|
+
bodyType: 'sylphx.data.v1.QueryDatabaseCatalogTargetsRequest',
|
|
1198
|
+
responseType: 'sylphx.data.v1.QueryDatabaseCatalogTargetsResponse',
|
|
1199
|
+
mutation: true,
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1105
1202
|
/**
|
|
1106
1203
|
* Creates a database. The Operation is done when the controller settles it.
|
|
1107
1204
|
*
|
|
@@ -1425,7 +1522,9 @@ export class BucketsCollection {
|
|
|
1425
1522
|
return new runtime.Operation(this.client, operation, 'sylphx.data.v1.Bucket');
|
|
1426
1523
|
}
|
|
1427
1524
|
/**
|
|
1428
|
-
* Updates a bucket.
|
|
1525
|
+
* Updates a bucket's `spec.deletion_protection`, `spec.cors` and
|
|
1526
|
+
* `spec.lifecycle`; every other field is fixed at creation. A mask path
|
|
1527
|
+
* replaces the whole field (`spec.cors` replaces every rule).
|
|
1429
1528
|
*
|
|
1430
1529
|
* `PATCH /v1/{bucket.name=orgs/*\/projects/*\/envs/*\/buckets/*}` · permission `data:write` · effect `write`
|
|
1431
1530
|
*
|
|
@@ -1461,12 +1560,14 @@ export class BucketsCollection {
|
|
|
1461
1560
|
return new runtime.Operation(this.client, operation, undefined);
|
|
1462
1561
|
}
|
|
1463
1562
|
/**
|
|
1464
|
-
* Returns
|
|
1465
|
-
*
|
|
1563
|
+
* Returns where to reach the bucket: the Data API address, and, once the
|
|
1564
|
+
* bucket is served over S3, an S3 endpoint with keys scoped to this one
|
|
1565
|
+
* bucket (`s3`). It carries no username or password; each call mints new
|
|
1566
|
+
* S3 keys, and a client signs with those.
|
|
1466
1567
|
*
|
|
1467
1568
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/buckets/*}:connect` · permission `data:write` · effect `read`
|
|
1468
1569
|
*
|
|
1469
|
-
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`.
|
|
1570
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1470
1571
|
*/
|
|
1471
1572
|
async connect(request) {
|
|
1472
1573
|
return this.client.call({
|
|
@@ -1479,8 +1580,8 @@ export class BucketsCollection {
|
|
|
1479
1580
|
});
|
|
1480
1581
|
}
|
|
1481
1582
|
/**
|
|
1482
|
-
*
|
|
1483
|
-
*
|
|
1583
|
+
* Revokes every S3 key `:connect` minted for the bucket, at once; connect
|
|
1584
|
+
* again for new ones. Keys of other buckets are untouched.
|
|
1484
1585
|
*
|
|
1485
1586
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/buckets/*}:rotateCredentials` · permission `data:write` · effect `write`
|
|
1486
1587
|
*
|