You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/js-compute/index.d.ts
+70Lines changed: 70 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -306,6 +306,76 @@ export declare class Env {
306
306
get(name: string): string;
307
307
}
308
308
309
+
/**
310
+
* Class for accessing a [Fastly Object-store](https://developer.fastly.com/reference/api/object-store/).
311
+
*
312
+
* An object store is a persistent, globally consistent key-value store.
313
+
*
314
+
* **Note**: Can only be used when processing requests, not during build-time initialization.
315
+
*/
316
+
exportdeclareclassObjectStore{
317
+
/**
318
+
* Creates a new JavaScript ObjectStore object which interacts with the Fastly Object-store named `name`.
319
+
*
320
+
* @param name Name of the Fastly Object-store to interact with. A name cannot be empty, contain Control characters, or be longer than 255 characters.
321
+
*/
322
+
constructor(name: string);
323
+
/**
324
+
* Gets the value associated with the key `key` in the Object-store.
325
+
* When the key is present, a resolved Promise containing an ObjectStoreEntry will be returned which contains the associated value.
326
+
* When the key is absent, a resolved Promise containing null is returned.
327
+
* @param key The key to retrieve from within the Object-store. A key cannot:
328
+
* - Be any of the strings "", ".", or ".."
329
+
* - Start with the string ".well-known/acme-challenge/""
330
+
* - Contain any of the characters "#?*[]\n\r"
331
+
* - Be longer than 1024 characters
332
+
*/
333
+
get(key: string): Promise<ObjectStoreEntry|null>;
334
+
335
+
/**
336
+
* Write the value of `value` into the Object-store under the key `key`.
337
+
*
338
+
* Note: Object-store is eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all
339
+
* edge locations immediately and some edge locations may continue returning the previous contents associated with the key.
340
+
*
341
+
* @param key The key to associate with the value. A key cannot:
342
+
* - Be any of the strings "", ".", or ".."
343
+
* - Start with the string ".well-known/acme-challenge/""
344
+
* - Contain any of the characters "#?*[]\n\r"
345
+
* - Be longer than 1024 characters
346
+
* @param value The value to store within the Object-store.
0 commit comments