@domino-sdk/relay 1.63.0 → 1.65.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 (69) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{accounts-nz3mzfRQ.d.ts → accounts-_lNsiR2k.d.ts} +22 -2
  3. package/dist/{attempt-captures-DMi8oR9T.d.ts → attempt-captures-BqPggxTU.d.ts} +1 -1
  4. package/dist/authoring.d.ts +11 -11
  5. package/dist/authoring.js +15 -20
  6. package/dist/{automatic-outcomes-C_LLQU1p.d.ts → automatic-outcomes-BzAvfcpd.d.ts} +2 -2
  7. package/dist/browser.d.ts +9 -9
  8. package/dist/browser.js +11 -14
  9. package/dist/{catalog-BaTOKpNw.d.ts → catalog-ByZMRS7I.d.ts} +1 -1
  10. package/dist/{chunk-VWQGWGCH.js → chunk-4NIV4NPV.js} +1 -1
  11. package/dist/{chunk-ICXZZNPS.js → chunk-7H4MRVQF.js} +1 -1
  12. package/dist/{chunk-NQDEWJWE.js → chunk-CVQZ2YP7.js} +6 -232
  13. package/dist/{chunk-3RFP6GT5.js → chunk-DLABJSBO.js} +2 -2
  14. package/dist/{chunk-AQOL3SK5.js → chunk-E22XSC4L.js} +1 -1
  15. package/dist/{chunk-N4LNEGQX.js → chunk-EDNKKVGU.js} +2 -2
  16. package/dist/{chunk-GLH6MEI2.js → chunk-EOUEAOWJ.js} +28 -2
  17. package/dist/{chunk-MTKRIQEU.js → chunk-EUEW2APU.js} +1 -1
  18. package/dist/{chunk-ID3BZXFZ.js → chunk-HNR6G3GV.js} +1939 -1211
  19. package/dist/{chunk-5XLZ34PV.js → chunk-KCUUHT2V.js} +3 -3
  20. package/dist/{chunk-EHUSD3O2.js → chunk-MPTE7EIV.js} +2 -4
  21. package/dist/{chunk-QR6HH4DI.js → chunk-NG4GZ54I.js} +4 -4
  22. package/dist/chunk-R2KZFX6E.js +405 -0
  23. package/dist/{chunk-4GQW43UU.js → chunk-RD3XJ4DH.js} +26 -30
  24. package/dist/{chunk-7Z4SZ6YM.js → chunk-SE7XHQFP.js} +1 -1
  25. package/dist/{chunk-LZWXCBUB.js → chunk-VBYOAT46.js} +41 -45
  26. package/dist/{chunk-7X67QLPB.js → chunk-XVZ4YOF2.js} +1 -1
  27. package/dist/{chunk-FU5CGNTR.js → chunk-ZQ3IPCI6.js} +44 -5
  28. package/dist/chunk-ZXGBDLVB.js +1510 -0
  29. package/dist/{client-DHmG7rn6.d.ts → client-D7IiwEq2.d.ts} +12 -7
  30. package/dist/{dashboards-CLemT6kj.d.ts → dashboards-pVfclkyh.d.ts} +2 -2
  31. package/dist/{deployments-DTULi7dF.d.ts → deployments-Cr1tfqrr.d.ts} +2 -2
  32. package/dist/{identity-integration-DOeNZaxF.d.ts → identity-integration-Ci2vGKtX.d.ts} +37 -2
  33. package/dist/index.d.ts +10 -10
  34. package/dist/index.js +11 -15
  35. package/dist/internal.d.ts +12 -12
  36. package/dist/internal.js +21 -16
  37. package/dist/{limits-kNzYdZ00.d.ts → limits-pE04y9O2.d.ts} +8 -1
  38. package/dist/{offers-CYeN_I0Y.d.ts → offers-Hw2P6tcK.d.ts} +2 -2
  39. package/dist/{participant-activity-D-Drp24G.d.ts → participant-activity-DXRq4s6K.d.ts} +1 -0
  40. package/dist/portal-proxy.d.ts +4 -2
  41. package/dist/portal-proxy.js +13 -5
  42. package/dist/react/index.d.ts +20 -13
  43. package/dist/react/index.js +11 -14
  44. package/dist/{reward-deliveries-drp-x1G-.d.ts → reward-deliveries-BCV8hznc.d.ts} +1 -1
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/6EBN6IZU.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/schema.d.ts +19 -16
  50. package/dist/schema.js +109 -112
  51. package/dist/server/index.d.ts +11 -11
  52. package/dist/server/index.js +775 -1037
  53. package/dist/{sign-in-providers-B1Q9eDRm.d.ts → sign-in-providers-BAkGjSXo.d.ts} +2 -2
  54. package/dist/{submission-input-DZCbjQUH.d.ts → submission-input-ChL1aYNH.d.ts} +2 -2
  55. package/dist/{telegram-browser-NL0Asmsi.d.ts → telegram-browser-K27t4TwM.d.ts} +4 -4
  56. package/dist/telegram.d.ts +8 -8
  57. package/dist/telegram.js +2 -2
  58. package/dist/testing.d.ts +10 -10
  59. package/dist/testing.js +19 -23
  60. package/dist/{tracker-data-esm3WG8R.d.ts → tracker-data-Bl-qPIvZ.d.ts} +3 -1
  61. package/dist/{transport-Czht_irp.d.ts → transport-DC1m73Tp.d.ts} +1065 -14
  62. package/package.json +1 -1
  63. package/dist/chunk-4NOFSGAL.js +0 -320
  64. package/dist/chunk-FO2LCZTL.js +0 -19
  65. package/dist/chunk-KP2MCX3R.js +0 -587
  66. package/dist/chunk-N4BDKS6Y.js +0 -87
  67. package/dist/chunk-TLSQETTY.js +0 -41
  68. package/dist/chunk-W7YSMSGC.js +0 -725
  69. package/dist/runtime/chunks/UGDV5W4N.js +0 -1
@@ -4,10 +4,10 @@ import {
4
4
  imageFieldsSchema,
5
5
  imageInspectionSchema,
6
6
  imageSightingsSchema
7
- } from "./chunk-7X67QLPB.js";
7
+ } from "./chunk-XVZ4YOF2.js";
8
8
  import {
9
9
  photoResultSchema
10
- } from "./chunk-ID3BZXFZ.js";
10
+ } from "./chunk-HNR6G3GV.js";
11
11
 
12
12
  // src/image-results.ts
13
13
  import * as z from "zod";
@@ -31,8 +31,27 @@ var RequestError = class extends Error {
31
31
  }
32
32
  };
33
33
 
34
+ // src/definition-error.ts
35
+ function issueText(issues) {
36
+ return [
37
+ ...new Set(
38
+ issues.map(
39
+ (issue) => issue.path.length ? issue.path.map(String).join(".") + ": " + issue.message : issue.message
40
+ )
41
+ )
42
+ ].join("; ");
43
+ }
44
+ function parseDefinition(kind, schema, input) {
45
+ const parsed = schema.safeParse(input);
46
+ if (parsed.success) {
47
+ return parsed.data;
48
+ }
49
+ const key = typeof input === "object" && input !== null && "key" in input && typeof input.key === "string" ? ` "${input.key}"` : "";
50
+ parsed.error.message = `${kind}${key} is invalid: ${issueText(parsed.error.issues)}`;
51
+ throw parsed.error;
52
+ }
53
+
34
54
  // src/errors.ts
35
- import * as z from "zod";
36
55
  var RelayErrorCode = {
37
56
  /** The call needs a signed-in member. */
38
57
  NotSignedIn: "not-signed-in",
@@ -121,6 +140,11 @@ var RelayErrorCode = {
121
140
  QuestClosed: "quest-closed",
122
141
  /** An operator paused the quest. */
123
142
  QuestPaused: "quest-paused",
143
+ /**
144
+ * The member is banned from the project, so their attempts, completions and invitations are
145
+ * refused. Relay gives no reason; `me()` answers `eligible: false`.
146
+ */
147
+ MemberBanned: "member-banned",
124
148
  /** An operator locked the member's profile; hiding it is still allowed. */
125
149
  ProfileLocked: "profile-locked",
126
150
  /** No member in the project has the invitation code the member accepted. */
@@ -173,7 +197,7 @@ function parseInput(schema, value) {
173
197
  const parsed = schema.safeParse(value);
174
198
  if (!parsed.success) {
175
199
  throw clientError(
176
- z.prettifyError(parsed.error),
200
+ issueText(parsed.error.issues),
177
201
  RelayErrorCode.InvalidInput,
178
202
  { cause: parsed.error }
179
203
  );
@@ -184,6 +208,8 @@ function parseInput(schema, value) {
184
208
  export {
185
209
  isRequestError,
186
210
  RequestError,
211
+ issueText,
212
+ parseDefinition,
187
213
  RelayErrorCode,
188
214
  isRelayError,
189
215
  RelayError,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RelayErrorCode,
3
3
  clientError
4
- } from "./chunk-GLH6MEI2.js";
4
+ } from "./chunk-EOUEAOWJ.js";
5
5
 
6
6
  // src/plugin-client.ts
7
7
  var transportKey = /* @__PURE__ */ (() => /* @__PURE__ */ Symbol.for("@domino-sdk/relay:plugin-transport"))();