@domino-sdk/relay 1.0.0-next.13 → 1.0.0-next.15

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 (35) hide show
  1. package/README.md +1 -1
  2. package/dist/authoring.d.ts +58 -44
  3. package/dist/authoring.js +58 -45
  4. package/dist/browser.d.ts +111 -151
  5. package/dist/browser.js +6 -6
  6. package/dist/{catalog-C85V1NgW.d.ts → catalog-CVXUHxiO.d.ts} +12 -99
  7. package/dist/{chunk-M64XHC42.js → chunk-76F4LSFP.js} +2 -2
  8. package/dist/{chunk-II7DRZSL.js → chunk-CYD6QMHU.js} +1 -1
  9. package/dist/{chunk-KS33GOUL.js → chunk-EJWDAF7I.js} +4 -4
  10. package/dist/chunk-FJ6O44NE.js +51 -0
  11. package/dist/{chunk-WQ24ILGO.js → chunk-G3YSBMJH.js} +7 -3
  12. package/dist/{chunk-MNQI35OG.js → chunk-HWRBLM7E.js} +3 -3
  13. package/dist/{chunk-CRNQP7NV.js → chunk-J4OYDYJE.js} +693 -676
  14. package/dist/{chunk-OA2KMQVZ.js → chunk-J52HD4AA.js} +11 -1
  15. package/dist/{chunk-EZWNGI5B.js → chunk-RCBJBFLC.js} +4 -4
  16. package/dist/{chunk-FXYJ4OMX.js → chunk-WMTROSYF.js} +1 -1
  17. package/dist/{client-Bf9PNUIi.d.ts → client-dfXT6hhq.d.ts} +7 -47
  18. package/dist/{deployments-CNCP0JnD.d.ts → deployments-C9wkQ06n.d.ts} +109 -125
  19. package/dist/{images-BG4pdO4y.d.ts → images-CRxHUuG5.d.ts} +1 -1
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +5 -5
  22. package/dist/{integrations-EjQzIApL.d.ts → integrations-C1vB6Ry6.d.ts} +93 -1
  23. package/dist/internal.d.ts +13 -4
  24. package/dist/internal.js +10 -4
  25. package/dist/portal-proxy.js +2 -2
  26. package/dist/react/index.d.ts +441 -655
  27. package/dist/react/index.js +1190 -810
  28. package/dist/{schema-BF_TQsmT.d.ts → schema-C4F2K9cm.d.ts} +9 -74
  29. package/dist/schema.d.ts +6 -7
  30. package/dist/schema.js +18 -16
  31. package/dist/server/index.d.ts +125 -233
  32. package/dist/server/index.js +16 -22
  33. package/dist/{trackers-W7nRdRr7.d.ts → trackers-7lxSWp2g.d.ts} +56 -14
  34. package/package.json +4 -2
  35. package/dist/observations-CQ6IcNuQ.d.ts +0 -90
@@ -7,7 +7,7 @@ import {
7
7
  pointsRewardSchema,
8
8
  refuseWindowTimeZone,
9
9
  tierRewardSchema
10
- } from "./chunk-CRNQP7NV.js";
10
+ } from "./chunk-J4OYDYJE.js";
11
11
 
12
12
  // src/authoring-identity.ts
13
13
  import { z } from "zod";
@@ -265,6 +265,15 @@ var RelayError = class extends RequestError {
265
265
  this.missing = details.missing ?? [];
266
266
  }
267
267
  };
268
+ function asRelayError(cause, fallback = "Request failed") {
269
+ if (isRelayError(cause)) {
270
+ return cause;
271
+ }
272
+ return new RelayError(
273
+ cause instanceof Error && cause.message ? cause.message : fallback,
274
+ { kind: "client", cause }
275
+ );
276
+ }
268
277
  function clientError(message, code, details = {}) {
269
278
  return new RelayError(message, { ...details, kind: "client", code });
270
279
  }
@@ -939,6 +948,7 @@ export {
939
948
  RelayErrorCode,
940
949
  isRelayError,
941
950
  RelayError,
951
+ asRelayError,
942
952
  clientError,
943
953
  parseInput,
944
954
  profileVisibilitySchema,
@@ -6,7 +6,7 @@ import {
6
6
  pointLedgerReferenceSchema,
7
7
  questExperienceSchema,
8
8
  rewardDeliveriesSchema
9
- } from "./chunk-M64XHC42.js";
9
+ } from "./chunk-76F4LSFP.js";
10
10
  import {
11
11
  AVATAR_UPLOAD_LIMIT,
12
12
  RelayError,
@@ -38,14 +38,14 @@ import {
38
38
  walletSignInNetworksSchema,
39
39
  walletSignatureSchema,
40
40
  walletUnlinkInputSchema
41
- } from "./chunk-OA2KMQVZ.js";
41
+ } from "./chunk-J52HD4AA.js";
42
42
  import {
43
43
  exchangeResultSchema,
44
44
  exchangeSchema,
45
45
  memberSummarySchema,
46
46
  participantSessionSchema,
47
47
  sessionMember
48
- } from "./chunk-FXYJ4OMX.js";
48
+ } from "./chunk-WMTROSYF.js";
49
49
  import {
50
50
  accountConnectionSchema,
51
51
  attemptSchema,
@@ -70,7 +70,7 @@ import {
70
70
  tieredRewardReferenceSchema,
71
71
  validateSubmissionValue,
72
72
  valueEvidenceSchema
73
- } from "./chunk-CRNQP7NV.js";
73
+ } from "./chunk-J4OYDYJE.js";
74
74
 
75
75
  // src/submissions.ts
76
76
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  identifier
3
- } from "./chunk-CRNQP7NV.js";
3
+ } from "./chunk-J4OYDYJE.js";
4
4
 
5
5
  // src/auth.ts
6
6
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
- import { h as QuestView, J as questExperienceSchema, e as PointHistoryQuery, c as PointEntryKind } from './catalog-C85V1NgW.js';
1
+ import { h as QuestView, J as questExperienceSchema, e as PointHistoryQuery, c as PointEntryKind } from './catalog-CVXUHxiO.js';
2
2
  import { V as ValueEvidence, a as AuthProvider } from './submission-input-CccwAl5Z.js';
3
3
  import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-VnTiMXc3.js';
4
- import { b as QuizEvidence, A as Attempt, M as MemberProgress, ao as submitSchema, x as contentPerformanceQuerySchema } from './schema-BF_TQsmT.js';
4
+ import { b as QuizEvidence, A as Attempt, M as MemberProgress, ao as submitSchema, x as contentPerformanceQuerySchema } from './schema-C4F2K9cm.js';
5
5
  import { z } from 'zod';
6
6
  import { c as ParticipantSession, a as PageQuery, f as exchangeSchema } from './pages-KYK1L60W.js';
7
7
  import { a6 as referralAcceptSchema, c as LeaderboardQuery, G as engagementPageQuerySchema, s as contentQualificationQuerySchema, i as contentAdmissionQuerySchema, k as contentEnrollmentInputSchema, u as contentReleaseInputSchema } from './referrals-KQfP4pBf.js';
@@ -782,10 +782,6 @@ declare function createRelayClient(options: RelayClientOptions): {
782
782
  connections: ("google" | "apple" | "x" | "discord")[];
783
783
  trigger: {
784
784
  kind: "automatic";
785
- observation?: {
786
- source: string;
787
- type: string;
788
- } | undefined;
789
785
  content?: {
790
786
  tracker: string;
791
787
  window: {
@@ -798,7 +794,7 @@ declare function createRelayClient(options: RelayClientOptions): {
798
794
  } | undefined;
799
795
  tracker?: {
800
796
  tracker: string;
801
- source: "custom" | "x-search";
797
+ source: string;
802
798
  beneficiary: string;
803
799
  on?: "new-record" | "new-observation" | "data-changed" | undefined;
804
800
  where?: {
@@ -874,10 +870,6 @@ declare function createRelayClient(options: RelayClientOptions): {
874
870
  kind: "staff-required";
875
871
  } | {
876
872
  kind: "automatic";
877
- observation?: {
878
- source: string;
879
- type: string;
880
- } | undefined;
881
873
  } | {
882
874
  kind: "checking";
883
875
  attempt: string;
@@ -1097,10 +1089,6 @@ declare function createRelayClient(options: RelayClientOptions): {
1097
1089
  connections: ("google" | "apple" | "x" | "discord")[];
1098
1090
  trigger: {
1099
1091
  kind: "automatic";
1100
- observation?: {
1101
- source: string;
1102
- type: string;
1103
- } | undefined;
1104
1092
  content?: {
1105
1093
  tracker: string;
1106
1094
  window: {
@@ -1113,7 +1101,7 @@ declare function createRelayClient(options: RelayClientOptions): {
1113
1101
  } | undefined;
1114
1102
  tracker?: {
1115
1103
  tracker: string;
1116
- source: "custom" | "x-search";
1104
+ source: string;
1117
1105
  beneficiary: string;
1118
1106
  on?: "new-record" | "new-observation" | "data-changed" | undefined;
1119
1107
  where?: {
@@ -1189,10 +1177,6 @@ declare function createRelayClient(options: RelayClientOptions): {
1189
1177
  kind: "staff-required";
1190
1178
  } | {
1191
1179
  kind: "automatic";
1192
- observation?: {
1193
- source: string;
1194
- type: string;
1195
- } | undefined;
1196
1180
  } | {
1197
1181
  kind: "checking";
1198
1182
  attempt: string;
@@ -1358,10 +1342,6 @@ declare function createRelayClient(options: RelayClientOptions): {
1358
1342
  connections: ("google" | "apple" | "x" | "discord")[];
1359
1343
  trigger: {
1360
1344
  kind: "automatic";
1361
- observation?: {
1362
- source: string;
1363
- type: string;
1364
- } | undefined;
1365
1345
  content?: {
1366
1346
  tracker: string;
1367
1347
  window: {
@@ -1374,7 +1354,7 @@ declare function createRelayClient(options: RelayClientOptions): {
1374
1354
  } | undefined;
1375
1355
  tracker?: {
1376
1356
  tracker: string;
1377
- source: "custom" | "x-search";
1357
+ source: string;
1378
1358
  beneficiary: string;
1379
1359
  on?: "new-record" | "new-observation" | "data-changed" | undefined;
1380
1360
  where?: {
@@ -1450,10 +1430,6 @@ declare function createRelayClient(options: RelayClientOptions): {
1450
1430
  kind: "staff-required";
1451
1431
  } | {
1452
1432
  kind: "automatic";
1453
- observation?: {
1454
- source: string;
1455
- type: string;
1456
- } | undefined;
1457
1433
  } | {
1458
1434
  kind: "checking";
1459
1435
  attempt: string;
@@ -1622,10 +1598,6 @@ declare function createRelayClient(options: RelayClientOptions): {
1622
1598
  connections: ("google" | "apple" | "x" | "discord")[];
1623
1599
  trigger: {
1624
1600
  kind: "automatic";
1625
- observation?: {
1626
- source: string;
1627
- type: string;
1628
- } | undefined;
1629
1601
  content?: {
1630
1602
  tracker: string;
1631
1603
  window: {
@@ -1638,7 +1610,7 @@ declare function createRelayClient(options: RelayClientOptions): {
1638
1610
  } | undefined;
1639
1611
  tracker?: {
1640
1612
  tracker: string;
1641
- source: "custom" | "x-search";
1613
+ source: string;
1642
1614
  beneficiary: string;
1643
1615
  on?: "new-record" | "new-observation" | "data-changed" | undefined;
1644
1616
  where?: {
@@ -1714,10 +1686,6 @@ declare function createRelayClient(options: RelayClientOptions): {
1714
1686
  kind: "staff-required";
1715
1687
  } | {
1716
1688
  kind: "automatic";
1717
- observation?: {
1718
- source: string;
1719
- type: string;
1720
- } | undefined;
1721
1689
  } | {
1722
1690
  kind: "checking";
1723
1691
  attempt: string;
@@ -2121,10 +2089,6 @@ declare function createRelayClient(options: RelayClientOptions): {
2121
2089
  connections: ("google" | "apple" | "x" | "discord")[];
2122
2090
  trigger: {
2123
2091
  kind: "automatic";
2124
- observation?: {
2125
- source: string;
2126
- type: string;
2127
- } | undefined;
2128
2092
  content?: {
2129
2093
  tracker: string;
2130
2094
  window: {
@@ -2137,7 +2101,7 @@ declare function createRelayClient(options: RelayClientOptions): {
2137
2101
  } | undefined;
2138
2102
  tracker?: {
2139
2103
  tracker: string;
2140
- source: "custom" | "x-search";
2104
+ source: string;
2141
2105
  beneficiary: string;
2142
2106
  on?: "new-record" | "new-observation" | "data-changed" | undefined;
2143
2107
  where?: {
@@ -2213,10 +2177,6 @@ declare function createRelayClient(options: RelayClientOptions): {
2213
2177
  kind: "staff-required";
2214
2178
  } | {
2215
2179
  kind: "automatic";
2216
- observation?: {
2217
- source: string;
2218
- type: string;
2219
- } | undefined;
2220
2180
  } | {
2221
2181
  kind: "checking";
2222
2182
  attempt: string;