@domino-sdk/relay 1.14.0 → 1.15.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 (34) hide show
  1. package/dist/{request-error-D_dUPLwo.d.ts → action-DBzILFx9.d.ts} +31 -1
  2. package/dist/{attempt-captures-DZldPZJc.d.ts → attempt-captures-DHwIVoRP.d.ts} +1 -1
  3. package/dist/authoring.d.ts +45 -45
  4. package/dist/{automatic-outcomes-6lJGnSDe.d.ts → automatic-outcomes-BcEn_L46.d.ts} +1 -1
  5. package/dist/browser.d.ts +7 -8
  6. package/dist/browser.js +3 -3
  7. package/dist/{chunk-C3CB4WIQ.js → chunk-3PPEXDWR.js} +1 -1
  8. package/dist/{chunk-5TS3OAWS.js → chunk-CHD6HHWG.js} +27 -12
  9. package/dist/{chunk-VBHFJH3P.js → chunk-PJXBW754.js} +1 -1
  10. package/dist/{chunk-6DD7DVNQ.js → chunk-PUY35TH3.js} +1 -1
  11. package/dist/{client-BTd_CyX3.d.ts → client-DFSCmf3H.d.ts} +5 -6
  12. package/dist/{activity-D_R3J-gU.d.ts → deployments-Ci6GyANg.d.ts} +129 -129
  13. package/dist/{groups-4Jb3uYFO.d.ts → groups-Bi7lc54m.d.ts} +1 -1
  14. package/dist/{images-D5kpqHxv.d.ts → images-Cb8QHGjn.d.ts} +1 -1
  15. package/dist/index.d.ts +8 -9
  16. package/dist/index.js +2 -2
  17. package/dist/internal.d.ts +13 -33
  18. package/dist/internal.js +2 -2
  19. package/dist/{offers-BFI5t-e-.d.ts → offers-Catj06u7.d.ts} +2 -2
  20. package/dist/{pages-nIoMT9J3.d.ts → pages-CpYt56Km.d.ts} +1 -1
  21. package/dist/portal-proxy.js +1 -1
  22. package/dist/react/index.d.ts +9 -10
  23. package/dist/react/index.js +3 -3
  24. package/dist/{schema-K-Pg5lPz.d.ts → schema-BaVl2VBS.d.ts} +1 -1
  25. package/dist/schema.d.ts +312 -312
  26. package/dist/server/index.d.ts +12 -73085
  27. package/dist/server/index.js +2 -2
  28. package/dist/{sign-in-options-DBjMzgnu.d.ts → sign-in-options-CU1ND6-y.d.ts} +1 -1
  29. package/dist/{submission-input-CPIsJt-_.d.ts → submission-input-Bi4HipqI.d.ts} +2 -2
  30. package/dist/testing.d.ts +3 -3
  31. package/dist/transport-0ttRwUat.d.ts +73361 -0
  32. package/package.json +1 -1
  33. package/dist/action-9Xl0StBg.d.ts +0 -33
  34. package/dist/referral-reward-kinds-DnvQXL8L.d.ts +0 -268
@@ -64,4 +64,34 @@ declare class RequestError extends Error {
64
64
  constructor(message: string, details: RequestErrorDetails);
65
65
  }
66
66
 
67
- export { RequestError as R, type RequestErrorDetails as a, type RequestErrorKind as b, type RequestRecovery as c, isRequestError as i };
67
+ /** SDK input convenience; the wire request always carries a key. */
68
+ type OptionalActionId<T> = T extends {
69
+ actionId: string;
70
+ } ? Omit<T, "actionId"> & {
71
+ actionId?: string;
72
+ } : never;
73
+ /** One logical write. Keep this object until its outcome is definite. */
74
+ type RelayAction<T> = {
75
+ /** The pending write's key, also available on its uncertain error as `operationId`. */
76
+ readonly actionId: string | undefined;
77
+ readonly busy: boolean;
78
+ readonly error: RequestError | undefined;
79
+ /**
80
+ * Starts a write with a generated key. While an uncertain write is pending, replays its saved
81
+ * callback instead of accepting a different write. Concurrent calls share one request.
82
+ * Put refreshes and other follow-up work outside the callback.
83
+ */
84
+ run(task: (actionId: string) => Promise<T>): Promise<T>;
85
+ /** Replays the exact pending callback and key, only when the error's recovery is `replay`. */
86
+ retry(): Promise<T>;
87
+ /** Acknowledge an authoritative, definite outcome after reconciliation. Refuses while busy. */
88
+ settle(): boolean;
89
+ };
90
+ /**
91
+ * Owns a mutation key across uncertain answers. A definite success or refusal ends the action;
92
+ * the next `run` gets a new key. `reconcile` failures stay pending and cannot be replayed.
93
+ * In-memory only: persist the key yourself if recovery must survive a reload or process restart.
94
+ */
95
+ declare function createRelayAction<T = unknown>(): RelayAction<T>;
96
+
97
+ export { type OptionalActionId as O, type RelayAction as R, RequestError as a, type RequestErrorDetails as b, type RequestErrorKind as c, type RequestRecovery as d, createRelayAction as e, isRequestError as i };
@@ -1,4 +1,4 @@
1
- import { O as OpenIdentityKind } from './schema-K-Pg5lPz.js';
1
+ import { O as OpenIdentityKind } from './schema-BaVl2VBS.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /** One capability call of the captured evaluation run, as Relay stored it. */
@@ -1,18 +1,18 @@
1
- import { x as xContentBodySchema, I as IdentityKind, j as customSourceSchema, W as WithRecordData, k as WithContent, l as WithAccountRoles, m as QuestHandle, L as LedgerReference, G as GroupHandle, i as ResourceHandle, n as TrackerSource, t as trackerDefinitionSchema, o as Tracker, p as TrackerData, q as SourceRoles, r as LedgerHandle, s as xSearchSourceSchema, X as XTweet, u as XContentMetric, v as TrackerTriggerPolicy, w as Where, y as MemberIdentity, z as TrackerTriggerContext, B as TrackerReader, C as TextReviewInput, D as TextResult, P as PhotoResult, F as Decision, H as rewardSchema, J as TrackerTriggerMode, N as RoleOf, U as WhereSetting, V as ContentBody, Y as ContentMetricName, Z as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, _ as TieredRewardDefinition } from './schema-K-Pg5lPz.js';
2
- export { $ as LedgerSetting, a0 as TrackerDataSchema, a1 as TrackerPage, a2 as TrackerReadQuery, a3 as trackerDataSchema, a4 as trackerTriggerContextSchema } from './schema-K-Pg5lPz.js';
1
+ import { x as xContentBodySchema, I as IdentityKind, o as customSourceSchema, W as WithRecordData, p as WithContent, q as WithAccountRoles, r as QuestHandle, L as LedgerReference, G as GroupHandle, n as ResourceHandle, u as TrackerSource, v as trackerDefinitionSchema, y as Tracker, z as TrackerData, B as SourceRoles, C as LedgerHandle, D as xSearchSourceSchema, X as XTweet, F as XContentMetric, H as TrackerTriggerPolicy, J as Where, N as MemberIdentity, U as TrackerTriggerContext, V as TrackerReader, Y as TextReviewInput, Z as TextResult, P as PhotoResult, _ as Decision, $ as rewardSchema, a0 as TrackerTriggerMode, a1 as RoleOf, a2 as WhereSetting, a3 as ContentBody, a4 as ContentMetricName, a5 as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, a6 as TieredRewardDefinition } from './schema-BaVl2VBS.js';
2
+ export { a7 as LedgerSetting, a8 as TrackerDataSchema, a9 as TrackerPage, aa as TrackerReadQuery, ab as trackerDataSchema, ac as trackerTriggerContextSchema } from './schema-BaVl2VBS.js';
3
3
  import { z } from 'zod';
4
4
  export { z } from 'zod';
5
- import { E as EngagementBudget, r as leaderboardDefinitionSchema, q as AuthoringIdentity, s as pointLedgerDeclarationSchema, t as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-4Jb3uYFO.js';
6
- export { u as defineCampaign, v as defineGroup } from './groups-4Jb3uYFO.js';
5
+ import { E as EngagementBudget, r as leaderboardDefinitionSchema, q as AuthoringIdentity, s as pointLedgerDeclarationSchema, t as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-Bi7lc54m.js';
6
+ export { u as defineCampaign, v as defineGroup } from './groups-Bi7lc54m.js';
7
7
  import { d as discordMessagesSourceSchema, D as DiscordMessageData, b as DiscordMessageTextData, c as discordReactionsSourceSchema, e as DiscordReactionData, f as DiscordReader } from './accounts-5ciAkCMP.js';
8
8
  import { Q as QuizContent, a as StreakPolicy } from './streaks-CWyq8Px5.js';
9
9
  import { R as ResourceSource, S as Setting, I as IntegrationModule, B as Budget, a as IntegerSettings } from './integrations-Cr9EhGI_.js';
10
- import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-CPIsJt-_.js';
11
- export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-CPIsJt-_.js';
12
- import { I as ImageReader } from './images-D5kpqHxv.js';
10
+ import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-Bi4HipqI.js';
11
+ export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-Bi4HipqI.js';
12
+ import { I as ImageReader } from './images-Cb8QHGjn.js';
13
13
  import { X as XReader } from './capability-error-oTd3eYFH.js';
14
14
  export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-oTd3eYFH.js';
15
- export { d as defineOffer } from './offers-BFI5t-e-.js';
15
+ export { d as defineOffer } from './offers-Catj06u7.js';
16
16
  import { h as WalletReader } from './wallet-CDyo-U4n.js';
17
17
  export { i as CosmosDenom, a as CosmosNetwork, E as EvmChainId, j as WalletBalance, k as WalletBalanceQuery, l as cosmosDenomSchema, m as cosmosNetworkSchema, n as isEvmChainId } from './wallet-CDyo-U4n.js';
18
18
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
@@ -247,8 +247,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
247
247
  kind: "earned";
248
248
  }> | ReturnType<typeof earned>;
249
249
  }): {
250
- title: string;
251
250
  balance: string;
251
+ title: string;
252
252
  access: "participants" | "public";
253
253
  score: {
254
254
  kind: "balance";
@@ -1014,15 +1014,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1014
1014
  };
1015
1015
  };
1016
1016
  tier: string;
1017
+ } | {
1018
+ kind: "points";
1019
+ balance: string;
1020
+ amount: number;
1017
1021
  } | {
1018
1022
  kind: "integration";
1019
1023
  provider: "discord";
1020
1024
  action: "grant-role";
1021
1025
  roleId: string;
1022
- } | {
1023
- kind: "points";
1024
- balance: string;
1025
- amount: number;
1026
1026
  })[] | ((ctx: {
1027
1027
  settings: z.core.$InferObjectOutput<T, {}>;
1028
1028
  }) => Reward[]);
@@ -1079,6 +1079,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1079
1079
  kind: "resource";
1080
1080
  default: string;
1081
1081
  source: {
1082
+ provider: "domino";
1083
+ resource: "point-ledger";
1084
+ } | {
1082
1085
  provider: "discord";
1083
1086
  resource: "channel";
1084
1087
  types: ("text" | "announcement")[];
@@ -1086,9 +1089,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1086
1089
  provider: "discord";
1087
1090
  resource: "role";
1088
1091
  assignable: boolean;
1089
- } | {
1090
- provider: "domino";
1091
- resource: "point-ledger";
1092
1092
  };
1093
1093
  label: string;
1094
1094
  description?: string | undefined;
@@ -1160,15 +1160,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1160
1160
  };
1161
1161
  };
1162
1162
  tier: string;
1163
+ } | {
1164
+ kind: "points";
1165
+ balance: string;
1166
+ amount: number;
1163
1167
  } | {
1164
1168
  kind: "integration";
1165
1169
  provider: "discord";
1166
1170
  action: "grant-role";
1167
1171
  roleId: string;
1168
- } | {
1169
- kind: "points";
1170
- balance: string;
1171
- amount: number;
1172
1172
  })[];
1173
1173
  humanReview: boolean;
1174
1174
  trigger: {
@@ -1190,7 +1190,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1190
1190
  actor?: "staff" | "member" | undefined;
1191
1191
  } | {
1192
1192
  kind: "manual";
1193
- input: "none" | "quiz" | "photo";
1193
+ input: "photo" | "quiz" | "none";
1194
1194
  actor?: "staff" | "member" | undefined;
1195
1195
  } | {
1196
1196
  kind: "automatic";
@@ -1234,9 +1234,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1234
1234
  path: string;
1235
1235
  equals: string | number | boolean;
1236
1236
  })[] | undefined;
1237
- enrollment?: "none" | "required" | undefined;
1237
+ enrollment?: "required" | "none" | undefined;
1238
1238
  since?: "activation" | "window" | "enrollment" | undefined;
1239
- historical?: "staff" | "claim" | "automatic" | undefined;
1239
+ historical?: "automatic" | "staff" | "claim" | undefined;
1240
1240
  content?: true | undefined;
1241
1241
  } | undefined;
1242
1242
  };
@@ -1259,6 +1259,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1259
1259
  title: string;
1260
1260
  })[];
1261
1261
  completion: {
1262
+ kind: "streak";
1263
+ days: number;
1264
+ } | {
1262
1265
  kind: "progress";
1263
1266
  goal: {
1264
1267
  kind: "count";
@@ -1275,9 +1278,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1275
1278
  durationMs: number;
1276
1279
  };
1277
1280
  repeat: "repeat" | "once";
1278
- } | {
1279
- kind: "streak";
1280
- days: number;
1281
1281
  } | {
1282
1282
  kind: "once";
1283
1283
  } | {
@@ -1303,7 +1303,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1303
1303
  campaign?: {
1304
1304
  key: string;
1305
1305
  title: string;
1306
- enrollment: "none" | "required";
1306
+ enrollment: "required" | "none";
1307
1307
  window?: {
1308
1308
  from: number;
1309
1309
  until: number;
@@ -1411,15 +1411,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1411
1411
  };
1412
1412
  };
1413
1413
  tier: string;
1414
+ } | {
1415
+ kind: "points";
1416
+ balance: string;
1417
+ amount: number;
1414
1418
  } | {
1415
1419
  kind: "integration";
1416
1420
  provider: "discord";
1417
1421
  action: "grant-role";
1418
1422
  roleId: string;
1419
- } | {
1420
- kind: "points";
1421
- balance: string;
1422
- amount: number;
1423
1423
  })[] | ((ctx: {
1424
1424
  settings: z.core.$InferObjectOutput<T, {}>;
1425
1425
  }) => Reward[]);
@@ -1476,6 +1476,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1476
1476
  kind: "resource";
1477
1477
  default: string;
1478
1478
  source: {
1479
+ provider: "domino";
1480
+ resource: "point-ledger";
1481
+ } | {
1479
1482
  provider: "discord";
1480
1483
  resource: "channel";
1481
1484
  types: ("text" | "announcement")[];
@@ -1483,9 +1486,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1483
1486
  provider: "discord";
1484
1487
  resource: "role";
1485
1488
  assignable: boolean;
1486
- } | {
1487
- provider: "domino";
1488
- resource: "point-ledger";
1489
1489
  };
1490
1490
  label: string;
1491
1491
  description?: string | undefined;
@@ -1557,15 +1557,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1557
1557
  };
1558
1558
  };
1559
1559
  tier: string;
1560
+ } | {
1561
+ kind: "points";
1562
+ balance: string;
1563
+ amount: number;
1560
1564
  } | {
1561
1565
  kind: "integration";
1562
1566
  provider: "discord";
1563
1567
  action: "grant-role";
1564
1568
  roleId: string;
1565
- } | {
1566
- kind: "points";
1567
- balance: string;
1568
- amount: number;
1569
1569
  })[];
1570
1570
  humanReview: boolean;
1571
1571
  trigger: {
@@ -1587,7 +1587,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1587
1587
  actor?: "staff" | "member" | undefined;
1588
1588
  } | {
1589
1589
  kind: "manual";
1590
- input: "none" | "quiz" | "photo";
1590
+ input: "photo" | "quiz" | "none";
1591
1591
  actor?: "staff" | "member" | undefined;
1592
1592
  } | {
1593
1593
  kind: "automatic";
@@ -1631,9 +1631,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1631
1631
  path: string;
1632
1632
  equals: string | number | boolean;
1633
1633
  })[] | undefined;
1634
- enrollment?: "none" | "required" | undefined;
1634
+ enrollment?: "required" | "none" | undefined;
1635
1635
  since?: "activation" | "window" | "enrollment" | undefined;
1636
- historical?: "staff" | "claim" | "automatic" | undefined;
1636
+ historical?: "automatic" | "staff" | "claim" | undefined;
1637
1637
  content?: true | undefined;
1638
1638
  } | undefined;
1639
1639
  };
@@ -1656,6 +1656,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1656
1656
  title: string;
1657
1657
  })[];
1658
1658
  completion: {
1659
+ kind: "streak";
1660
+ days: number;
1661
+ } | {
1659
1662
  kind: "progress";
1660
1663
  goal: {
1661
1664
  kind: "count";
@@ -1672,9 +1675,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1672
1675
  durationMs: number;
1673
1676
  };
1674
1677
  repeat: "repeat" | "once";
1675
- } | {
1676
- kind: "streak";
1677
- days: number;
1678
1678
  } | {
1679
1679
  kind: "once";
1680
1680
  } | {
@@ -1700,7 +1700,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1700
1700
  campaign?: {
1701
1701
  key: string;
1702
1702
  title: string;
1703
- enrollment: "none" | "required";
1703
+ enrollment: "required" | "none";
1704
1704
  window?: {
1705
1705
  from: number;
1706
1706
  until: number;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { a as AttemptStatus } from './schema-K-Pg5lPz.js';
2
+ import { a as AttemptStatus } from './schema-BaVl2VBS.js';
3
3
 
4
4
  declare const collectionCodeSchema: z.ZodString;
5
5
  declare const collectionPassSchema: z.ZodObject<{
package/dist/browser.d.ts CHANGED
@@ -1,13 +1,12 @@
1
- import { n as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-BTd_CyX3.js';
2
- export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, w as walletStandardSolanaSigner } from './sign-in-options-DBjMzgnu.js';
3
- import './groups-4Jb3uYFO.js';
1
+ import { n as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-DFSCmf3H.js';
2
+ export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, w as walletStandardSolanaSigner } from './sign-in-options-CU1ND6-y.js';
3
+ import './groups-Bi7lc54m.js';
4
4
  import 'zod';
5
- import './schema-K-Pg5lPz.js';
6
- import './pages-nIoMT9J3.js';
7
- import './submission-input-CPIsJt-_.js';
8
- import './request-error-D_dUPLwo.js';
5
+ import './schema-BaVl2VBS.js';
6
+ import './pages-CpYt56Km.js';
7
+ import './submission-input-Bi4HipqI.js';
8
+ import './action-DBzILFx9.js';
9
9
  import './participant-activity-DYdUUhw2.js';
10
- import './action-9Xl0StBg.js';
11
10
  import './accounts-5ciAkCMP.js';
12
11
  import './profiles-BHMVj0kM.js';
13
12
  import './wallet-CDyo-U4n.js';
package/dist/browser.js CHANGED
@@ -11,15 +11,15 @@ import {
11
11
  signInOptions,
12
12
  solanaSigner,
13
13
  walletStandardSolanaSigner
14
- } from "./chunk-6DD7DVNQ.js";
15
- import "./chunk-VBHFJH3P.js";
14
+ } from "./chunk-PUY35TH3.js";
15
+ import "./chunk-PJXBW754.js";
16
16
  import "./chunk-XMBM2XD5.js";
17
17
  import "./chunk-LLMJ2SUT.js";
18
18
  import "./chunk-UJACD6K2.js";
19
19
  import "./chunk-2UAVZCMH.js";
20
20
  import "./chunk-6QJ3LADK.js";
21
21
  import "./chunk-NPGENI7K.js";
22
- import "./chunk-C3CB4WIQ.js";
22
+ import "./chunk-3PPEXDWR.js";
23
23
  import "./chunk-PT5STHFH.js";
24
24
  import "./chunk-46C33ASD.js";
25
25
  export {
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.14.0";
3
+ var version = "1.15.0";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-NPGENI7K.js";
12
12
  import {
13
13
  clientIdentity
14
- } from "./chunk-C3CB4WIQ.js";
14
+ } from "./chunk-3PPEXDWR.js";
15
15
  import {
16
16
  authScopeSchema
17
17
  } from "./chunk-PT5STHFH.js";
@@ -169,20 +169,25 @@ var ManagementError = class extends RequestError {
169
169
  var DEFAULT_MANAGEMENT_TIMEOUT = MANAGEMENT_TIMEOUT;
170
170
 
171
171
  // src/server/transport.ts
172
+ import { z as z3 } from "zod";
173
+ function failureCause(error) {
174
+ if (typeof error !== "object" || error === null || !("cause" in error)) {
175
+ return {};
176
+ }
177
+ const { cause } = error;
178
+ return typeof cause === "object" && cause !== null ? cause : {};
179
+ }
172
180
  function actionIdOf(input) {
173
181
  return typeof input === "object" && input !== null && "actionId" in input && typeof input.actionId === "string" ? input.actionId : void 0;
174
182
  }
175
183
  function unsent(error) {
176
- const code = String(
177
- error?.cause?.code ?? ""
178
- );
184
+ const code = String(failureCause(error).code ?? "");
179
185
  return /^(ECONNREFUSED|ENOTFOUND|EAI_AGAIN|ENETUNREACH|EHOSTUNREACH|UND_ERR_CONNECT_TIMEOUT)$|CERT|TLS|SSL/.test(
180
186
  code
181
187
  );
182
188
  }
183
189
  function redirected(error) {
184
- const cause = error?.cause;
185
- return /redirect/i.test(String(cause?.message ?? ""));
190
+ return /redirect/i.test(String(failureCause(error).message ?? ""));
186
191
  }
187
192
  function checkedTimeout(timeout) {
188
193
  if (timeout !== void 0 && !validTimeout(timeout)) {
@@ -402,9 +407,6 @@ function managementTransport(options) {
402
407
  response.headers
403
408
  );
404
409
  }
405
- if (schema === void 0) {
406
- return body;
407
- }
408
410
  const parsed = knownResponse(schema).safeParse(
409
411
  tolerant ? { status: response.status, operationId: actionId, result: body } : body
410
412
  );
@@ -425,12 +427,25 @@ function managementTransport(options) {
425
427
  life.end();
426
428
  }
427
429
  }
428
- return { raw, exchange };
430
+ const json = ({
431
+ path,
432
+ method,
433
+ body,
434
+ replaySafe
435
+ }) => exchange(
436
+ path,
437
+ z3.unknown(),
438
+ body,
439
+ method,
440
+ void 0,
441
+ method === "GET" || replaySafe
442
+ );
443
+ return { raw, exchange, json };
429
444
  }
430
445
 
431
446
  // src/sequence-cursor.ts
432
- import { z as z3 } from "zod";
433
- var sequenceCursorSchema = z3.string().regex(/^[1-9][0-9]{0,15}$/, "Invalid cursor").transform(Number).pipe(z3.number().int().positive().safe());
447
+ import { z as z4 } from "zod";
448
+ var sequenceCursorSchema = z4.string().regex(/^[1-9][0-9]{0,15}$/, "Invalid cursor").transform(Number).pipe(z4.number().int().positive().safe());
434
449
 
435
450
  // src/referral-reward-kinds.ts
436
451
  var REFERRAL_INTEGRATION_REWARD_ERROR = "Referral programs can grant points and tiered rewards; Discord roles need a quest";
@@ -70,7 +70,7 @@ import {
70
70
  } from "./chunk-NPGENI7K.js";
71
71
  import {
72
72
  clientIdentity
73
- } from "./chunk-C3CB4WIQ.js";
73
+ } from "./chunk-3PPEXDWR.js";
74
74
  import {
75
75
  exchangeResultSchema,
76
76
  exchangeSchema,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-VBHFJH3P.js";
3
+ } from "./chunk-PJXBW754.js";
4
4
  import {
5
5
  RelayErrorCode,
6
6
  asRelayError,
@@ -1,11 +1,10 @@
1
- import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-4Jb3uYFO.js';
2
- import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, _ as questExperienceSchema, l as RewardDeliveryAction, F as contentQualificationQuerySchema } from './pages-nIoMT9J3.js';
3
- import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-CPIsJt-_.js';
4
- import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-D_dUPLwo.js';
5
- import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, c6 as submitSchema, b8 as contentPerformanceQuerySchema } from './schema-K-Pg5lPz.js';
1
+ import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-Bi7lc54m.js';
2
+ import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, _ as questExperienceSchema, l as RewardDeliveryAction, F as contentQualificationQuerySchema } from './pages-CpYt56Km.js';
3
+ import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-Bi4HipqI.js';
4
+ import { a as RequestError, b as RequestErrorDetails, c as RequestErrorKind, e as createRelayAction, O as OptionalActionId } from './action-DBzILFx9.js';
5
+ import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, c6 as submitSchema, b8 as contentPerformanceQuerySchema } from './schema-BaVl2VBS.js';
6
6
  import { b as ParticipantSession, d as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-DYdUUhw2.js';
7
7
  import { z } from 'zod';
8
- import { c as createRelayAction, O as OptionalActionId } from './action-9Xl0StBg.js';
9
8
  import { a as AuthProvider } from './accounts-5ciAkCMP.js';
10
9
  import { F as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-BHMVj0kM.js';
11
10
  import { y as walletAddressInputSchema, I as walletSignatureSchema, L as LinkedWallet, f as WalletSigner } from './wallet-CDyo-U4n.js';