@sylphx/sdk 0.31.0 → 0.32.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 +111 -4
- package/dist/access.d.ts +112 -17
- package/dist/access.js +101 -7
- package/dist/access.js.map +1 -1
- package/dist/ai.d.ts +1 -2
- package/dist/ai.js +2 -3
- package/dist/ai.js.map +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +2 -2
- package/dist/assets.d.ts +447 -0
- package/dist/assets.js +266 -0
- package/dist/assets.js.map +1 -0
- package/dist/auth/client.d.ts +239 -0
- package/dist/auth/client.js +337 -0
- package/dist/auth/client.js.map +1 -0
- package/dist/auth/verify.d.ts +38 -3
- package/dist/auth/verify.js +58 -8
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +455 -7
- package/dist/auth.js +416 -5
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +13 -13
- package/dist/billing.js +5 -5
- package/dist/broker.d.ts +5 -4
- package/dist/broker.js +3 -3
- package/dist/broker.js.map +1 -1
- package/dist/build.d.ts +4 -4
- package/dist/build.js +3 -3
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.d.ts +140 -0
- package/dist/config/flags.js +462 -0
- package/dist/config/flags.js.map +1 -0
- package/dist/config.d.ts +380 -15
- package/dist/config.js +283 -5
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +6 -6
- package/dist/connections.js +3 -3
- package/dist/data.d.ts +560 -7
- package/dist/data.js +510 -4
- package/dist/data.js.map +1 -1
- package/dist/entitlement.d.ts +10 -8
- package/dist/entitlement.js +3 -4
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.d.ts +69 -0
- package/dist/events/realtime.js +107 -0
- package/dist/events/realtime.js.map +1 -0
- package/dist/events/webhooks.d.ts +40 -0
- package/dist/events/webhooks.js +110 -0
- package/dist/events/webhooks.js.map +1 -0
- package/dist/events.d.ts +369 -22
- package/dist/events.js +311 -8
- package/dist/events.js.map +1 -1
- package/dist/hosting.d.ts +13 -14
- package/dist/hosting.js +3 -4
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +837 -0
- package/dist/ids.js +287 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +2 -2
- package/dist/keys.js +3 -3
- package/dist/localization.d.ts +663 -0
- package/dist/localization.js +491 -0
- package/dist/localization.js.map +1 -0
- package/dist/methods.js +1719 -124
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1406 -0
- package/dist/money.js +1090 -0
- package/dist/money.js.map +1 -0
- package/dist/network.d.ts +4 -5
- package/dist/network.js +3 -4
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +321 -124
- package/dist/notify.js +223 -73
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +184 -7
- package/dist/observability.js +156 -8
- package/dist/observability.js.map +1 -1
- package/dist/release.d.ts +14 -15
- package/dist/release.js +3 -4
- package/dist/release.js.map +1 -1
- package/dist/runners.d.ts +2 -3
- package/dist/runners.js +3 -4
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +7 -3
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes.d.ts +64 -20
- package/dist/sandboxes.js +9 -4
- package/dist/sandboxes.js.map +1 -1
- package/dist/secrets.d.ts +6 -6
- package/dist/secrets.js +4 -4
- package/dist/workflows.d.ts +850 -12
- package/dist/workflows.js +672 -3
- package/dist/workflows.js.map +1 -1
- package/package.json +1 -1
package/dist/data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by sylphx-gen 0.1.0 from contracts@
|
|
1
|
+
// @generated by sylphx-gen 0.1.0 from contracts@c8aac0afaf7591d0d5efa1ba6a8540d723d41a97ce7ad5d68601380ef3ab4783. Do not edit.
|
|
2
2
|
// `sylphx.data.v1`.
|
|
3
3
|
import * as runtime from './runtime.js';
|
|
4
4
|
import './common.js';
|
|
@@ -82,6 +82,12 @@ runtime.registerSchemas({
|
|
|
82
82
|
['allowMissing', 'allow_missing'],
|
|
83
83
|
['validateOnly', 'validate_only'],
|
|
84
84
|
],
|
|
85
|
+
'sylphx.data.v1.DeleteDocumentRequest': [
|
|
86
|
+
['indexId', 'index_id'],
|
|
87
|
+
['documentId', 'document_id'],
|
|
88
|
+
['expectedVersion', 'expected_version'],
|
|
89
|
+
],
|
|
90
|
+
'sylphx.data.v1.DeleteDocumentResponse': [],
|
|
85
91
|
'sylphx.data.v1.DeleteKvNamespaceRequest': [
|
|
86
92
|
['allowMissing', 'allow_missing'],
|
|
87
93
|
['validateOnly', 'validate_only'],
|
|
@@ -102,8 +108,28 @@ runtime.registerSchemas({
|
|
|
102
108
|
['expectedVersion', 'expected_version'],
|
|
103
109
|
],
|
|
104
110
|
'sylphx.data.v1.DeleteValueResponse': [],
|
|
111
|
+
'sylphx.data.v1.DocumentRecord': [
|
|
112
|
+
['indexId', 'index_id'],
|
|
113
|
+
['documentId', 'document_id'],
|
|
114
|
+
['documentJson', 'document_json'],
|
|
115
|
+
['updatedAtUnixMs', 'updated_at_unix_ms'],
|
|
116
|
+
],
|
|
117
|
+
'sylphx.data.v1.ExpireValueRequest': [
|
|
118
|
+
['namespaceId', 'namespace_id'],
|
|
119
|
+
['ttlSeconds', 'ttl_seconds'],
|
|
120
|
+
],
|
|
121
|
+
'sylphx.data.v1.ExpireValueResponse': [
|
|
122
|
+
['expiresAtUnixMs', 'expires_at_unix_ms'],
|
|
123
|
+
],
|
|
105
124
|
'sylphx.data.v1.GetBucketRequest': [],
|
|
106
125
|
'sylphx.data.v1.GetDatabaseRequest': [],
|
|
126
|
+
'sylphx.data.v1.GetDocumentRequest': [
|
|
127
|
+
['indexId', 'index_id'],
|
|
128
|
+
['documentId', 'document_id'],
|
|
129
|
+
],
|
|
130
|
+
'sylphx.data.v1.GetDocumentResponse': [
|
|
131
|
+
['document', 'document', 'sylphx.data.v1.DocumentRecord'],
|
|
132
|
+
],
|
|
107
133
|
'sylphx.data.v1.GetKvNamespaceRequest': [],
|
|
108
134
|
'sylphx.data.v1.GetObjectRequest': [
|
|
109
135
|
['bucketId', 'bucket_id'],
|
|
@@ -118,6 +144,34 @@ runtime.registerSchemas({
|
|
|
118
144
|
'sylphx.data.v1.GetValueResponse': [
|
|
119
145
|
['value', 'value', 'sylphx.data.v1.ValueRecord'],
|
|
120
146
|
],
|
|
147
|
+
'sylphx.data.v1.GetValuesRequest': [
|
|
148
|
+
['namespaceId', 'namespace_id'],
|
|
149
|
+
],
|
|
150
|
+
'sylphx.data.v1.GetValuesResponse': [
|
|
151
|
+
['values', 'values', 'sylphx.data.v1.ValueRecord'],
|
|
152
|
+
],
|
|
153
|
+
'sylphx.data.v1.HashField': [],
|
|
154
|
+
'sylphx.data.v1.HashGetAllRequest': [
|
|
155
|
+
['namespaceId', 'namespace_id'],
|
|
156
|
+
],
|
|
157
|
+
'sylphx.data.v1.HashGetAllResponse': [
|
|
158
|
+
['fields', 'fields', 'sylphx.data.v1.HashField'],
|
|
159
|
+
],
|
|
160
|
+
'sylphx.data.v1.HashGetFieldsRequest': [
|
|
161
|
+
['namespaceId', 'namespace_id'],
|
|
162
|
+
],
|
|
163
|
+
'sylphx.data.v1.HashGetFieldsResponse': [
|
|
164
|
+
['fields', 'fields', 'sylphx.data.v1.HashField'],
|
|
165
|
+
],
|
|
166
|
+
'sylphx.data.v1.HashGetValueRequest': [
|
|
167
|
+
['namespaceId', 'namespace_id'],
|
|
168
|
+
],
|
|
169
|
+
'sylphx.data.v1.HashGetValueResponse': [],
|
|
170
|
+
'sylphx.data.v1.HashSetValueRequest': [
|
|
171
|
+
['namespaceId', 'namespace_id'],
|
|
172
|
+
['fields', 'fields', 'sylphx.data.v1.HashField'],
|
|
173
|
+
],
|
|
174
|
+
'sylphx.data.v1.HashSetValueResponse': [],
|
|
121
175
|
'sylphx.data.v1.IncrementValueRequest': [
|
|
122
176
|
['namespaceId', 'namespace_id'],
|
|
123
177
|
],
|
|
@@ -165,6 +219,10 @@ runtime.registerSchemas({
|
|
|
165
219
|
['kvNamespaces', 'kv_namespaces', 'sylphx.data.v1.KvNamespace'],
|
|
166
220
|
['nextPageToken', 'next_page_token'],
|
|
167
221
|
],
|
|
222
|
+
'sylphx.data.v1.ListLenValueRequest': [
|
|
223
|
+
['namespaceId', 'namespace_id'],
|
|
224
|
+
],
|
|
225
|
+
'sylphx.data.v1.ListLenValueResponse': [],
|
|
168
226
|
'sylphx.data.v1.ListObjectsRequest': [
|
|
169
227
|
['bucketId', 'bucket_id'],
|
|
170
228
|
['pageSize', 'page_size'],
|
|
@@ -174,6 +232,18 @@ runtime.registerSchemas({
|
|
|
174
232
|
['objects', 'objects', 'sylphx.data.v1.ObjectRecord'],
|
|
175
233
|
['nextPageToken', 'next_page_token'],
|
|
176
234
|
],
|
|
235
|
+
'sylphx.data.v1.ListPopValueRequest': [
|
|
236
|
+
['namespaceId', 'namespace_id'],
|
|
237
|
+
],
|
|
238
|
+
'sylphx.data.v1.ListPopValueResponse': [],
|
|
239
|
+
'sylphx.data.v1.ListPushValueRequest': [
|
|
240
|
+
['namespaceId', 'namespace_id'],
|
|
241
|
+
],
|
|
242
|
+
'sylphx.data.v1.ListPushValueResponse': [],
|
|
243
|
+
'sylphx.data.v1.ListRangeValueRequest': [
|
|
244
|
+
['namespaceId', 'namespace_id'],
|
|
245
|
+
],
|
|
246
|
+
'sylphx.data.v1.ListRangeValueResponse': [],
|
|
177
247
|
'sylphx.data.v1.ListSearchIndexesRequest': [
|
|
178
248
|
['pageSize', 'page_size'],
|
|
179
249
|
['pageToken', 'page_token'],
|
|
@@ -198,6 +268,15 @@ runtime.registerSchemas({
|
|
|
198
268
|
['updatedAtUnixMs', 'updated_at_unix_ms'],
|
|
199
269
|
['deleteMarker', 'delete_marker'],
|
|
200
270
|
],
|
|
271
|
+
'sylphx.data.v1.PutDocumentRequest': [
|
|
272
|
+
['indexId', 'index_id'],
|
|
273
|
+
['documentId', 'document_id'],
|
|
274
|
+
['documentJson', 'document_json'],
|
|
275
|
+
['expectedVersion', 'expected_version'],
|
|
276
|
+
],
|
|
277
|
+
'sylphx.data.v1.PutDocumentResponse': [
|
|
278
|
+
['document', 'document', 'sylphx.data.v1.DocumentRecord'],
|
|
279
|
+
],
|
|
201
280
|
'sylphx.data.v1.PutObjectRequest': [
|
|
202
281
|
['bucketId', 'bucket_id'],
|
|
203
282
|
['contentType', 'content_type'],
|
|
@@ -230,6 +309,18 @@ runtime.registerSchemas({
|
|
|
230
309
|
'sylphx.data.v1.RotateSearchIndexCredentialsRequest': [
|
|
231
310
|
['validateOnly', 'validate_only'],
|
|
232
311
|
],
|
|
312
|
+
'sylphx.data.v1.ScanValuesRequest': [
|
|
313
|
+
['namespaceId', 'namespace_id'],
|
|
314
|
+
],
|
|
315
|
+
'sylphx.data.v1.ScanValuesResponse': [],
|
|
316
|
+
'sylphx.data.v1.SearchFilter': [
|
|
317
|
+
['valueJson', 'value_json'],
|
|
318
|
+
],
|
|
319
|
+
'sylphx.data.v1.SearchHit': [
|
|
320
|
+
['document', 'document', 'sylphx.data.v1.DocumentRecord'],
|
|
321
|
+
['textScore', 'text_score'],
|
|
322
|
+
['vectorScore', 'vector_score'],
|
|
323
|
+
],
|
|
233
324
|
'sylphx.data.v1.SearchIndex': [
|
|
234
325
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
235
326
|
['spec', 'spec', 'sylphx.data.v1.SearchIndexSpec'],
|
|
@@ -245,6 +336,14 @@ runtime.registerSchemas({
|
|
|
245
336
|
['storageBytes', 'storage_bytes'],
|
|
246
337
|
['documentCount', 'document_count'],
|
|
247
338
|
],
|
|
339
|
+
'sylphx.data.v1.SearchRequest': [
|
|
340
|
+
['indexId', 'index_id'],
|
|
341
|
+
['filters', 'filters', 'sylphx.data.v1.SearchFilter'],
|
|
342
|
+
['vectorWeight', 'vector_weight'],
|
|
343
|
+
],
|
|
344
|
+
'sylphx.data.v1.SearchResponse': [
|
|
345
|
+
['hits', 'hits', 'sylphx.data.v1.SearchHit'],
|
|
346
|
+
],
|
|
248
347
|
'sylphx.data.v1.UpdateBucketRequest': [
|
|
249
348
|
['bucket', 'bucket', 'sylphx.data.v1.Bucket'],
|
|
250
349
|
['updateMask', 'update_mask'],
|
|
@@ -274,16 +373,39 @@ runtime.registerSchemas({
|
|
|
274
373
|
['expiresAtUnixMs', 'expires_at_unix_ms'],
|
|
275
374
|
['updatedAtUnixMs', 'updated_at_unix_ms'],
|
|
276
375
|
],
|
|
376
|
+
'sylphx.data.v1.ZSetAddValueRequest': [
|
|
377
|
+
['namespaceId', 'namespace_id'],
|
|
378
|
+
['members', 'members', 'sylphx.data.v1.ZSetMember'],
|
|
379
|
+
],
|
|
380
|
+
'sylphx.data.v1.ZSetAddValueResponse': [],
|
|
381
|
+
'sylphx.data.v1.ZSetLenValueRequest': [
|
|
382
|
+
['namespaceId', 'namespace_id'],
|
|
383
|
+
],
|
|
384
|
+
'sylphx.data.v1.ZSetLenValueResponse': [],
|
|
385
|
+
'sylphx.data.v1.ZSetMember': [],
|
|
386
|
+
'sylphx.data.v1.ZSetRangeValueRequest': [
|
|
387
|
+
['namespaceId', 'namespace_id'],
|
|
388
|
+
['withScores', 'with_scores'],
|
|
389
|
+
],
|
|
390
|
+
'sylphx.data.v1.ZSetRangeValueResponse': [
|
|
391
|
+
['members', 'members', 'sylphx.data.v1.ZSetMember'],
|
|
392
|
+
],
|
|
393
|
+
'sylphx.data.v1.ZSetScoreValueRequest': [
|
|
394
|
+
['namespaceId', 'namespace_id'],
|
|
395
|
+
],
|
|
396
|
+
'sylphx.data.v1.ZSetScoreValueResponse': [],
|
|
277
397
|
});
|
|
278
398
|
/**
|
|
279
|
-
* DataPlaneService is the data plane of Sylphx Data: object bytes
|
|
280
|
-
*
|
|
399
|
+
* DataPlaneService is the data plane of Sylphx Data: object bytes, key-value
|
|
400
|
+
* entries (strings, counters, hashes, lists, and sorted sets), and search
|
|
401
|
+
* documents in an environment's buckets, KV namespaces, and search indexes. It is
|
|
281
402
|
* served by Data itself at its origin, not by the Resource API, and is called
|
|
282
403
|
* with the environment's secret key (`SYLPHX_API_KEY`); the key's org,
|
|
283
404
|
* project, and environment are the tenant. Every call carries a new
|
|
284
405
|
* `Sylphx-Effect-Id`, which the SDK sends and reuses on retries.
|
|
285
406
|
*
|
|
286
|
-
* The buckets and
|
|
407
|
+
* The buckets, namespaces, and indexes themselves are Resources of
|
|
408
|
+
* DataService. The
|
|
287
409
|
* messages here are Data's wire format
|
|
288
410
|
* (`services/data/proto/sylphx/data/v1/data.proto`), field for field; Data
|
|
289
411
|
* answers ProtoJSON (camelCase names, 64-bit integers and bytes as strings).
|
|
@@ -295,6 +417,10 @@ export class DataApi {
|
|
|
295
417
|
objects;
|
|
296
418
|
/** The `kv` collection. */
|
|
297
419
|
kv;
|
|
420
|
+
/** The `documents` collection. */
|
|
421
|
+
documents;
|
|
422
|
+
/** The `search` collection. */
|
|
423
|
+
search;
|
|
298
424
|
/** The `databases` collection. */
|
|
299
425
|
databases;
|
|
300
426
|
/** The `kv_namespaces` collection. */
|
|
@@ -306,6 +432,8 @@ export class DataApi {
|
|
|
306
432
|
constructor(client) {
|
|
307
433
|
this.objects = new ObjectsCollection(client);
|
|
308
434
|
this.kv = new KvCollection(client);
|
|
435
|
+
this.documents = new DocumentsCollection(client);
|
|
436
|
+
this.search = new SearchCollection(client);
|
|
309
437
|
this.databases = new DatabasesCollection(client);
|
|
310
438
|
this.kvNamespaces = new KvNamespacesCollection(client);
|
|
311
439
|
this.buckets = new BucketsCollection(client);
|
|
@@ -491,6 +619,384 @@ export class KvCollection {
|
|
|
491
619
|
mutation: true,
|
|
492
620
|
});
|
|
493
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* Reads up to 1000 keys at once (MGET). Answers one entry per key, in
|
|
624
|
+
* order; an absent or expired key keeps its key and has no `value`.
|
|
625
|
+
*
|
|
626
|
+
* `POST /v1/kv-mget` · permission `data:read` · effect `read`
|
|
627
|
+
*
|
|
628
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
629
|
+
*/
|
|
630
|
+
async getMany(request) {
|
|
631
|
+
return this.client.call({
|
|
632
|
+
method: 'POST',
|
|
633
|
+
path: `/v1/kv-mget`,
|
|
634
|
+
body: runtime.omit(request, []),
|
|
635
|
+
bodyType: 'sylphx.data.v1.GetValuesRequest',
|
|
636
|
+
responseType: 'sylphx.data.v1.GetValuesResponse',
|
|
637
|
+
origin: 'https://api.data.sylphx.com',
|
|
638
|
+
effectIds: true,
|
|
639
|
+
mutation: true,
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Sets fields of a hash (HSET), creating it.
|
|
644
|
+
*
|
|
645
|
+
* `POST /v1/kv-hashes` · permission `data:write` · effect `write`
|
|
646
|
+
*
|
|
647
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
648
|
+
*/
|
|
649
|
+
async hashSet(request) {
|
|
650
|
+
return this.client.call({
|
|
651
|
+
method: 'POST',
|
|
652
|
+
path: `/v1/kv-hashes`,
|
|
653
|
+
body: runtime.omit(request, []),
|
|
654
|
+
bodyType: 'sylphx.data.v1.HashSetValueRequest',
|
|
655
|
+
responseType: 'sylphx.data.v1.HashSetValueResponse',
|
|
656
|
+
origin: 'https://api.data.sylphx.com',
|
|
657
|
+
effectIds: true,
|
|
658
|
+
mutation: true,
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Reads one field of a hash (HGET); an absent field has no `value`.
|
|
663
|
+
*
|
|
664
|
+
* `POST /v1/kv-hash-gets` · permission `data:read` · effect `read`
|
|
665
|
+
*
|
|
666
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
667
|
+
*/
|
|
668
|
+
async hashGet(request) {
|
|
669
|
+
return this.client.call({
|
|
670
|
+
method: 'POST',
|
|
671
|
+
path: `/v1/kv-hash-gets`,
|
|
672
|
+
body: runtime.omit(request, []),
|
|
673
|
+
bodyType: 'sylphx.data.v1.HashGetValueRequest',
|
|
674
|
+
responseType: 'sylphx.data.v1.HashGetValueResponse',
|
|
675
|
+
origin: 'https://api.data.sylphx.com',
|
|
676
|
+
effectIds: true,
|
|
677
|
+
mutation: true,
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Reads every field of a hash (HGETALL).
|
|
682
|
+
*
|
|
683
|
+
* `POST /v1/kv-hash-getall` · permission `data:read` · effect `read`
|
|
684
|
+
*
|
|
685
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
686
|
+
*/
|
|
687
|
+
async hashGetAll(request) {
|
|
688
|
+
return this.client.call({
|
|
689
|
+
method: 'POST',
|
|
690
|
+
path: `/v1/kv-hash-getall`,
|
|
691
|
+
body: runtime.omit(request, []),
|
|
692
|
+
bodyType: 'sylphx.data.v1.HashGetAllRequest',
|
|
693
|
+
responseType: 'sylphx.data.v1.HashGetAllResponse',
|
|
694
|
+
origin: 'https://api.data.sylphx.com',
|
|
695
|
+
effectIds: true,
|
|
696
|
+
mutation: true,
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Reads several fields of a hash (HMGET), one per field, in order; an
|
|
701
|
+
* absent field has no `value`.
|
|
702
|
+
*
|
|
703
|
+
* `POST /v1/kv-hash-mget` · permission `data:read` · effect `read`
|
|
704
|
+
*
|
|
705
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
706
|
+
*/
|
|
707
|
+
async hashGetMany(request) {
|
|
708
|
+
return this.client.call({
|
|
709
|
+
method: 'POST',
|
|
710
|
+
path: `/v1/kv-hash-mget`,
|
|
711
|
+
body: runtime.omit(request, []),
|
|
712
|
+
bodyType: 'sylphx.data.v1.HashGetFieldsRequest',
|
|
713
|
+
responseType: 'sylphx.data.v1.HashGetFieldsResponse',
|
|
714
|
+
origin: 'https://api.data.sylphx.com',
|
|
715
|
+
effectIds: true,
|
|
716
|
+
mutation: true,
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Pushes values onto the head of a list (LPUSH), creating it.
|
|
721
|
+
*
|
|
722
|
+
* `POST /v1/kv-list-pushes` · permission `data:write` · effect `write`
|
|
723
|
+
*
|
|
724
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
725
|
+
*/
|
|
726
|
+
async listPush(request) {
|
|
727
|
+
return this.client.call({
|
|
728
|
+
method: 'POST',
|
|
729
|
+
path: `/v1/kv-list-pushes`,
|
|
730
|
+
body: runtime.omit(request, []),
|
|
731
|
+
bodyType: 'sylphx.data.v1.ListPushValueRequest',
|
|
732
|
+
responseType: 'sylphx.data.v1.ListPushValueResponse',
|
|
733
|
+
origin: 'https://api.data.sylphx.com',
|
|
734
|
+
effectIds: true,
|
|
735
|
+
mutation: true,
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Reads a range of a list (LRANGE); negative indexes count from the end.
|
|
740
|
+
*
|
|
741
|
+
* `POST /v1/kv-list-ranges` · permission `data:read` · effect `read`
|
|
742
|
+
*
|
|
743
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
744
|
+
*/
|
|
745
|
+
async listRange(request) {
|
|
746
|
+
return this.client.call({
|
|
747
|
+
method: 'POST',
|
|
748
|
+
path: `/v1/kv-list-ranges`,
|
|
749
|
+
body: runtime.omit(request, []),
|
|
750
|
+
bodyType: 'sylphx.data.v1.ListRangeValueRequest',
|
|
751
|
+
responseType: 'sylphx.data.v1.ListRangeValueResponse',
|
|
752
|
+
origin: 'https://api.data.sylphx.com',
|
|
753
|
+
effectIds: true,
|
|
754
|
+
mutation: true,
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Pops values from the head of a list (LPOP); an emptied list is removed.
|
|
759
|
+
*
|
|
760
|
+
* `POST /v1/kv-list-pops` · permission `data:write` · effect `write`
|
|
761
|
+
*
|
|
762
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
763
|
+
*/
|
|
764
|
+
async listPop(request) {
|
|
765
|
+
return this.client.call({
|
|
766
|
+
method: 'POST',
|
|
767
|
+
path: `/v1/kv-list-pops`,
|
|
768
|
+
body: runtime.omit(request, []),
|
|
769
|
+
bodyType: 'sylphx.data.v1.ListPopValueRequest',
|
|
770
|
+
responseType: 'sylphx.data.v1.ListPopValueResponse',
|
|
771
|
+
origin: 'https://api.data.sylphx.com',
|
|
772
|
+
effectIds: true,
|
|
773
|
+
mutation: true,
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Reads the length of a list (LLEN); an absent key has length zero.
|
|
778
|
+
*
|
|
779
|
+
* `POST /v1/kv-list-lens` · permission `data:read` · effect `read`
|
|
780
|
+
*
|
|
781
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
782
|
+
*/
|
|
783
|
+
async listLength(request) {
|
|
784
|
+
return this.client.call({
|
|
785
|
+
method: 'POST',
|
|
786
|
+
path: `/v1/kv-list-lens`,
|
|
787
|
+
body: runtime.omit(request, []),
|
|
788
|
+
bodyType: 'sylphx.data.v1.ListLenValueRequest',
|
|
789
|
+
responseType: 'sylphx.data.v1.ListLenValueResponse',
|
|
790
|
+
origin: 'https://api.data.sylphx.com',
|
|
791
|
+
effectIds: true,
|
|
792
|
+
mutation: true,
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Adds members to a sorted set or updates their scores (ZADD), creating it.
|
|
797
|
+
*
|
|
798
|
+
* `POST /v1/kv-zsets` · permission `data:write` · effect `write`
|
|
799
|
+
*
|
|
800
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
801
|
+
*/
|
|
802
|
+
async zsetAdd(request) {
|
|
803
|
+
return this.client.call({
|
|
804
|
+
method: 'POST',
|
|
805
|
+
path: `/v1/kv-zsets`,
|
|
806
|
+
body: runtime.omit(request, []),
|
|
807
|
+
bodyType: 'sylphx.data.v1.ZSetAddValueRequest',
|
|
808
|
+
responseType: 'sylphx.data.v1.ZSetAddValueResponse',
|
|
809
|
+
origin: 'https://api.data.sylphx.com',
|
|
810
|
+
effectIds: true,
|
|
811
|
+
mutation: true,
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Reads a range of a sorted set by rank, lowest score first (ZRANGE);
|
|
816
|
+
* negative indexes count from the end.
|
|
817
|
+
*
|
|
818
|
+
* `POST /v1/kv-zset-ranges` · permission `data:read` · effect `read`
|
|
819
|
+
*
|
|
820
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
821
|
+
*/
|
|
822
|
+
async zsetRange(request) {
|
|
823
|
+
return this.client.call({
|
|
824
|
+
method: 'POST',
|
|
825
|
+
path: `/v1/kv-zset-ranges`,
|
|
826
|
+
body: runtime.omit(request, []),
|
|
827
|
+
bodyType: 'sylphx.data.v1.ZSetRangeValueRequest',
|
|
828
|
+
responseType: 'sylphx.data.v1.ZSetRangeValueResponse',
|
|
829
|
+
origin: 'https://api.data.sylphx.com',
|
|
830
|
+
effectIds: true,
|
|
831
|
+
mutation: true,
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Reads a member's score (ZSCORE); an absent member has no `score`.
|
|
836
|
+
*
|
|
837
|
+
* `POST /v1/kv-zset-scores` · permission `data:read` · effect `read`
|
|
838
|
+
*
|
|
839
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
840
|
+
*/
|
|
841
|
+
async zsetScore(request) {
|
|
842
|
+
return this.client.call({
|
|
843
|
+
method: 'POST',
|
|
844
|
+
path: `/v1/kv-zset-scores`,
|
|
845
|
+
body: runtime.omit(request, []),
|
|
846
|
+
bodyType: 'sylphx.data.v1.ZSetScoreValueRequest',
|
|
847
|
+
responseType: 'sylphx.data.v1.ZSetScoreValueResponse',
|
|
848
|
+
origin: 'https://api.data.sylphx.com',
|
|
849
|
+
effectIds: true,
|
|
850
|
+
mutation: true,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Reads the size of a sorted set (ZCARD); an absent key has size zero.
|
|
855
|
+
*
|
|
856
|
+
* `POST /v1/kv-zset-lens` · permission `data:read` · effect `read`
|
|
857
|
+
*
|
|
858
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
859
|
+
*/
|
|
860
|
+
async zsetLength(request) {
|
|
861
|
+
return this.client.call({
|
|
862
|
+
method: 'POST',
|
|
863
|
+
path: `/v1/kv-zset-lens`,
|
|
864
|
+
body: runtime.omit(request, []),
|
|
865
|
+
bodyType: 'sylphx.data.v1.ZSetLenValueRequest',
|
|
866
|
+
responseType: 'sylphx.data.v1.ZSetLenValueResponse',
|
|
867
|
+
origin: 'https://api.data.sylphx.com',
|
|
868
|
+
effectIds: true,
|
|
869
|
+
mutation: true,
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Walks a namespace's keys that match a glob (SCAN). Call again with the
|
|
874
|
+
* returned `cursor` until it is empty.
|
|
875
|
+
*
|
|
876
|
+
* `POST /v1/kv-scans` · permission `data:read` · effect `read`
|
|
877
|
+
*
|
|
878
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
879
|
+
*/
|
|
880
|
+
async scan(request) {
|
|
881
|
+
return this.client.call({
|
|
882
|
+
method: 'POST',
|
|
883
|
+
path: `/v1/kv-scans`,
|
|
884
|
+
body: runtime.omit(request, []),
|
|
885
|
+
bodyType: 'sylphx.data.v1.ScanValuesRequest',
|
|
886
|
+
responseType: 'sylphx.data.v1.ScanValuesResponse',
|
|
887
|
+
origin: 'https://api.data.sylphx.com',
|
|
888
|
+
effectIds: true,
|
|
889
|
+
mutation: true,
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Sets a key's time to live (EXPIRE) without rewriting its value; zero
|
|
894
|
+
* makes it persistent.
|
|
895
|
+
*
|
|
896
|
+
* `POST /v1/kv-expiries` · permission `data:write` · effect `write`
|
|
897
|
+
*
|
|
898
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
899
|
+
*/
|
|
900
|
+
async expire(request) {
|
|
901
|
+
return this.client.call({
|
|
902
|
+
method: 'POST',
|
|
903
|
+
path: `/v1/kv-expiries`,
|
|
904
|
+
body: runtime.omit(request, []),
|
|
905
|
+
bodyType: 'sylphx.data.v1.ExpireValueRequest',
|
|
906
|
+
responseType: 'sylphx.data.v1.ExpireValueResponse',
|
|
907
|
+
origin: 'https://api.data.sylphx.com',
|
|
908
|
+
effectIds: true,
|
|
909
|
+
mutation: true,
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
/** `documents` of Sylphx Data: served at `https://api.data.sylphx.com`. */
|
|
914
|
+
export class DocumentsCollection {
|
|
915
|
+
client;
|
|
916
|
+
constructor(client) {
|
|
917
|
+
this.client = client;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Writes a document to a search index, replacing the current version.
|
|
921
|
+
*
|
|
922
|
+
* `PUT /v1/documents/{index_id}/{document_id}` · permission `data:write` · effect `write`
|
|
923
|
+
*
|
|
924
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`.
|
|
925
|
+
*/
|
|
926
|
+
async put(request) {
|
|
927
|
+
return this.client.call({
|
|
928
|
+
method: 'PUT',
|
|
929
|
+
path: `/v1/documents/${runtime.protocolParam(request.indexId, false, 'index_id')}/${runtime.protocolParam(request.documentId, false, 'document_id')}`,
|
|
930
|
+
body: runtime.omit(request, ['documentId', 'indexId']),
|
|
931
|
+
bodyType: 'sylphx.data.v1.PutDocumentRequest',
|
|
932
|
+
responseType: 'sylphx.data.v1.PutDocumentResponse',
|
|
933
|
+
origin: 'https://api.data.sylphx.com',
|
|
934
|
+
effectIds: true,
|
|
935
|
+
mutation: true,
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Reads a document.
|
|
940
|
+
*
|
|
941
|
+
* `GET /v1/documents/{index_id}/{document_id}` · permission `data:read` · effect `read`
|
|
942
|
+
*
|
|
943
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
944
|
+
*/
|
|
945
|
+
async get(request) {
|
|
946
|
+
return this.client.call({
|
|
947
|
+
method: 'GET',
|
|
948
|
+
path: `/v1/documents/${runtime.protocolParam(request.indexId, false, 'index_id')}/${runtime.protocolParam(request.documentId, false, 'document_id')}`,
|
|
949
|
+
responseType: 'sylphx.data.v1.GetDocumentResponse',
|
|
950
|
+
origin: 'https://api.data.sylphx.com',
|
|
951
|
+
effectIds: true,
|
|
952
|
+
mutation: false,
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Deletes a document.
|
|
957
|
+
*
|
|
958
|
+
* `DELETE /v1/documents/{index_id}/{document_id}` · permission `data:write` · effect `destructive`
|
|
959
|
+
*
|
|
960
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`.
|
|
961
|
+
*/
|
|
962
|
+
async delete(request) {
|
|
963
|
+
return this.client.call({
|
|
964
|
+
method: 'DELETE',
|
|
965
|
+
path: `/v1/documents/${runtime.protocolParam(request.indexId, false, 'index_id')}/${runtime.protocolParam(request.documentId, false, 'document_id')}`,
|
|
966
|
+
query: { expected_version: request.expectedVersion },
|
|
967
|
+
responseType: 'sylphx.data.v1.DeleteDocumentResponse',
|
|
968
|
+
origin: 'https://api.data.sylphx.com',
|
|
969
|
+
effectIds: true,
|
|
970
|
+
mutation: true,
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
/** `search` of Sylphx Data: served at `https://api.data.sylphx.com`. */
|
|
975
|
+
export class SearchCollection {
|
|
976
|
+
client;
|
|
977
|
+
constructor(client) {
|
|
978
|
+
this.client = client;
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Searches an index by text, by vector, or both, best match first, with
|
|
982
|
+
* filters and paging.
|
|
983
|
+
*
|
|
984
|
+
* `POST /v1/search/{index_id}` · permission `data:read` · effect `read`
|
|
985
|
+
*
|
|
986
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
|
|
987
|
+
*/
|
|
988
|
+
async query(request) {
|
|
989
|
+
return this.client.call({
|
|
990
|
+
method: 'POST',
|
|
991
|
+
path: `/v1/search/${runtime.protocolParam(request.indexId, false, 'index_id')}`,
|
|
992
|
+
body: runtime.omit(request, ['indexId']),
|
|
993
|
+
bodyType: 'sylphx.data.v1.SearchRequest',
|
|
994
|
+
responseType: 'sylphx.data.v1.SearchResponse',
|
|
995
|
+
origin: 'https://api.data.sylphx.com',
|
|
996
|
+
effectIds: true,
|
|
997
|
+
mutation: true,
|
|
998
|
+
});
|
|
999
|
+
}
|
|
494
1000
|
}
|
|
495
1001
|
/** `databases` of Sylphx Data: Resource type `data.sylphx.com/Database`. */
|
|
496
1002
|
export class DatabasesCollection {
|