@domino-sdk/relay 1.0.0-next.9 → 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.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-DeKJsRry.d.ts +9112 -0
  3. package/dist/authoring.d.ts +1027 -233
  4. package/dist/authoring.js +478 -277
  5. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser-DFe7sWSN.d.ts +4154 -0
  8. package/dist/browser.d.ts +11 -2613
  9. package/dist/browser.js +8 -6
  10. package/dist/{integrations-Ba5TtqTv.d.ts → capability-error-DNMwKmlL.d.ts} +124 -76
  11. package/dist/{chunk-PHU5VDLR.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-4LBUTHD6.js → chunk-BGGKNIRP.js} +1 -1
  14. package/dist/chunk-EYH5RDIE.js +496 -0
  15. package/dist/chunk-GQKYAQM6.js +84 -0
  16. package/dist/chunk-GUP7YRR4.js +42 -0
  17. package/dist/{chunk-X2F2RAR3.js → chunk-GZ6FJAXN.js} +380 -128
  18. package/dist/chunk-JON5SESL.js +2986 -0
  19. package/dist/chunk-MC6V6VMG.js +49 -0
  20. package/dist/chunk-NPGENI7K.js +37 -0
  21. package/dist/chunk-VFHHLN6A.js +284 -0
  22. package/dist/chunk-WJSSJ7AF.js +151 -0
  23. package/dist/{chunk-7Q4BGGT6.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-P6FK43GG.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CT4-S5vc.d.ts → client-XiuFnug_.d.ts} +2161 -615
  26. package/dist/{submission-input-0OOGaq8c.d.ts → groups-Ck-OxzjD.d.ts} +916 -1139
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/images-Dv-P5VBw.d.ts +234 -0
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -44
  32. package/dist/internal.js +43 -89
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-D3titw5B.d.ts → outcomes-kVB-Juzs.d.ts} +2157 -1448
  35. package/dist/pages-BBYD21IE.d.ts +359 -0
  36. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  37. package/dist/portal-proxy.js +22 -4
  38. package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
  39. package/dist/react/index.d.ts +3038 -1029
  40. package/dist/react/index.js +1627 -779
  41. package/dist/request-error-DWduJCGV.d.ts +62 -0
  42. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  43. package/dist/schema.d.ts +15 -4168
  44. package/dist/schema.js +310 -81
  45. package/dist/server/index.d.ts +81498 -0
  46. package/dist/server/index.js +2520 -0
  47. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  48. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  49. package/dist/vite.d.ts +1 -1
  50. package/dist/vite.js +1 -0
  51. package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
  52. package/package.json +8 -2
  53. package/dist/chunk-QR7ZA2BJ.js +0 -257
  54. package/dist/chunk-YYD4QUBO.js +0 -2348
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/images-BTgk6OmC.d.ts +0 -1564
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-Di3aLSiK.d.ts +0 -3532
@@ -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 };