@domino-sdk/relay 1.0.0-next.8 → 1.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.
- package/README.md +1 -1
- package/dist/activity-DeKJsRry.d.ts +9112 -0
- package/dist/authoring.d.ts +1135 -285
- package/dist/authoring.js +545 -269
- package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
- package/dist/avatar.d.ts +2 -2
- package/dist/browser-DFe7sWSN.d.ts +4154 -0
- package/dist/browser.d.ts +11 -2528
- package/dist/browser.js +8 -6
- package/dist/capability-error-DNMwKmlL.d.ts +458 -0
- package/dist/{chunk-V7EZUZ3Z.js → chunk-36HTX2BM.js} +389 -169
- package/dist/chunk-6QJ3LADK.js +112 -0
- package/dist/{chunk-77H7APVD.js → chunk-BGGKNIRP.js} +1 -1
- package/dist/chunk-EYH5RDIE.js +496 -0
- package/dist/chunk-GQKYAQM6.js +84 -0
- package/dist/chunk-GUP7YRR4.js +42 -0
- package/dist/{chunk-V5R2DMGY.js → chunk-GZ6FJAXN.js} +380 -128
- package/dist/chunk-JON5SESL.js +2986 -0
- package/dist/chunk-MC6V6VMG.js +49 -0
- package/dist/chunk-NPGENI7K.js +37 -0
- package/dist/chunk-VFHHLN6A.js +284 -0
- package/dist/chunk-WJSSJ7AF.js +151 -0
- package/dist/{chunk-QBOHLT7M.js → chunk-XFMSUPNS.js} +1 -1
- package/dist/{chunk-6A6K5RUD.js → chunk-ZVIRG24J.js} +145 -42
- package/dist/{client-CK4nwt7V.d.ts → client-XiuFnug_.d.ts} +2193 -562
- package/dist/{submission-input-C9qm9ixd.d.ts → groups-Ck-OxzjD.d.ts} +919 -1142
- package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
- package/dist/{images--vZ9U0kr.d.ts → images-Dv-P5VBw.d.ts} +2 -2
- package/dist/index.d.ts +13 -9
- package/dist/index.js +17 -6
- package/dist/internal.d.ts +82 -43
- package/dist/internal.js +58 -90
- package/dist/offers-Cy-e4o5x.d.ts +431 -0
- package/dist/{pages-BzqJuI69.d.ts → outcomes-kVB-Juzs.d.ts} +2386 -1490
- package/dist/pages-BBYD21IE.d.ts +359 -0
- package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
- package/dist/portal-proxy.js +22 -4
- package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
- package/dist/react/index.d.ts +3122 -1011
- package/dist/react/index.js +1627 -779
- package/dist/request-error-DWduJCGV.d.ts +62 -0
- package/dist/schema-DfJzH2ci.d.ts +5644 -0
- package/dist/schema.d.ts +15 -4216
- package/dist/schema.js +322 -81
- package/dist/server/index.d.ts +81498 -0
- package/dist/server/index.js +2520 -0
- package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
- package/dist/submission-input-BZkm6ohU.d.ts +290 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +1 -0
- package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
- package/package.json +8 -2
- package/dist/chunk-MRIURJE3.js +0 -257
- package/dist/chunk-VARGF4JS.js +0 -1733
- package/dist/chunk-ZWY3R6B3.js +0 -26
- package/dist/collection-BGneJ6Bk.d.ts +0 -114
- package/dist/integrations-C3Sp558f.d.ts +0 -1297
- package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
- package/dist/schema-pnuWqvGn.d.ts +0 -3396
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The request-error core every Domino client error extends: the participant `RelayError` and the
|
|
3
|
+
* management client's error share these fields, so one handler serves both.
|
|
4
|
+
*
|
|
5
|
+
* `kind` says what happened:
|
|
6
|
+
*
|
|
7
|
+
* - `http`: the server answered with an error status.
|
|
8
|
+
* - `network`: the transport failed, including a response body cut off after its headers.
|
|
9
|
+
* - `timeout`: the client's deadline passed.
|
|
10
|
+
* - `aborted`: the caller cancelled the request.
|
|
11
|
+
* - `invalid-response`: a 2xx answer that is not JSON, or not the shape this SDK version expects.
|
|
12
|
+
* - `client`: the client refused the call without sending it, such as for invalid input.
|
|
13
|
+
*/
|
|
14
|
+
type RequestErrorKind = "http" | "network" | "timeout" | "aborted" | "invalid-response" | "client";
|
|
15
|
+
/**
|
|
16
|
+
* What to do when `uncertain` is true. `replay`: sending the call again with the same
|
|
17
|
+
* `operationId` is safe, because the server applies it at most once. `reconcile`: read the state
|
|
18
|
+
* first, since repeating the call could apply it twice.
|
|
19
|
+
*/
|
|
20
|
+
type RequestRecovery = "replay" | "reconcile";
|
|
21
|
+
type RequestErrorDetails = {
|
|
22
|
+
kind: RequestErrorKind;
|
|
23
|
+
/** True only when a write may have been applied. Reads are never uncertain. */
|
|
24
|
+
uncertain?: boolean;
|
|
25
|
+
/** The HTTP status, whenever response headers arrived. Never invented. */
|
|
26
|
+
status?: number;
|
|
27
|
+
/** A machine-readable code: open, so a newer server's codes are kept. */
|
|
28
|
+
code?: string;
|
|
29
|
+
/** The call's idempotency or action ID, to replay it with. */
|
|
30
|
+
operationId?: string;
|
|
31
|
+
/** Whether repeating this operation is safe. An ID alone may have no durable receipt. */
|
|
32
|
+
replaySafe?: boolean;
|
|
33
|
+
/** Milliseconds the server asked to wait before trying again (its `Retry-After`). */
|
|
34
|
+
retryAfter?: number;
|
|
35
|
+
cause?: unknown;
|
|
36
|
+
};
|
|
37
|
+
declare const requestErrorBrand: unique symbol;
|
|
38
|
+
/**
|
|
39
|
+
* Whether `value` is a `RequestError` from any copy of the SDK. Prefer it to `instanceof`, which
|
|
40
|
+
* fails when an app bundles two copies of the package.
|
|
41
|
+
*/
|
|
42
|
+
declare function isRequestError(value: unknown): value is RequestError;
|
|
43
|
+
declare class RequestError extends Error {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly [requestErrorBrand] = true;
|
|
46
|
+
readonly kind: RequestErrorKind;
|
|
47
|
+
readonly uncertain: boolean;
|
|
48
|
+
readonly status: number | undefined;
|
|
49
|
+
readonly code: string | undefined;
|
|
50
|
+
readonly operationId: string | undefined;
|
|
51
|
+
/** `replay` for a replay-safe operation ID, else `reconcile`; only when `uncertain`. */
|
|
52
|
+
readonly recovery: RequestRecovery | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Milliseconds the server asked the client to wait before trying again, from the `Retry-After`
|
|
55
|
+
* header of an error answer such as a 429 or 503. The client's own retries never wait past the
|
|
56
|
+
* call's deadline, so a longer wait is left to the caller.
|
|
57
|
+
*/
|
|
58
|
+
readonly retryAfter: number | undefined;
|
|
59
|
+
constructor(message: string, details: RequestErrorDetails);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { RequestError as R, type RequestErrorDetails as a, type RequestErrorKind as b, type RequestRecovery as c, isRequestError as i };
|