@functional-systems/lambdadb 0.8.1-dev.38730896042001 → 0.8.1-dev.38920138445001
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 +35 -2
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/lib/config.ts +2 -2
package/README.md
CHANGED
|
@@ -499,13 +499,46 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
499
499
|
<!-- Start Retries [retries] -->
|
|
500
500
|
## Retries
|
|
501
501
|
|
|
502
|
-
|
|
502
|
+
Retry behavior is configured by the SDK. Document write API requests use backoff
|
|
503
|
+
retries by default for HTTP `429`, all `5xx` responses (including `500`, `502`, `503`, and
|
|
504
|
+
`504`), and connection errors or transport timeouts. Per-call `retries` overrides
|
|
505
|
+
the client's `retryConfig`. The same retry settings apply to `*Safe` methods;
|
|
506
|
+
returning a Result does not disable retries.
|
|
503
507
|
|
|
504
508
|
For retryable `429` responses, the backoff implementation honors a valid
|
|
505
509
|
`Retry-After` header when present. The API does not guarantee that every `429`
|
|
506
510
|
contains this header.
|
|
507
511
|
|
|
508
|
-
|
|
512
|
+
For writes, an error does not prove that the mutation was not committed. The
|
|
513
|
+
response can be lost after a successful commit, and automatic retries can
|
|
514
|
+
reapply the write before the SDK returns an error or a successful response.
|
|
515
|
+
Retries do not provide exactly-once execution.
|
|
516
|
+
|
|
517
|
+
To inspect state before deciding whether to retry a write, disable automatic
|
|
518
|
+
retries on the initial call:
|
|
519
|
+
|
|
520
|
+
```typescript
|
|
521
|
+
import { LambdaDBClient } from "@functional-systems/lambdadb";
|
|
522
|
+
|
|
523
|
+
const client = new LambdaDBClient({
|
|
524
|
+
projectApiKey: "<YOUR_PROJECT_API_KEY>",
|
|
525
|
+
});
|
|
526
|
+
const collection = client.collection("my-collection");
|
|
527
|
+
|
|
528
|
+
await collection.docs.upsert(
|
|
529
|
+
{ docs: [{ id: "doc-1", title: "Updated title" }] },
|
|
530
|
+
{ retries: { strategy: "none" } },
|
|
531
|
+
);
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
This disables both HTTP-status and connection-error retries for that call.
|
|
535
|
+
Setting only `retryConnectionErrors: false` still allows retryable HTTP
|
|
536
|
+
responses, including `502` and `504`, to be retried. Disabling retries does not
|
|
537
|
+
cancel a server-side write or establish its outcome. After a failure, inspect
|
|
538
|
+
the target Branch state and consider the operation's semantics before issuing
|
|
539
|
+
another write. The SDK does not perform that reconciliation automatically.
|
|
540
|
+
|
|
541
|
+
To change the retry strategy for a single API call, pass `retries` in its request options:
|
|
509
542
|
```typescript
|
|
510
543
|
import { LambdaDBClient } from "@functional-systems/lambdadb";
|
|
511
544
|
|
|
@@ -37,8 +37,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
37
37
|
export declare const SDK_METADATA: {
|
|
38
38
|
readonly language: "typescript";
|
|
39
39
|
readonly openapiDocVersion: "1.1.1";
|
|
40
|
-
readonly sdkVersion: "0.8.1-dev.
|
|
40
|
+
readonly sdkVersion: "0.8.1-dev.38920138445001";
|
|
41
41
|
readonly genVersion: "2.798.0";
|
|
42
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.8.1-dev.
|
|
42
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.8.1-dev.38920138445001 2.798.0 1.1.1 @functional-systems/lambdadb";
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -37,8 +37,8 @@ function serverURLFromOptions(options) {
|
|
|
37
37
|
exports.SDK_METADATA = {
|
|
38
38
|
language: "typescript",
|
|
39
39
|
openapiDocVersion: "1.1.1",
|
|
40
|
-
sdkVersion: "0.8.1-dev.
|
|
40
|
+
sdkVersion: "0.8.1-dev.38920138445001",
|
|
41
41
|
genVersion: "2.798.0",
|
|
42
|
-
userAgent: "speakeasy-sdk/typescript 0.8.1-dev.
|
|
42
|
+
userAgent: "speakeasy-sdk/typescript 0.8.1-dev.38920138445001 2.798.0 1.1.1 @functional-systems/lambdadb",
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=config.js.map
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
37
37
|
export declare const SDK_METADATA: {
|
|
38
38
|
readonly language: "typescript";
|
|
39
39
|
readonly openapiDocVersion: "1.1.1";
|
|
40
|
-
readonly sdkVersion: "0.8.1-dev.
|
|
40
|
+
readonly sdkVersion: "0.8.1-dev.38920138445001";
|
|
41
41
|
readonly genVersion: "2.798.0";
|
|
42
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.8.1-dev.
|
|
42
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.8.1-dev.38920138445001 2.798.0 1.1.1 @functional-systems/lambdadb";
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -33,8 +33,8 @@ export function serverURLFromOptions(options) {
|
|
|
33
33
|
export const SDK_METADATA = {
|
|
34
34
|
language: "typescript",
|
|
35
35
|
openapiDocVersion: "1.1.1",
|
|
36
|
-
sdkVersion: "0.8.1-dev.
|
|
36
|
+
sdkVersion: "0.8.1-dev.38920138445001",
|
|
37
37
|
genVersion: "2.798.0",
|
|
38
|
-
userAgent: "speakeasy-sdk/typescript 0.8.1-dev.
|
|
38
|
+
userAgent: "speakeasy-sdk/typescript 0.8.1-dev.38920138445001 2.798.0 1.1.1 @functional-systems/lambdadb",
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=config.js.map
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functional-systems/lambdadb",
|
|
3
|
-
"version": "0.8.1-dev.
|
|
3
|
+
"version": "0.8.1-dev.38920138445001",
|
|
4
4
|
"author": "Functional Systems, Inc.",
|
|
5
5
|
"homepage": "https://github.com/lambdadb/lambdadb-typescript-client#readme",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -169,5 +169,5 @@
|
|
|
169
169
|
"main": "./dist/commonjs/index.js",
|
|
170
170
|
"types": "./dist/commonjs/index.d.ts",
|
|
171
171
|
"module": "./dist/esm/index.js",
|
|
172
|
-
"lambdadbSourceCommit": "
|
|
172
|
+
"lambdadbSourceCommit": "27c11355b0160930d0a71492b3069c5dd0312a60"
|
|
173
173
|
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.1.1",
|
|
76
|
-
sdkVersion: "0.8.1-dev.
|
|
76
|
+
sdkVersion: "0.8.1-dev.38920138445001",
|
|
77
77
|
genVersion: "2.798.0",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 0.8.1-dev.
|
|
79
|
+
"speakeasy-sdk/typescript 0.8.1-dev.38920138445001 2.798.0 1.1.1 @functional-systems/lambdadb",
|
|
80
80
|
} as const;
|