@alienplatform/sdk 1.14.1 → 2.0.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.
Files changed (160) hide show
  1. package/dist/dist.js +371 -275
  2. package/dist/index.d.ts +22 -28
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -14356
  5. package/dist/native.d.ts +26 -0
  6. package/dist/native.d.ts.map +1 -0
  7. package/dist/native.js +2 -0
  8. package/dist/worker-runtime/channel.d.ts +25 -0
  9. package/dist/worker-runtime/channel.d.ts.map +1 -0
  10. package/dist/worker-runtime/errors.d.ts +79 -0
  11. package/dist/worker-runtime/errors.d.ts.map +1 -0
  12. package/dist/worker-runtime/event-loop.d.ts +43 -0
  13. package/dist/worker-runtime/event-loop.d.ts.map +1 -0
  14. package/dist/{generated → worker-runtime/generated}/control.d.ts +15 -15
  15. package/dist/worker-runtime/generated/control.d.ts.map +1 -0
  16. package/dist/worker-runtime/generated/google/protobuf/duration.d.ts.map +1 -0
  17. package/dist/worker-runtime/generated/google/protobuf/timestamp.d.ts.map +1 -0
  18. package/dist/{generated → worker-runtime/generated}/wait_until.d.ts +29 -29
  19. package/dist/worker-runtime/generated/wait_until.d.ts.map +1 -0
  20. package/dist/worker-runtime/grpc-utils.d.ts +23 -0
  21. package/dist/worker-runtime/grpc-utils.d.ts.map +1 -0
  22. package/dist/worker-runtime/index.d.ts +33 -0
  23. package/dist/worker-runtime/index.d.ts.map +1 -0
  24. package/dist/{src.js → worker-runtime/index.js} +9370 -4035
  25. package/dist/worker-runtime/registry.d.ts +169 -0
  26. package/dist/worker-runtime/registry.d.ts.map +1 -0
  27. package/dist/worker-runtime/service-definitions.d.ts +12 -0
  28. package/dist/worker-runtime/service-definitions.d.ts.map +1 -0
  29. package/dist/worker-runtime/wait-until-manager.d.ts +34 -0
  30. package/dist/worker-runtime/wait-until-manager.d.ts.map +1 -0
  31. package/package.json +18 -38
  32. package/.turbo/turbo-build.log +0 -30
  33. package/AGENTS.md +0 -70
  34. package/dist/bearerTokenAuthenticationPolicy.js +0 -3028
  35. package/dist/bindings/artifact-registry.d.ts +0 -88
  36. package/dist/bindings/artifact-registry.d.ts.map +0 -1
  37. package/dist/bindings/build.d.ts +0 -67
  38. package/dist/bindings/build.d.ts.map +0 -1
  39. package/dist/bindings/index.d.ts +0 -13
  40. package/dist/bindings/index.d.ts.map +0 -1
  41. package/dist/bindings/kv.d.ts +0 -113
  42. package/dist/bindings/kv.d.ts.map +0 -1
  43. package/dist/bindings/postgres.d.ts +0 -90
  44. package/dist/bindings/postgres.d.ts.map +0 -1
  45. package/dist/bindings/postgres.test.d.ts +0 -2
  46. package/dist/bindings/postgres.test.d.ts.map +0 -1
  47. package/dist/bindings/queue.d.ts +0 -81
  48. package/dist/bindings/queue.d.ts.map +0 -1
  49. package/dist/bindings/service-account.d.ts +0 -46
  50. package/dist/bindings/service-account.d.ts.map +0 -1
  51. package/dist/bindings/storage.d.ts +0 -164
  52. package/dist/bindings/storage.d.ts.map +0 -1
  53. package/dist/bindings/vault.d.ts +0 -65
  54. package/dist/bindings/vault.d.ts.map +0 -1
  55. package/dist/bindings/worker.d.ts +0 -72
  56. package/dist/bindings/worker.d.ts.map +0 -1
  57. package/dist/channel.d.ts +0 -39
  58. package/dist/channel.d.ts.map +0 -1
  59. package/dist/checksum.js +0 -6176
  60. package/dist/commands/client.d.ts +0 -47
  61. package/dist/commands/client.d.ts.map +0 -1
  62. package/dist/commands/errors.d.ts +0 -198
  63. package/dist/commands/errors.d.ts.map +0 -1
  64. package/dist/commands/index.d.ts +0 -23
  65. package/dist/commands/index.d.ts.map +0 -1
  66. package/dist/commands/index.js +0 -387
  67. package/dist/commands/types.d.ts +0 -40
  68. package/dist/commands/types.d.ts.map +0 -1
  69. package/dist/commands.d.ts +0 -55
  70. package/dist/commands.d.ts.map +0 -1
  71. package/dist/context.d.ts +0 -182
  72. package/dist/context.d.ts.map +0 -1
  73. package/dist/dist-cjs.js +0 -15258
  74. package/dist/dist2.js +0 -1239
  75. package/dist/errors.d.ts +0 -359
  76. package/dist/errors.d.ts.map +0 -1
  77. package/dist/es5.js +0 -1720
  78. package/dist/esm.js +0 -18068
  79. package/dist/esm2.js +0 -3166
  80. package/dist/event-streams.js +0 -770
  81. package/dist/events.d.ts +0 -163
  82. package/dist/events.d.ts.map +0 -1
  83. package/dist/generated/artifact_registry.d.ts +0 -302
  84. package/dist/generated/artifact_registry.d.ts.map +0 -1
  85. package/dist/generated/build.d.ts +0 -184
  86. package/dist/generated/build.d.ts.map +0 -1
  87. package/dist/generated/container.d.ts +0 -101
  88. package/dist/generated/container.d.ts.map +0 -1
  89. package/dist/generated/control.d.ts.map +0 -1
  90. package/dist/generated/google/protobuf/duration.d.ts.map +0 -1
  91. package/dist/generated/google/protobuf/timestamp.d.ts.map +0 -1
  92. package/dist/generated/kv.d.ts +0 -182
  93. package/dist/generated/kv.d.ts.map +0 -1
  94. package/dist/generated/queue.d.ts +0 -127
  95. package/dist/generated/queue.d.ts.map +0 -1
  96. package/dist/generated/service_account.d.ts +0 -112
  97. package/dist/generated/service_account.d.ts.map +0 -1
  98. package/dist/generated/storage.d.ts +0 -784
  99. package/dist/generated/storage.d.ts.map +0 -1
  100. package/dist/generated/vault.d.ts +0 -107
  101. package/dist/generated/vault.d.ts.map +0 -1
  102. package/dist/generated/wait_until.d.ts.map +0 -1
  103. package/dist/generated/worker.d.ts +0 -107
  104. package/dist/generated/worker.d.ts.map +0 -1
  105. package/dist/global.d.ts +0 -208
  106. package/dist/global.d.ts.map +0 -1
  107. package/dist/grpc-utils.d.ts +0 -25
  108. package/dist/grpc-utils.d.ts.map +0 -1
  109. package/dist/jws.js +0 -611
  110. package/dist/open.js +0 -461
  111. package/dist/rolldown-runtime.js +0 -44
  112. package/dist/src2.js +0 -114032
  113. package/dist/types.d.ts +0 -337
  114. package/dist/types.d.ts.map +0 -1
  115. package/dist/wait-until.d.ts +0 -115
  116. package/dist/wait-until.d.ts.map +0 -1
  117. package/scripts/generate-proto.sh +0 -46
  118. package/src/bindings/AGENTS.md +0 -105
  119. package/src/bindings/artifact-registry.ts +0 -317
  120. package/src/bindings/build.ts +0 -195
  121. package/src/bindings/index.ts +0 -13
  122. package/src/bindings/kv.ts +0 -240
  123. package/src/bindings/postgres.test.ts +0 -17
  124. package/src/bindings/postgres.ts +0 -446
  125. package/src/bindings/queue.ts +0 -191
  126. package/src/bindings/service-account.ts +0 -113
  127. package/src/bindings/storage.ts +0 -536
  128. package/src/bindings/vault.ts +0 -133
  129. package/src/bindings/worker.ts +0 -164
  130. package/src/channel.ts +0 -102
  131. package/src/commands/client.ts +0 -446
  132. package/src/commands/errors.ts +0 -126
  133. package/src/commands/index.ts +0 -41
  134. package/src/commands/types.ts +0 -52
  135. package/src/commands.ts +0 -76
  136. package/src/context.ts +0 -368
  137. package/src/errors.ts +0 -280
  138. package/src/events.ts +0 -511
  139. package/src/generated/artifact_registry.ts +0 -2096
  140. package/src/generated/build.ts +0 -1311
  141. package/src/generated/container.ts +0 -503
  142. package/src/generated/control.ts +0 -2018
  143. package/src/generated/google/protobuf/duration.ts +0 -196
  144. package/src/generated/google/protobuf/timestamp.ts +0 -226
  145. package/src/generated/kv.ts +0 -1169
  146. package/src/generated/queue.ts +0 -753
  147. package/src/generated/service_account.ts +0 -814
  148. package/src/generated/storage.ts +0 -3820
  149. package/src/generated/vault.ts +0 -543
  150. package/src/generated/wait_until.ts +0 -829
  151. package/src/generated/worker.ts +0 -759
  152. package/src/global.ts +0 -287
  153. package/src/grpc-utils.ts +0 -159
  154. package/src/index.ts +0 -160
  155. package/src/types.ts +0 -397
  156. package/src/wait-until.ts +0 -273
  157. package/tsconfig.json +0 -8
  158. package/tsdown.config.ts +0 -17
  159. /package/dist/{generated → worker-runtime/generated}/google/protobuf/duration.d.ts +0 -0
  160. /package/dist/{generated → worker-runtime/generated}/google/protobuf/timestamp.d.ts +0 -0
@@ -1,784 +0,0 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- import type { CallContext, CallOptions } from "nice-grpc-common";
3
- export declare const protobufPackage = "alien_bindings.storage";
4
- /**
5
- * Defines the behavior for a put operation if the object already exists.
6
- * Maps to object_store::PutMode.
7
- */
8
- export declare enum StoragePutModeEnum {
9
- /**
10
- * PUT_MODE_OVERWRITE - Overwrites the object if it exists. This is the default behavior.
11
- * Maps to object_store::PutMode::Overwrite.
12
- */
13
- PUT_MODE_OVERWRITE = 0,
14
- /**
15
- * PUT_MODE_CREATE - Fails the operation if the object already exists.
16
- * Maps to object_store::PutMode::Create.
17
- */
18
- PUT_MODE_CREATE = 1,
19
- /**
20
- * PUT_MODE_UPDATE - Updates the object only if the provided version details match the existing object's version.
21
- * Requires `update_version_details` in `StoragePutOptions`.
22
- * Maps to object_store::PutMode::Update.
23
- */
24
- PUT_MODE_UPDATE = 2,
25
- UNRECOGNIZED = -1
26
- }
27
- export declare function storagePutModeEnumFromJSON(object: any): StoragePutModeEnum;
28
- export declare function storagePutModeEnumToJSON(object: StoragePutModeEnum): string;
29
- /** HTTP method for signed URL requests. */
30
- export declare enum StorageHttpMethod {
31
- HTTP_METHOD_GET = 0,
32
- HTTP_METHOD_PUT = 1,
33
- HTTP_METHOD_POST = 2,
34
- HTTP_METHOD_DELETE = 3,
35
- HTTP_METHOD_HEAD = 4,
36
- UNRECOGNIZED = -1
37
- }
38
- export declare function storageHttpMethodFromJSON(object: any): StorageHttpMethod;
39
- export declare function storageHttpMethodToJSON(object: StorageHttpMethod): string;
40
- /**
41
- * Represents a byte range for a get operation.
42
- * Maps to std::ops::Range<usize> within object_store::GetRange::Bounded.
43
- */
44
- export interface StorageRange {
45
- /**
46
- * Start of the range (inclusive), 0-indexed.
47
- * Maps to the start of std::ops::Range<usize>.
48
- */
49
- start: number;
50
- /**
51
- * End of the range (exclusive), 0-indexed.
52
- * Maps to the end of std::ops::Range<usize>.
53
- */
54
- end: number;
55
- }
56
- /** Specifies a range for a get operation, mapping to object_store::GetRange. */
57
- export interface StorageGetRangeOption {
58
- /**
59
- * A specific bounded range (e.g., bytes 0-99).
60
- * Corresponds to object_store::GetRange::Bounded(start..end).
61
- */
62
- bounded?: StorageRange | undefined;
63
- /**
64
- * A range starting from an offset relative to the beginning of the object.
65
- * Corresponds to object_store::GetRange::Offset(offset).
66
- */
67
- offsetFromStart?: number | undefined;
68
- /**
69
- * A range representing a suffix of the object with a specific length.
70
- * Corresponds to object_store::GetRange::Suffix(length).
71
- */
72
- suffixLength?: number | undefined;
73
- }
74
- /** Options for a get operation, mapping to object_store::GetOptions. */
75
- export interface StorageGetOptions {
76
- /**
77
- * Succeeds if the object's ETag matches this value.
78
- * Maps to object_store::GetOptions::if_match.
79
- */
80
- ifMatch?: string | undefined;
81
- /**
82
- * Succeeds if the object's ETag does not match this value.
83
- * Maps to object_store::GetOptions::if_none_match.
84
- */
85
- ifNoneMatch?: string | undefined;
86
- /**
87
- * Succeeds if the object has been modified since this timestamp.
88
- * Maps to object_store::GetOptions::if_modified_since.
89
- */
90
- ifModifiedSince?: Date | undefined;
91
- /**
92
- * Succeeds if the object has not been modified since this timestamp.
93
- * Maps to object_store::GetOptions::if_unmodified_since.
94
- */
95
- ifUnmodifiedSince?: Date | undefined;
96
- /**
97
- * Specifies a byte range to retrieve.
98
- * Maps to object_store::GetOptions::range.
99
- */
100
- range?: StorageGetRangeOption | undefined;
101
- /**
102
- * Retrieves a specific version of the object, if versioning is supported.
103
- * Maps to object_store::GetOptions::version.
104
- */
105
- version?: string | undefined;
106
- /**
107
- * If true, only metadata is fetched (like a HEAD request), not the content.
108
- * Maps to object_store::GetOptions::head.
109
- */
110
- head: boolean;
111
- }
112
- /**
113
- * Specifies version details (ETag and/or version ID) for conditional updates.
114
- * Maps to object_store::UpdateVersion.
115
- */
116
- export interface StorageUpdateVersion {
117
- /**
118
- * The ETag of the object version to update.
119
- * Maps to object_store::UpdateVersion::e_tag.
120
- */
121
- eTag?: string | undefined;
122
- /**
123
- * The version ID of the object version to update.
124
- * Maps to object_store::UpdateVersion::version.
125
- */
126
- version?: string | undefined;
127
- }
128
- /**
129
- * Represents a single tag (key-value pair).
130
- * Maps to a key-value pair within object_store::TagSet.
131
- */
132
- export interface StorageTag {
133
- /** The tag key. */
134
- key: string;
135
- /** The tag value. */
136
- value: string;
137
- }
138
- /**
139
- * A collection of tags.
140
- * Maps to object_store::TagSet.
141
- */
142
- export interface StorageTagSet {
143
- /** List of tags. */
144
- tags: StorageTag[];
145
- }
146
- /**
147
- * Represents a key-value pair for an object attribute.
148
- * Used to construct an object_store::Attributes map.
149
- */
150
- export interface StorageAttributeKeyValuePair {
151
- /**
152
- * The attribute key.
153
- * Standard keys map to specific object_store::Attribute variants:
154
- * - "content-disposition" -> object_store::Attribute::ContentDisposition
155
- * - "content-encoding" -> object_store::Attribute::ContentEncoding
156
- * - "content-language" -> object_store::Attribute::ContentLanguage
157
- * - "content-type" -> object_store::Attribute::ContentType
158
- * - "cache-control" -> object_store::Attribute::CacheControl
159
- * User-defined metadata keys must be prefixed with "metadata:".
160
- * For example, "metadata:my_custom_key" will be mapped to
161
- * object_store::Attribute::Metadata("my_custom_key").
162
- */
163
- key: string;
164
- /**
165
- * The attribute value.
166
- * Maps to object_store::AttributeValue.
167
- */
168
- value: string;
169
- }
170
- /** Represents a single HTTP header required by a signed URL request. */
171
- export interface StorageHttpHeader {
172
- /** Header name. */
173
- key: string;
174
- /** Header value. */
175
- value: string;
176
- }
177
- /**
178
- * A collection of storage attributes.
179
- * Maps to object_store::Attributes.
180
- */
181
- export interface StorageAttributesMap {
182
- /** List of attribute key-value pairs. */
183
- pairs: StorageAttributeKeyValuePair[];
184
- }
185
- /**
186
- * Options for non-streaming put (put_opts).
187
- * Maps to object_store::PutOptions.
188
- */
189
- export interface StoragePutOptions {
190
- /**
191
- * Specifies the behavior if the object already exists or if a specific version should be updated.
192
- * Defaults to PUT_MODE_OVERWRITE.
193
- * Maps to object_store::PutOptions::mode.
194
- */
195
- mode: StoragePutModeEnum;
196
- /**
197
- * Details for conditional updates based on ETag or version.
198
- * Only used if mode is PUT_MODE_UPDATE.
199
- * Maps to the argument of object_store::PutMode::Update.
200
- */
201
- updateVersionDetails?: StorageUpdateVersion | undefined;
202
- /**
203
- * A set of tags to associate with the object.
204
- * Maps to object_store::PutOptions::tags.
205
- */
206
- tags?: StorageTagSet | undefined;
207
- /**
208
- * Additional object attributes (e.g., Content-Type, Cache-Control, custom metadata).
209
- * Maps to object_store::PutOptions::attributes.
210
- */
211
- attributes?: StorageAttributesMap | undefined;
212
- }
213
- /**
214
- * Options for streaming put (put_multipart_opts).
215
- * Maps to object_store::PutMultipartOpts.
216
- */
217
- export interface StoragePutMultipartOptions {
218
- /**
219
- * A set of tags to associate with the object during a multipart upload.
220
- * Maps to object_store::PutMultipartOpts::tags.
221
- */
222
- tags?: StorageTagSet | undefined;
223
- /**
224
- * Additional object attributes (e.g., Content-Type, Cache-Control, custom metadata)
225
- * for a multipart upload. Maps to object_store::PutMultipartOpts::attributes.
226
- */
227
- attributes?: StorageAttributesMap | undefined;
228
- }
229
- /**
230
- * StorageGet (replaces old StorageGet)
231
- * Request for retrieving an object from storage.
232
- */
233
- export interface StorageGetRequest {
234
- /** Name of the storage binding to use. */
235
- bindingName: string;
236
- /**
237
- * Path to the object within the binding.
238
- * Maps to object_store::path::Path.
239
- */
240
- path: string;
241
- /**
242
- * Optional parameters for the get operation.
243
- * Maps to object_store::GetOptions.
244
- */
245
- options?: StorageGetOptions | undefined;
246
- }
247
- /** New message for Get RPC stream */
248
- export interface GetResponsePart {
249
- /** First message in the stream */
250
- metadata?: StorageObjectMeta | undefined;
251
- /** Subsequent data chunks */
252
- chunkData?: Uint8Array | undefined;
253
- }
254
- /**
255
- * StoragePutMultipart (replaces old StoragePutStream)
256
- * A request part for a streaming multipart put operation.
257
- * Can be either metadata (first message) or a data chunk.
258
- */
259
- export interface StoragePutMultipartChunkRequest {
260
- /** Metadata for the streaming put, must be the first message in the stream. */
261
- metadata?: StoragePutMultipartMetadata | undefined;
262
- /**
263
- * A chunk of the object's data for a part of the multipart upload.
264
- * Corresponds to data passed to object_store::MultipartUpload::put_part.
265
- */
266
- chunkData?: Uint8Array | undefined;
267
- }
268
- /** Metadata for a streaming multipart put operation. */
269
- export interface StoragePutMultipartMetadata {
270
- /** Name of the storage binding to use. */
271
- bindingName: string;
272
- /**
273
- * Path where the object will be stored.
274
- * Maps to object_store::path::Path.
275
- */
276
- path: string;
277
- /**
278
- * Optional parameters for the multipart put operation.
279
- * Maps to object_store::PutMultipartOpts.
280
- */
281
- options?: StoragePutMultipartOptions | undefined;
282
- }
283
- /**
284
- * Response for a put operation (both simple and streaming).
285
- * Maps to object_store::PutResult.
286
- */
287
- export interface StoragePutResponse {
288
- /**
289
- * The ETag of the uploaded object, if available.
290
- * Maps to object_store::PutResult::e_tag.
291
- */
292
- eTag?: string | undefined;
293
- /**
294
- * The version ID of the uploaded object, if versioning is supported and available.
295
- * Maps to object_store::PutResult::version.
296
- */
297
- version?: string | undefined;
298
- }
299
- /**
300
- * StoragePut (replaces old StoragePutSimple)
301
- * Request for uploading an object in a single message.
302
- */
303
- export interface StoragePutRequest {
304
- /** Name of the storage binding to use. */
305
- bindingName: string;
306
- /**
307
- * Path where the object will be stored.
308
- * Maps to object_store::path::Path.
309
- */
310
- path: string;
311
- /**
312
- * The entire object data.
313
- * Maps to object_store::PutPayload.
314
- */
315
- data: Uint8Array;
316
- /**
317
- * Optional parameters for the put operation.
318
- * Maps to object_store::PutOptions.
319
- */
320
- options?: StoragePutOptions | undefined;
321
- }
322
- /**
323
- * StorageDelete
324
- * Request for deleting an object from storage.
325
- */
326
- export interface StorageDeleteRequest {
327
- /** Name of the storage binding to use. */
328
- bindingName: string;
329
- /**
330
- * Path to the object to delete.
331
- * Maps to object_store::path::Path.
332
- */
333
- path: string;
334
- }
335
- /** Generic response for operations that don't return specific data on success (e.g., Delete, Copy, Rename). */
336
- export interface StorageOperationResponse {
337
- }
338
- /**
339
- * StorageList
340
- * Request for listing objects in a storage binding.
341
- */
342
- export interface StorageListRequest {
343
- /** Name of the storage binding to use. */
344
- bindingName: string;
345
- /**
346
- * Optional prefix to filter listed objects. Only objects whose paths start with this prefix will be returned.
347
- * Maps to the `prefix` argument in object_store::ObjectStore::list.
348
- */
349
- prefix?: string | undefined;
350
- /**
351
- * Optional offset for pagination. If provided, listing will start after this object path.
352
- * Maps to the `offset` argument in object_store::ObjectStore::list_with_offset.
353
- */
354
- offset?: string | undefined;
355
- }
356
- /**
357
- * Metadata for a single object in storage.
358
- * Maps to object_store::ObjectMeta.
359
- */
360
- export interface StorageObjectMeta {
361
- /**
362
- * The full path (location) of the object.
363
- * Maps to object_store::ObjectMeta::location.
364
- */
365
- location: string;
366
- /**
367
- * Timestamp of the last modification.
368
- * Maps to object_store::ObjectMeta::last_modified.
369
- */
370
- lastModified: Date | undefined;
371
- /**
372
- * Size of the object in bytes.
373
- * Maps to object_store::ObjectMeta::size.
374
- */
375
- size: number;
376
- /**
377
- * The ETag of the object, if available.
378
- * Maps to object_store::ObjectMeta::e_tag.
379
- */
380
- eTag?: string | undefined;
381
- /**
382
- * The version ID of the object, if versioning is supported and available.
383
- * Maps to object_store::ObjectMeta::version.
384
- */
385
- version?: string | undefined;
386
- }
387
- /**
388
- * StorageListWithDelimiter
389
- * Request for listing objects and common prefixes (simulating directories).
390
- */
391
- export interface StorageListWithDelimiterRequest {
392
- /** Name of the storage binding to use. */
393
- bindingName: string;
394
- /**
395
- * Optional prefix to filter listed objects and common prefixes.
396
- * Maps to the `prefix` argument in object_store::ObjectStore::list_with_delimiter.
397
- */
398
- prefix?: string | undefined;
399
- }
400
- /**
401
- * Result of a list operation with a delimiter.
402
- * Maps to object_store::ListResult.
403
- */
404
- export interface StorageListResultProto {
405
- /**
406
- * List of common prefixes (simulating directories) found under the specified prefix.
407
- * Maps to object_store::ListResult::common_prefixes.
408
- */
409
- commonPrefixes: string[];
410
- /**
411
- * List of object metadata found under the specified prefix (excluding those within common_prefixes).
412
- * Maps to object_store::ListResult::objects.
413
- */
414
- objects: StorageObjectMeta[];
415
- }
416
- /**
417
- * StorageHead
418
- * Request for retrieving metadata of an object.
419
- */
420
- export interface StorageHeadRequest {
421
- /** Name of the storage binding to use. */
422
- bindingName: string;
423
- /**
424
- * Path to the object.
425
- * Maps to object_store::path::Path.
426
- */
427
- path: string;
428
- }
429
- /**
430
- * StorageGetBaseDir
431
- * Request for getting the base directory of a storage binding. (Alien specific)
432
- */
433
- export interface StorageGetBaseDirRequest {
434
- /** Name of the storage binding. */
435
- bindingName: string;
436
- }
437
- /** Response containing the base directory path. (Alien specific) */
438
- export interface StorageGetBaseDirResponse {
439
- /** The base directory path. */
440
- path: string;
441
- }
442
- /**
443
- * StorageGetUrl
444
- * Request for getting the underlying URL of a storage binding. (Alien specific)
445
- */
446
- export interface StorageGetUrlRequest {
447
- /** Name of the storage binding. */
448
- bindingName: string;
449
- }
450
- /** Response containing the URL. (Alien specific) */
451
- export interface StorageGetUrlResponse {
452
- /** The underlying URL. */
453
- url: string;
454
- }
455
- /**
456
- * StorageCopy & StorageRename
457
- * Request for copying an object.
458
- */
459
- export interface StorageCopyRequest {
460
- /** Name of the storage binding to use (operation is within the same binding). */
461
- bindingName: string;
462
- /**
463
- * Path of the source object.
464
- * Maps to object_store::path::Path.
465
- */
466
- fromPath: string;
467
- /**
468
- * Path of the destination object.
469
- * Maps to object_store::path::Path.
470
- */
471
- toPath: string;
472
- }
473
- /** Request for renaming (moving) an object. */
474
- export interface StorageRenameRequest {
475
- /** Name of the storage binding to use (operation is within the same binding). */
476
- bindingName: string;
477
- /**
478
- * Path of the source object.
479
- * Maps to object_store::path::Path.
480
- */
481
- fromPath: string;
482
- /**
483
- * Path of the destination object.
484
- * Maps to object_store::path::Path.
485
- */
486
- toPath: string;
487
- }
488
- /**
489
- * StorageSignedUrlRequest
490
- * Request for generating a signed URL for an object.
491
- */
492
- export interface StorageSignedUrlRequest {
493
- /** Name of the storage binding to use. */
494
- bindingName: string;
495
- /**
496
- * Path to the object within the binding.
497
- * Maps to object_store::path::Path.
498
- */
499
- path: string;
500
- /** HTTP method for the signed URL. */
501
- httpMethod: StorageHttpMethod;
502
- /** Expiration time for the signed URL. */
503
- expirationTime: Date | undefined;
504
- }
505
- /**
506
- * StorageSignedUrlResponse
507
- * Response containing the generated signed URL.
508
- */
509
- export interface StorageSignedUrlResponse {
510
- /** The generated signed URL. */
511
- url: string;
512
- /** Headers that must be included when executing the signed request. */
513
- headers: StorageHttpHeader[];
514
- }
515
- export declare const StorageRange: MessageFns<StorageRange>;
516
- export declare const StorageGetRangeOption: MessageFns<StorageGetRangeOption>;
517
- export declare const StorageGetOptions: MessageFns<StorageGetOptions>;
518
- export declare const StorageUpdateVersion: MessageFns<StorageUpdateVersion>;
519
- export declare const StorageTag: MessageFns<StorageTag>;
520
- export declare const StorageTagSet: MessageFns<StorageTagSet>;
521
- export declare const StorageAttributeKeyValuePair: MessageFns<StorageAttributeKeyValuePair>;
522
- export declare const StorageHttpHeader: MessageFns<StorageHttpHeader>;
523
- export declare const StorageAttributesMap: MessageFns<StorageAttributesMap>;
524
- export declare const StoragePutOptions: MessageFns<StoragePutOptions>;
525
- export declare const StoragePutMultipartOptions: MessageFns<StoragePutMultipartOptions>;
526
- export declare const StorageGetRequest: MessageFns<StorageGetRequest>;
527
- export declare const GetResponsePart: MessageFns<GetResponsePart>;
528
- export declare const StoragePutMultipartChunkRequest: MessageFns<StoragePutMultipartChunkRequest>;
529
- export declare const StoragePutMultipartMetadata: MessageFns<StoragePutMultipartMetadata>;
530
- export declare const StoragePutResponse: MessageFns<StoragePutResponse>;
531
- export declare const StoragePutRequest: MessageFns<StoragePutRequest>;
532
- export declare const StorageDeleteRequest: MessageFns<StorageDeleteRequest>;
533
- export declare const StorageOperationResponse: MessageFns<StorageOperationResponse>;
534
- export declare const StorageListRequest: MessageFns<StorageListRequest>;
535
- export declare const StorageObjectMeta: MessageFns<StorageObjectMeta>;
536
- export declare const StorageListWithDelimiterRequest: MessageFns<StorageListWithDelimiterRequest>;
537
- export declare const StorageListResultProto: MessageFns<StorageListResultProto>;
538
- export declare const StorageHeadRequest: MessageFns<StorageHeadRequest>;
539
- export declare const StorageGetBaseDirRequest: MessageFns<StorageGetBaseDirRequest>;
540
- export declare const StorageGetBaseDirResponse: MessageFns<StorageGetBaseDirResponse>;
541
- export declare const StorageGetUrlRequest: MessageFns<StorageGetUrlRequest>;
542
- export declare const StorageGetUrlResponse: MessageFns<StorageGetUrlResponse>;
543
- export declare const StorageCopyRequest: MessageFns<StorageCopyRequest>;
544
- export declare const StorageRenameRequest: MessageFns<StorageRenameRequest>;
545
- export declare const StorageSignedUrlRequest: MessageFns<StorageSignedUrlRequest>;
546
- export declare const StorageSignedUrlResponse: MessageFns<StorageSignedUrlResponse>;
547
- /** Service to interact with Storage bindings. */
548
- export type StorageServiceDefinition = typeof StorageServiceDefinition;
549
- export declare const StorageServiceDefinition: {
550
- readonly name: "StorageService";
551
- readonly fullName: "alien_bindings.storage.StorageService";
552
- readonly methods: {
553
- /**
554
- * Retrieves data for a given object in a storage binding, with options.
555
- * The first part of the stream will be GetResponsePart.Metadata, followed by GetResponsePart.ChunkData.
556
- */
557
- readonly get: {
558
- readonly name: "Get";
559
- readonly requestType: typeof StorageGetRequest;
560
- readonly requestStream: false;
561
- readonly responseType: typeof GetResponsePart;
562
- readonly responseStream: true;
563
- readonly options: {};
564
- };
565
- /**
566
- * Uploads data to a storage binding using a stream.
567
- * The first chunk in the stream must be metadata including PutMultipartOptions.
568
- */
569
- readonly putMultipart: {
570
- readonly name: "PutMultipart";
571
- readonly requestType: typeof StoragePutMultipartChunkRequest;
572
- readonly requestStream: true;
573
- readonly responseType: typeof StoragePutResponse;
574
- readonly responseStream: false;
575
- readonly options: {};
576
- };
577
- /** Uploads data to a storage binding in a single message, with PutOptions. */
578
- readonly put: {
579
- readonly name: "Put";
580
- readonly requestType: typeof StoragePutRequest;
581
- readonly requestStream: false;
582
- readonly responseType: typeof StoragePutResponse;
583
- readonly responseStream: false;
584
- readonly options: {};
585
- };
586
- /** Deletes an object from a storage binding. */
587
- readonly delete: {
588
- readonly name: "Delete";
589
- readonly requestType: typeof StorageDeleteRequest;
590
- readonly requestStream: false;
591
- readonly responseType: typeof StorageOperationResponse;
592
- readonly responseStream: false;
593
- readonly options: {};
594
- };
595
- /**
596
- * Lists objects in a storage binding, optionally filtered by a prefix and offset.
597
- * Returns a stream of object metadata.
598
- */
599
- readonly list: {
600
- readonly name: "List";
601
- readonly requestType: typeof StorageListRequest;
602
- readonly requestStream: false;
603
- readonly responseType: typeof StorageObjectMeta;
604
- readonly responseStream: true;
605
- readonly options: {};
606
- };
607
- /** Lists objects and common prefixes (directories) with a delimiter. */
608
- readonly listWithDelimiter: {
609
- readonly name: "ListWithDelimiter";
610
- readonly requestType: typeof StorageListWithDelimiterRequest;
611
- readonly requestStream: false;
612
- readonly responseType: typeof StorageListResultProto;
613
- readonly responseStream: false;
614
- readonly options: {};
615
- };
616
- /** Retrieves metadata for an object in a storage binding. */
617
- readonly head: {
618
- readonly name: "Head";
619
- readonly requestType: typeof StorageHeadRequest;
620
- readonly requestStream: false;
621
- readonly responseType: typeof StorageObjectMeta;
622
- readonly responseStream: false;
623
- readonly options: {};
624
- };
625
- /** Gets the base directory path for a storage binding. */
626
- readonly getBaseDir: {
627
- readonly name: "GetBaseDir";
628
- readonly requestType: typeof StorageGetBaseDirRequest;
629
- readonly requestStream: false;
630
- readonly responseType: typeof StorageGetBaseDirResponse;
631
- readonly responseStream: false;
632
- readonly options: {};
633
- };
634
- /** Gets the underlying URL for a storage binding. */
635
- readonly getUrl: {
636
- readonly name: "GetUrl";
637
- readonly requestType: typeof StorageGetUrlRequest;
638
- readonly requestStream: false;
639
- readonly responseType: typeof StorageGetUrlResponse;
640
- readonly responseStream: false;
641
- readonly options: {};
642
- };
643
- /** Copies an object within the same storage binding. */
644
- readonly copy: {
645
- readonly name: "Copy";
646
- readonly requestType: typeof StorageCopyRequest;
647
- readonly requestStream: false;
648
- readonly responseType: typeof StorageOperationResponse;
649
- readonly responseStream: false;
650
- readonly options: {};
651
- };
652
- /** Renames (moves) an object within the same storage binding. */
653
- readonly rename: {
654
- readonly name: "Rename";
655
- readonly requestType: typeof StorageRenameRequest;
656
- readonly requestStream: false;
657
- readonly responseType: typeof StorageOperationResponse;
658
- readonly responseStream: false;
659
- readonly options: {};
660
- };
661
- /** Copies an object if the destination does not exist. */
662
- readonly copyIfNotExists: {
663
- readonly name: "CopyIfNotExists";
664
- readonly requestType: typeof StorageCopyRequest;
665
- readonly requestStream: false;
666
- readonly responseType: typeof StorageOperationResponse;
667
- readonly responseStream: false;
668
- readonly options: {};
669
- };
670
- /** Renames (moves) an object if the destination does not exist. */
671
- readonly renameIfNotExists: {
672
- readonly name: "RenameIfNotExists";
673
- readonly requestType: typeof StorageRenameRequest;
674
- readonly requestStream: false;
675
- readonly responseType: typeof StorageOperationResponse;
676
- readonly responseStream: false;
677
- readonly options: {};
678
- };
679
- /** Generates a signed URL for an object that allows access without authentication. */
680
- readonly signedUrl: {
681
- readonly name: "SignedUrl";
682
- readonly requestType: typeof StorageSignedUrlRequest;
683
- readonly requestStream: false;
684
- readonly responseType: typeof StorageSignedUrlResponse;
685
- readonly responseStream: false;
686
- readonly options: {};
687
- };
688
- };
689
- };
690
- export interface StorageServiceImplementation<CallContextExt = {}> {
691
- /**
692
- * Retrieves data for a given object in a storage binding, with options.
693
- * The first part of the stream will be GetResponsePart.Metadata, followed by GetResponsePart.ChunkData.
694
- */
695
- get(request: StorageGetRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<GetResponsePart>>;
696
- /**
697
- * Uploads data to a storage binding using a stream.
698
- * The first chunk in the stream must be metadata including PutMultipartOptions.
699
- */
700
- putMultipart(request: AsyncIterable<StoragePutMultipartChunkRequest>, context: CallContext & CallContextExt): Promise<DeepPartial<StoragePutResponse>>;
701
- /** Uploads data to a storage binding in a single message, with PutOptions. */
702
- put(request: StoragePutRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StoragePutResponse>>;
703
- /** Deletes an object from a storage binding. */
704
- delete(request: StorageDeleteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageOperationResponse>>;
705
- /**
706
- * Lists objects in a storage binding, optionally filtered by a prefix and offset.
707
- * Returns a stream of object metadata.
708
- */
709
- list(request: StorageListRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<StorageObjectMeta>>;
710
- /** Lists objects and common prefixes (directories) with a delimiter. */
711
- listWithDelimiter(request: StorageListWithDelimiterRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageListResultProto>>;
712
- /** Retrieves metadata for an object in a storage binding. */
713
- head(request: StorageHeadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageObjectMeta>>;
714
- /** Gets the base directory path for a storage binding. */
715
- getBaseDir(request: StorageGetBaseDirRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageGetBaseDirResponse>>;
716
- /** Gets the underlying URL for a storage binding. */
717
- getUrl(request: StorageGetUrlRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageGetUrlResponse>>;
718
- /** Copies an object within the same storage binding. */
719
- copy(request: StorageCopyRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageOperationResponse>>;
720
- /** Renames (moves) an object within the same storage binding. */
721
- rename(request: StorageRenameRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageOperationResponse>>;
722
- /** Copies an object if the destination does not exist. */
723
- copyIfNotExists(request: StorageCopyRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageOperationResponse>>;
724
- /** Renames (moves) an object if the destination does not exist. */
725
- renameIfNotExists(request: StorageRenameRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageOperationResponse>>;
726
- /** Generates a signed URL for an object that allows access without authentication. */
727
- signedUrl(request: StorageSignedUrlRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageSignedUrlResponse>>;
728
- }
729
- export interface StorageServiceClient<CallOptionsExt = {}> {
730
- /**
731
- * Retrieves data for a given object in a storage binding, with options.
732
- * The first part of the stream will be GetResponsePart.Metadata, followed by GetResponsePart.ChunkData.
733
- */
734
- get(request: DeepPartial<StorageGetRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<GetResponsePart>;
735
- /**
736
- * Uploads data to a storage binding using a stream.
737
- * The first chunk in the stream must be metadata including PutMultipartOptions.
738
- */
739
- putMultipart(request: AsyncIterable<DeepPartial<StoragePutMultipartChunkRequest>>, options?: CallOptions & CallOptionsExt): Promise<StoragePutResponse>;
740
- /** Uploads data to a storage binding in a single message, with PutOptions. */
741
- put(request: DeepPartial<StoragePutRequest>, options?: CallOptions & CallOptionsExt): Promise<StoragePutResponse>;
742
- /** Deletes an object from a storage binding. */
743
- delete(request: DeepPartial<StorageDeleteRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageOperationResponse>;
744
- /**
745
- * Lists objects in a storage binding, optionally filtered by a prefix and offset.
746
- * Returns a stream of object metadata.
747
- */
748
- list(request: DeepPartial<StorageListRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<StorageObjectMeta>;
749
- /** Lists objects and common prefixes (directories) with a delimiter. */
750
- listWithDelimiter(request: DeepPartial<StorageListWithDelimiterRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageListResultProto>;
751
- /** Retrieves metadata for an object in a storage binding. */
752
- head(request: DeepPartial<StorageHeadRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageObjectMeta>;
753
- /** Gets the base directory path for a storage binding. */
754
- getBaseDir(request: DeepPartial<StorageGetBaseDirRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageGetBaseDirResponse>;
755
- /** Gets the underlying URL for a storage binding. */
756
- getUrl(request: DeepPartial<StorageGetUrlRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageGetUrlResponse>;
757
- /** Copies an object within the same storage binding. */
758
- copy(request: DeepPartial<StorageCopyRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageOperationResponse>;
759
- /** Renames (moves) an object within the same storage binding. */
760
- rename(request: DeepPartial<StorageRenameRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageOperationResponse>;
761
- /** Copies an object if the destination does not exist. */
762
- copyIfNotExists(request: DeepPartial<StorageCopyRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageOperationResponse>;
763
- /** Renames (moves) an object if the destination does not exist. */
764
- renameIfNotExists(request: DeepPartial<StorageRenameRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageOperationResponse>;
765
- /** Generates a signed URL for an object that allows access without authentication. */
766
- signedUrl(request: DeepPartial<StorageSignedUrlRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageSignedUrlResponse>;
767
- }
768
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
769
- export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
770
- [K in keyof T]?: DeepPartial<T[K]>;
771
- } : Partial<T>;
772
- export type ServerStreamingMethodResult<Response> = {
773
- [Symbol.asyncIterator](): AsyncIterator<Response, void>;
774
- };
775
- export interface MessageFns<T> {
776
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
777
- decode(input: BinaryReader | Uint8Array, length?: number): T;
778
- fromJSON(object: any): T;
779
- toJSON(message: T): unknown;
780
- create(base?: DeepPartial<T>): T;
781
- fromPartial(object: DeepPartial<T>): T;
782
- }
783
- export {};
784
- //# sourceMappingURL=storage.d.ts.map