@domino-sdk/relay 1.59.0 → 1.60.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 (60) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{accounts-CVonEkdb.d.ts → accounts-DoabriBX.d.ts} +4 -1
  3. package/dist/{attempt-captures-DBj-rxak.d.ts → attempt-captures-W2dgzGqE.d.ts} +1 -1
  4. package/dist/authoring.d.ts +160 -28
  5. package/dist/authoring.js +83 -14
  6. package/dist/{automatic-outcomes-FS9okvBP.d.ts → automatic-outcomes-Cmou89IS.d.ts} +1 -1
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +19 -10
  9. package/dist/browser.js +12 -10
  10. package/dist/{capability-error-DDJl0LY-.d.ts → capability-error-DufwG3G0.d.ts} +21 -1
  11. package/dist/{chunk-2LKGAL63.js → chunk-2FHNY52R.js} +8 -2
  12. package/dist/{chunk-EQF4ID47.js → chunk-422J3QRW.js} +12 -2
  13. package/dist/{chunk-KYUQEZZA.js → chunk-4OFH4BNX.js} +1 -1
  14. package/dist/{chunk-R4S6BFOH.js → chunk-6ZG7WNYX.js} +1 -1
  15. package/dist/{chunk-AWWCEP7F.js → chunk-GBSDAD3N.js} +811 -592
  16. package/dist/{chunk-YRSU2X2P.js → chunk-KUPVQXUJ.js} +2 -2
  17. package/dist/{chunk-LDLOB2UZ.js → chunk-KWFY7L7X.js} +4 -4
  18. package/dist/{chunk-UEMLYPKJ.js → chunk-MJEJQH5A.js} +13 -4
  19. package/dist/{chunk-W42KMMH5.js → chunk-N3LJ6GFK.js} +1 -1
  20. package/dist/{chunk-TZJT5CRF.js → chunk-N7YOS4ZU.js} +1 -1
  21. package/dist/{chunk-KBCTII6C.js → chunk-OTEUP2SG.js} +1 -1
  22. package/dist/{chunk-577DG2IT.js → chunk-VVRQQRMQ.js} +12 -12
  23. package/dist/{chunk-YMWRLAAP.js → chunk-VWMIA2TT.js} +8 -2
  24. package/dist/{chunk-6U5WWH3W.js → chunk-XQKUJL7H.js} +9 -4
  25. package/dist/{chunk-M2JQPDUX.js → chunk-Y2IGFLD2.js} +9 -9
  26. package/dist/chunk-YNW2ZUUP.js +247 -0
  27. package/dist/{chunk-IBROKMFV.js → chunk-YOAPPIWN.js} +1 -1
  28. package/dist/{client-3b9HjSzZ.d.ts → client-Cw1pB5sv.d.ts} +12 -7
  29. package/dist/{deployments-BydFVj4Q.d.ts → deployments-DI-W7fBq.d.ts} +786 -2
  30. package/dist/{groups-CFuTfFqG.d.ts → groups-9Jm3peq3.d.ts} +4 -1
  31. package/dist/index.d.ts +10 -10
  32. package/dist/index.js +9 -9
  33. package/dist/{integrations-DrbKQSTD.d.ts → integrations-CmIkP1Gi.d.ts} +48 -3
  34. package/dist/internal.d.ts +10 -10
  35. package/dist/internal.js +8 -8
  36. package/dist/{offers-DAfe1O3_.d.ts → offers-CqXfMIxq.d.ts} +3 -2
  37. package/dist/{pages-ChDVLrgR.d.ts → pages-Bti7g5mX.d.ts} +147 -2
  38. package/dist/{participant-activity-iciCEs_8.d.ts → participant-activity-DHL8QYks.d.ts} +4 -0
  39. package/dist/portal-proxy.js +3 -3
  40. package/dist/react/index.d.ts +15 -14
  41. package/dist/react/index.js +10 -10
  42. package/dist/runtime/authoring.js +1 -1
  43. package/dist/runtime/chunks/ADUMK6CR.js +1 -0
  44. package/dist/runtime/manifest.json +3 -3
  45. package/dist/runtime/schema.js +1 -1
  46. package/dist/{schema-BA0nRRlt.d.ts → schema-CwbRkmlr.d.ts} +142 -2
  47. package/dist/schema.d.ts +112 -17
  48. package/dist/schema.js +35 -21
  49. package/dist/server/index.d.ts +10 -10
  50. package/dist/server/index.js +292 -41
  51. package/dist/{submission-input-DxQ6RnKo.d.ts → submission-input-D9EGH_yb.d.ts} +2 -2
  52. package/dist/{telegram-browser-o3OIxGrJ.d.ts → telegram-browser-CTJh4Ro_.d.ts} +4 -4
  53. package/dist/testing.d.ts +7 -7
  54. package/dist/testing.js +8 -8
  55. package/dist/{transport-D_Eqf78J.d.ts → transport-B8Ss5lcz.d.ts} +5331 -118
  56. package/dist/{wallet-B06zvDXp.d.ts → wallet-DZWL7lJH.d.ts} +1 -1
  57. package/dist/{x-C28SNifw.d.ts → x-KFJD2x8y.d.ts} +2 -2
  58. package/package.json +1 -1
  59. package/dist/chunk-XGXDINGM.js +0 -357
  60. package/dist/runtime/chunks/BG43KQ2T.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  attemptCaptureSchema,
3
3
  capturedFactSchema
4
- } from "../chunk-KBCTII6C.js";
4
+ } from "../chunk-OTEUP2SG.js";
5
5
  import {
6
6
  activityTypeSchema,
7
7
  activityTypes,
@@ -27,7 +27,7 @@ import {
27
27
  publishDeploymentSchema,
28
28
  rejectDeploymentSchema,
29
29
  submitDeploymentSchema
30
- } from "../chunk-M2JQPDUX.js";
30
+ } from "../chunk-Y2IGFLD2.js";
31
31
  import {
32
32
  analyticsBreakdowns,
33
33
  analyticsCatalog,
@@ -42,7 +42,7 @@ import {
42
42
  analyticsRanges,
43
43
  analyticsReadSchema,
44
44
  dashboardDefinitionSchema
45
- } from "../chunk-W42KMMH5.js";
45
+ } from "../chunk-N3LJ6GFK.js";
46
46
  import "../chunk-4OC7REYX.js";
47
47
  import {
48
48
  DEFAULT_MANAGEMENT_TIMEOUT,
@@ -63,22 +63,22 @@ import {
63
63
  participantExchangeSchema,
64
64
  questConfiguration,
65
65
  sequenceCursorSchema
66
- } from "../chunk-LDLOB2UZ.js";
66
+ } from "../chunk-KWFY7L7X.js";
67
67
  import {
68
68
  parseImageExtraction,
69
69
  parseImageResult
70
- } from "../chunk-YRSU2X2P.js";
70
+ } from "../chunk-KUPVQXUJ.js";
71
71
  import {
72
72
  imageAssetArtifactSchema,
73
73
  xUserLookupInputSchema,
74
74
  xUserSchema,
75
75
  xUsernameSchema
76
- } from "../chunk-IBROKMFV.js";
76
+ } from "../chunk-YOAPPIWN.js";
77
77
  import {
78
78
  sourceDataSchema,
79
79
  sourceRoles,
80
80
  validateQuestShape
81
- } from "../chunk-YMWRLAAP.js";
81
+ } from "../chunk-VWMIA2TT.js";
82
82
  import {
83
83
  isIntegrationParticipantPath,
84
84
  isParticipantRoute,
@@ -87,7 +87,7 @@ import {
87
87
  } from "../chunk-MHPKEVEW.js";
88
88
  import {
89
89
  withActionId
90
- } from "../chunk-KYUQEZZA.js";
90
+ } from "../chunk-4OFH4BNX.js";
91
91
  import {
92
92
  allocateQuestSchema,
93
93
  allocatedQuestSchema,
@@ -108,7 +108,7 @@ import {
108
108
  rewardDeliveryQuerySchema,
109
109
  rewardDeliverySchema,
110
110
  saveQuestDraftSchema
111
- } from "../chunk-6U5WWH3W.js";
111
+ } from "../chunk-XQKUJL7H.js";
112
112
  import {
113
113
  badgeMutationResultSchema,
114
114
  badgeMutationSchema,
@@ -156,7 +156,7 @@ import {
156
156
  referralQualificationSchema,
157
157
  referralRewardResolutionSchema,
158
158
  referralSuspensionSchema
159
- } from "../chunk-UEMLYPKJ.js";
159
+ } from "../chunk-MJEJQH5A.js";
160
160
  import {
161
161
  createPointLedgerSchema,
162
162
  managedPointLedgerSchema,
@@ -165,14 +165,11 @@ import {
165
165
  pointLedgerSchema,
166
166
  profileModerationSchema,
167
167
  profileSettingsInputSchema,
168
- profileSettingsSchema,
169
- telegramChatConnectionSchema,
170
- telegramChatIdSchema,
171
- telegramChatsSchema
172
- } from "../chunk-XGXDINGM.js";
173
- import "../chunk-R4S6BFOH.js";
174
- import "../chunk-TZJT5CRF.js";
175
- import "../chunk-EQF4ID47.js";
168
+ profileSettingsSchema
169
+ } from "../chunk-YNW2ZUUP.js";
170
+ import "../chunk-6ZG7WNYX.js";
171
+ import "../chunk-N7YOS4ZU.js";
172
+ import "../chunk-422J3QRW.js";
176
173
  import {
177
174
  CompletionSourceKind,
178
175
  acceptAnywaySchema,
@@ -240,6 +237,9 @@ import {
240
237
  stockItemSchema,
241
238
  streakProgressSchema,
242
239
  submitSchema,
240
+ telegramChatConnectionSchema,
241
+ telegramChatIdSchema,
242
+ telegramChatsSchema,
243
243
  trackerContentReadSchema,
244
244
  trackerContentSchema,
245
245
  trackerControlSchema,
@@ -266,7 +266,7 @@ import {
266
266
  walletSignInNetworksSchema,
267
267
  walletUnlinkInputSchema,
268
268
  whereSchemaIssue
269
- } from "../chunk-AWWCEP7F.js";
269
+ } from "../chunk-GBSDAD3N.js";
270
270
 
271
271
  // src/server/identity-links.ts
272
272
  import * as z from "zod";
@@ -362,10 +362,18 @@ var state2 = {
362
362
  */
363
363
  signIn: z2.boolean().nullable()
364
364
  };
365
+ var account = {
366
+ /**
367
+ * True for an X, Discord or Telegram account a member import attached on the organization's
368
+ * word, until the member links that provider's account through Domino. Absent from Relay
369
+ * versions without it.
370
+ */
371
+ imported: z2.boolean().optional()
372
+ };
365
373
  var memberIdentityStateSchema = z2.discriminatedUnion("kind", [
366
374
  walletIdentitySelectorSchema.strip().extend(state2),
367
- oauthIdentitySelectorSchema.strip().extend(state2),
368
- telegramIdentitySelectorSchema.strip().extend(state2),
375
+ oauthIdentitySelectorSchema.strip().extend({ ...state2, ...account }),
376
+ telegramIdentitySelectorSchema.strip().extend({ ...state2, ...account }),
369
377
  appIdentitySelectorSchema.strip().extend(state2)
370
378
  ]);
371
379
  var memberIdentityStatePageSchema = z2.object({
@@ -576,7 +584,10 @@ var testMemberSchema = z7.object({
576
584
  test: z7.literal(true),
577
585
  /** Current project-calendar date (YYYY-MM-DD), computed by the server. */
578
586
  today: z7.iso.date().optional(),
579
- /** Number of calendar days advanced; absent means zero for older servers. */
587
+ /**
588
+ * Number of calendar days advanced with `days`; absent means zero for older servers. Hours,
589
+ * minutes and `to` leave it unchanged, so read the member's date from `today`.
590
+ */
580
591
  offsetDays: z7.number().int().min(0).optional(),
581
592
  /** Linked wallet addresses, by chain then newest first; absent from older servers. */
582
593
  wallets: z7.array(testMemberWalletSchema).optional(),
@@ -614,6 +625,19 @@ var testMemberAdvanceSchema = z7.object({
614
625
  actionId: identifier,
615
626
  days: z7.number().int().min(1).max(30)
616
627
  }).strict();
628
+ var testMemberClockAdvanceSchema = z7.union([
629
+ testMemberAdvanceSchema,
630
+ z7.object({ actionId: identifier, hours: z7.number().int().min(1).max(720) }).strict(),
631
+ z7.object({
632
+ actionId: identifier,
633
+ minutes: z7.number().int().min(1).max(43200)
634
+ }).strict(),
635
+ z7.object({
636
+ actionId: identifier,
637
+ /** An ISO 8601 instant with an offset, such as `2026-10-10T00:00:00+02:00`. */
638
+ to: z7.iso.datetime({ offset: true })
639
+ }).strict()
640
+ ]);
617
641
  var testMemberResetResultSchema = z7.object({
618
642
  member: identifier,
619
643
  deleted: z7.literal(true)
@@ -787,6 +811,14 @@ var importXSchema = z8.object({
787
811
  kind: z8.literal("x"),
788
812
  subject: z8.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric X user ID")
789
813
  }).strict();
814
+ var importTelegramSchema = z8.object({
815
+ kind: z8.literal("telegram"),
816
+ subject: z8.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric Telegram user ID")
817
+ }).strict();
818
+ var importDiscordSchema = z8.object({
819
+ kind: z8.literal("discord"),
820
+ subject: z8.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric Discord user ID")
821
+ }).strict();
790
822
  var importAppIdentitySchema = z8.object({ kind: appIdentityKindSchema, subject: z8.string().min(1).max(256) }).strict();
791
823
  var memberImportIdentitySchema = z8.union([
792
824
  importAppIdentitySchema,
@@ -797,10 +829,32 @@ var memberImportAccountSchema = z8.union([
797
829
  importWalletSchema,
798
830
  importXSchema
799
831
  ]);
832
+ var memberImportVouchedAccountSchema = z8.union([
833
+ importWalletSchema,
834
+ importXSchema,
835
+ importTelegramSchema,
836
+ importDiscordSchema
837
+ ]);
800
838
  var memberImportActionSchema = z8.object({
801
839
  at: importTimeSchema,
802
840
  key: z8.string().min(1).max(200).optional()
803
841
  }).strict();
842
+ var memberImportReferralSchema = z8.object({
843
+ /**
844
+ * The inviter: the `ref` of another row of this import, or the sign-in identity of a member
845
+ * who already exists in this environment.
846
+ */
847
+ inviter: z8.union([
848
+ z8.string().trim().min(1).max(200),
849
+ memberImportIdentitySchema
850
+ ]),
851
+ /** When the member accepted the invitation. */
852
+ acceptedAt: importTimeSchema,
853
+ /** Referral programs, by authoring key or ID, the member qualified in, and when. */
854
+ qualified: z8.array(
855
+ z8.object({ program: z8.string().min(1).max(200), at: importTimeSchema }).strict()
856
+ ).max(50).default([])
857
+ }).strict();
804
858
  var memberImportRowSchema = z8.object({
805
859
  /** The member's ID on the platform they come from. Unique within an import. */
806
860
  ref: z8.string().trim().min(1).max(200),
@@ -819,7 +873,11 @@ var memberImportRowSchema = z8.object({
819
873
  quest: z8.string().min(1).max(200),
820
874
  actions: z8.array(memberImportActionSchema).min(1).max(3660)
821
875
  }).strict()
822
- ).max(200).default([])
876
+ ).max(200).default([]),
877
+ referral: memberImportReferralSchema.optional()
878
+ }).strict();
879
+ var memberImportFullRowSchema = memberImportRowSchema.extend({
880
+ accounts: z8.array(memberImportVouchedAccountSchema).max(20).default([])
823
881
  }).strict();
824
882
  var memberImportCreateSchema = z8.object({
825
883
  actionId: identifier,
@@ -827,6 +885,7 @@ var memberImportCreateSchema = z8.object({
827
885
  source: z8.string().trim().min(1).max(100)
828
886
  }).strict();
829
887
  var memberImportRowsInputSchema = z8.object({ rows: z8.array(memberImportRowSchema).min(1).max(500) }).strict();
888
+ var memberImportFullRowsInputSchema = z8.object({ rows: z8.array(memberImportFullRowSchema).min(1).max(500) }).strict();
830
889
  var MemberImportRefusalCode = {
831
890
  /** An account or identity belongs to another member in the project. */
832
891
  AccountLinkedElsewhere: "account-linked-elsewhere",
@@ -834,8 +893,12 @@ var MemberImportRefusalCode = {
834
893
  IdentityUnlinked: "identity-unlinked",
835
894
  /** An earlier row of the import names the same account. */
836
895
  DuplicateAccount: "duplicate-account",
837
- /** The member already has another X account selected. */
896
+ /** The row names two X accounts, or the member already has another X account selected. */
838
897
  XAccountSelected: "x-account-selected",
898
+ /** The row names two Telegram accounts, or the member already has another one selected. */
899
+ TelegramAccountSelected: "telegram-account-selected",
900
+ /** The row names two Discord accounts, or the member already has another one selected. */
901
+ DiscordAccountSelected: "discord-account-selected",
839
902
  /** The member would hold more wallets of a chain family than a member can link. */
840
903
  LimitReached: "limit-reached",
841
904
  UnknownLedger: "unknown-ledger",
@@ -850,8 +913,20 @@ var MemberImportRefusalCode = {
850
913
  FutureAction: "future-action",
851
914
  /** The row's sign-in wallet or X account is linked to its member without sign-in. */
852
915
  SignInDisabled: "sign-in-disabled",
853
- /** The row names one point ledger or quest twice, by any of its names. */
854
- DuplicateEntry: "duplicate-entry"
916
+ /** The row names one point ledger, quest or referral program twice, by any of its names. */
917
+ DuplicateEntry: "duplicate-entry",
918
+ /** The inviter is no row of this import, and no member of the environment signs in with it. */
919
+ UnknownInviter: "unknown-inviter",
920
+ /** The row names its own member as the inviter. */
921
+ SelfReferral: "self-referral",
922
+ /** The member already has an inviter. An import never replaces one. */
923
+ InviterAlreadyAccepted: "inviter-already-accepted",
924
+ /** The inviter was invited, directly or through others, by this row's member. */
925
+ ReferralCycle: "referral-cycle",
926
+ /** The row that names the inviter was refused, so the inviter is never imported. */
927
+ InviterRefused: "inviter-refused",
928
+ /** No referral program of that key or ID in this environment, or it is archived. */
929
+ UnknownReferralProgram: "unknown-referral-program"
855
930
  };
856
931
  var refusalCodeSchema = z8.string();
857
932
  var memberImportRefusalSchema = z8.object({
@@ -895,11 +970,79 @@ var memberImportSummarySchema = z8.object({
895
970
  actions: z8.array(
896
971
  z8.object({ quest: z8.string(), total: z8.number().int().nonnegative() })
897
972
  ),
973
+ /**
974
+ * Accepted referrals the ready rows record, and their qualifications by program as the rows
975
+ * name it. Absent from a summary written before imports carried referrals.
976
+ */
977
+ referrals: z8.object({
978
+ accepted: z8.number().int().nonnegative(),
979
+ qualified: z8.array(
980
+ z8.object({
981
+ program: z8.string(),
982
+ total: z8.number().int().nonnegative()
983
+ })
984
+ )
985
+ }).optional(),
898
986
  /** Refused rows, by refusal code. A row can have several. */
899
987
  refusals: z8.array(
900
988
  z8.object({ code: refusalCodeSchema, rows: z8.number().int().nonnegative() })
901
989
  )
902
990
  });
991
+ var memberImportRevertInputSchema = z8.object({
992
+ actionId: identifier,
993
+ reason: z8.string().trim().min(1).max(500)
994
+ }).strict();
995
+ var memberImportRevertOutcomeSchema = z8.object({
996
+ reversed: z8.object({
997
+ /** Applied rows the revert went through. */
998
+ rows: z8.number().int().nonnegative(),
999
+ /** Opening balance entries reversed. */
1000
+ entries: z8.number().int().nonnegative(),
1001
+ /** Imported completions revoked. */
1002
+ completions: z8.number().int().nonnegative(),
1003
+ /** Links the rows created that the revert removed. */
1004
+ links: z8.number().int().nonnegative()
1005
+ }),
1006
+ /**
1007
+ * Imported points the revert could not take back, by member and point ledger: the member had
1008
+ * spent or reserved them. A revert takes only free points, as a completion's revocation does,
1009
+ * so no balance goes below zero and Relay records no debt.
1010
+ */
1011
+ unreversedPoints: z8.array(
1012
+ z8.object({
1013
+ member: identifier,
1014
+ ledger: identifier,
1015
+ amount: z8.number().int().positive()
1016
+ })
1017
+ ),
1018
+ /**
1019
+ * Links the rows created that stay, because the member relied on them since: `signed-in` with
1020
+ * it, or `proved` a vouched wallet. `kind` is `wallet`, the provider (`x`, `telegram`,
1021
+ * `discord`) or `app:<name>`; `account` is the address or subject.
1022
+ */
1023
+ keptLinks: z8.array(
1024
+ z8.object({
1025
+ member: identifier,
1026
+ kind: z8.string(),
1027
+ account: z8.string(),
1028
+ reason: z8.string()
1029
+ })
1030
+ ),
1031
+ /**
1032
+ * True when rows were applied before imports recorded the links they created: those rows'
1033
+ * links all stay, and only their balances and completions were reversed.
1034
+ */
1035
+ linksUntracked: z8.boolean()
1036
+ });
1037
+ var memberImportRevertSchema = z8.object({
1038
+ reason: z8.string(),
1039
+ requestedAt: z8.number().int(),
1040
+ requestedBy: z8.string().nullable(),
1041
+ /** Applied rows reverted so far. */
1042
+ rows: z8.number().int().nonnegative(),
1043
+ revertedAt: z8.number().int().nullable(),
1044
+ outcome: memberImportRevertOutcomeSchema.nullable()
1045
+ });
903
1046
  var memberImportSchema = z8.object({
904
1047
  id: identifier,
905
1048
  source: z8.string(),
@@ -914,7 +1057,7 @@ var memberImportSchema = z8.object({
914
1057
  rows: z8.number().int().nonnegative(),
915
1058
  /** The latest check's summary, or null before the first check and after rows change. */
916
1059
  summary: memberImportSummarySchema.nullable(),
917
- /** While applying and after: rows applied and refused so far. */
1060
+ /** While applying and after, stopped included: rows applied and refused so far. */
918
1061
  progress: z8.object({
919
1062
  applied: z8.number().int().nonnegative(),
920
1063
  refused: z8.number().int().nonnegative()
@@ -925,7 +1068,12 @@ var memberImportSchema = z8.object({
925
1068
  appliedAt: z8.number().int().nullable(),
926
1069
  appliedBy: z8.string().nullable(),
927
1070
  canceledAt: z8.number().int().nullable(),
928
- canceledBy: z8.string().nullable()
1071
+ canceledBy: z8.string().nullable(),
1072
+ /** Set when the import was stopped while applying; it then reads as `applied` with `appliedAt` null. */
1073
+ stoppedAt: z8.number().int().nullish(),
1074
+ stoppedBy: z8.string().nullish(),
1075
+ /** Set once a revert was asked for; the import still reads as `applied`. */
1076
+ revert: memberImportRevertSchema.nullish()
929
1077
  });
930
1078
  var memberImportPageSchema = z8.object({
931
1079
  items: z8.array(memberImportSchema),
@@ -1093,6 +1241,24 @@ var resourceLifecycleResultSchema = z10.object({
1093
1241
  resource: managedResourceSchema,
1094
1242
  changed: z10.boolean()
1095
1243
  });
1244
+ var managedOfferSchema = managedResourceSchema.extend({
1245
+ kind: z10.literal("offer")
1246
+ });
1247
+ var managedResourceListSchema = z10.object({
1248
+ resources: z10.array(managedResourceSchema),
1249
+ offers: z10.array(managedOfferSchema).default([])
1250
+ });
1251
+ var offerLifecycleResultSchema = z10.object({
1252
+ resource: managedOfferSchema,
1253
+ changed: z10.boolean()
1254
+ });
1255
+ var offerLifecycleInputSchema = z10.strictObject({
1256
+ actionId: z10.string().uuid(),
1257
+ offer: identifier,
1258
+ archived: z10.boolean(),
1259
+ reason: z10.string().trim().min(1).max(500),
1260
+ expectedArchivedAt: z10.number().int().nonnegative().nullable().optional()
1261
+ });
1096
1262
  var resourceLifecyclePaths = {
1097
1263
  tracker: "/trackers",
1098
1264
  referral: "/referral-programs",
@@ -2642,7 +2808,12 @@ var managedTelegramAccountSchema = z19.discriminatedUnion("status", [
2642
2808
  status: z19.literal("connected"),
2643
2809
  /** The numeric Telegram user ID. */
2644
2810
  subject: z19.string().min(1),
2645
- linkedAt: z19.number()
2811
+ linkedAt: z19.number(),
2812
+ /**
2813
+ * True when a member import attached the account with the organization's word for it, not the
2814
+ * member's proof. Absent from Relay versions without it.
2815
+ */
2816
+ imported: z19.boolean().optional()
2646
2817
  }),
2647
2818
  managedTelegramAccountBaseSchema.extend({
2648
2819
  status: z19.literal("disconnected")
@@ -2668,8 +2839,9 @@ var managedWalletSchema = linkedWalletSchema.extend({
2668
2839
  });
2669
2840
  var managedMemberIdentitySchema = memberIdentitySchema.extend({
2670
2841
  /**
2671
- * True for an X account a member import attached, until the member links or signs in with it
2672
- * through X. Absent from Relay versions without imports.
2842
+ * True for an X or Discord account a member import attached, until the member links that
2843
+ * provider's account, or signs in with the X account, through Domino. Absent from Relay versions
2844
+ * without imports.
2673
2845
  */
2674
2846
  imported: z19.boolean().optional(),
2675
2847
  /**
@@ -2800,7 +2972,17 @@ var memberDetailSchema = z19.object({
2800
2972
  * The creator accounts the member linked (a YouTube channel), whose content managed tracker
2801
2973
  * sources attribute to them. Absent from Relay versions without creator accounts.
2802
2974
  */
2803
- creatorAccounts: z19.array(managedCreatorAccountSchema).optional()
2975
+ creatorAccounts: z19.array(managedCreatorAccountSchema).optional(),
2976
+ /**
2977
+ * Who invited the member, when they accepted, and the member import that recorded it, or null
2978
+ * when nobody invited them. Absent from Relay versions before imported referrals.
2979
+ */
2980
+ referral: z19.object({
2981
+ inviter: identifier,
2982
+ acceptedAt: z19.number().int().nonnegative(),
2983
+ suspended: z19.boolean(),
2984
+ import: identifier.nullable()
2985
+ }).nullable().optional()
2804
2986
  });
2805
2987
  var managedMemberProgressSchema = z19.object({
2806
2988
  member: identifier,
@@ -4437,6 +4619,25 @@ function managementClient(options) {
4437
4619
  )
4438
4620
  },
4439
4621
  offers: {
4622
+ /**
4623
+ * Archive an offer in test, with a reason the audit log records: members stop seeing it and
4624
+ * redeeming it fails with `offer-paused`, while its redemptions stay cancelable and it stays
4625
+ * archived when its code deploys again. Live gets the change through a promotion. Requires
4626
+ * `publish` permission.
4627
+ */
4628
+ archive: (offer, input, call) => post(
4629
+ `/offers/${identifier.parse(offer)}/archive`,
4630
+ offerLifecycleResultSchema,
4631
+ resourceArchiveInputSchema.parse(withActionId(input)),
4632
+ call
4633
+ ),
4634
+ /** Restore an archived offer in test. Requires `publish` permission. */
4635
+ unarchive: (offer, input, call) => post(
4636
+ `/offers/${identifier.parse(offer)}/unarchive`,
4637
+ offerLifecycleResultSchema,
4638
+ resourceArchiveInputSchema.parse(withActionId(input)),
4639
+ call
4640
+ ),
4440
4641
  pause: (offer, input, call) => post(
4441
4642
  `/offers/${identifier.parse(offer)}/pause`,
4442
4643
  offerSchema,
@@ -4810,11 +5011,7 @@ function managementClient(options) {
4810
5011
  questTypes: resourceArchiveMethods("quest-type"),
4811
5012
  images: resourceArchiveMethods("image"),
4812
5013
  resources: {
4813
- list: (call) => get(
4814
- "/resources",
4815
- z19.object({ resources: z19.array(managedResourceSchema) }),
4816
- call
4817
- ),
5014
+ list: (call) => get("/resources", managedResourceListSchema, call),
4818
5015
  /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
4819
5016
  lifecycle: (input, call) => post(
4820
5017
  "/resources/lifecycle",
@@ -4924,11 +5121,15 @@ function managementClient(options) {
4924
5121
  testMemberAcceptAnywaySchema.parse(withActionId(input)),
4925
5122
  call
4926
5123
  ),
4927
- /** Move forward 1–30 project-calendar days, up to 90 total. Reset deletes the member. */
5124
+ /**
5125
+ * Move the member's clock forward by 1–30 project-calendar days, 1–720 hours, 1–43200
5126
+ * minutes, or `to` a later instant; at most 90 days ahead of real time. Reset deletes the
5127
+ * member.
5128
+ */
4928
5129
  advance: (member, input, call) => post(
4929
5130
  `/test-members/${identifier.parse(member)}/clock`,
4930
5131
  testMemberSchema,
4931
- testMemberAdvanceSchema.parse(withActionId(input)),
5132
+ testMemberClockAdvanceSchema.parse(withActionId(input)),
4932
5133
  call
4933
5134
  ),
4934
5135
  /**
@@ -5003,7 +5204,8 @@ function managementClient(options) {
5003
5204
  * this project and environment. Add rows, `check` them (the dry run), read the summary and the
5004
5205
  * refused rows, then `apply`. Checking and applying run in the background: read the import
5005
5206
  * until its status is `checked` or `applied`. Needs `publish` permission. In live, only a
5006
- * person signed in to Console applies an import; keys and CLI sessions prepare and check it.
5207
+ * person signed in to Console applies an import; keys and CLI sessions prepare, check, cancel,
5208
+ * stop and revert it.
5007
5209
  */
5008
5210
  memberImports: {
5009
5211
  create: (input, call) => post(
@@ -5035,7 +5237,7 @@ function managementClient(options) {
5035
5237
  addRows: (id, rows, call) => post(
5036
5238
  `/member-imports/${identifier.parse(id)}/rows`,
5037
5239
  memberImportSchema,
5038
- memberImportRowsInputSchema.parse({ rows }),
5240
+ memberImportFullRowsInputSchema.parse({ rows }),
5039
5241
  call
5040
5242
  ),
5041
5243
  /** Starts the dry run: every row is checked against the project, and nothing changes. */
@@ -5058,6 +5260,31 @@ function managementClient(options) {
5058
5260
  memberImportSchema,
5059
5261
  {},
5060
5262
  call
5263
+ ),
5264
+ /**
5265
+ * Stops an applying import: the row being applied finishes, no further row is applied, and
5266
+ * the import reads as `applied` with `appliedAt` null and `stoppedAt` set. Its remaining rows
5267
+ * stay `ready`; a stopped import can't be applied again, so import the rest in a new import. Stopping a stopped import changes nothing.
5268
+ */
5269
+ stop: (id, call) => post(
5270
+ `/member-imports/${identifier.parse(id)}/stop`,
5271
+ memberImportSchema,
5272
+ {},
5273
+ call
5274
+ ),
5275
+ /**
5276
+ * Starts reverting an applied or stopped import, in the background: each applied row's
5277
+ * opening balances are reversed as far as the member still has the points, its imported
5278
+ * completions revoked, and the links it created removed unless the member signed in with
5279
+ * one since. Members stay in the project. Read the import until `revert.revertedAt` is set;
5280
+ * `revert.outcome` then lists the points members had spent and the links kept. An import is
5281
+ * reverted once; the same `actionId` answers the import again.
5282
+ */
5283
+ revert: (id, input, call) => post(
5284
+ `/member-imports/${identifier.parse(id)}/revert`,
5285
+ memberImportSchema,
5286
+ memberImportRevertInputSchema.parse(withActionId(input)),
5287
+ call
5061
5288
  )
5062
5289
  },
5063
5290
  /** The project's members, as operators see them. */
@@ -5977,6 +6204,12 @@ var managementResponseSchemas = lazyResponseReaders({
5977
6204
  get managedResourceSchema() {
5978
6205
  return knownResponse(managedResourceSchema);
5979
6206
  },
6207
+ get managedResourceListSchema() {
6208
+ return knownResponse(managedResourceListSchema);
6209
+ },
6210
+ get offerLifecycleResultSchema() {
6211
+ return knownResponse(offerLifecycleResultSchema);
6212
+ },
5980
6213
  get managedStockItemSchema() {
5981
6214
  return knownResponse(managedStockItemSchema);
5982
6215
  },
@@ -6465,6 +6698,12 @@ var managementResponses = lazyResponseReaders({
6465
6698
  get managedResourceSchema() {
6466
6699
  return responseSchema(managedResourceSchema);
6467
6700
  },
6701
+ get managedResourceListSchema() {
6702
+ return responseSchema(managedResourceListSchema);
6703
+ },
6704
+ get offerLifecycleResultSchema() {
6705
+ return responseSchema(offerLifecycleResultSchema);
6706
+ },
6468
6707
  get managedStockItemSchema() {
6469
6708
  return responseSchema(managedStockItemSchema);
6470
6709
  },
@@ -6853,11 +7092,13 @@ export {
6853
7092
  managedMemberProgressSchema,
6854
7093
  managedMemberQuerySchema,
6855
7094
  managedOAuthAccountSchema,
7095
+ managedOfferSchema,
6856
7096
  managedPointHistoryPageSchema,
6857
7097
  managedQuestEnrollmentPageSchema,
6858
7098
  managedQuestEnrollmentSchema,
6859
7099
  managedReleasePageSchema,
6860
7100
  managedReleaseQuerySchema,
7101
+ managedResourceListSchema,
6861
7102
  managedResourceSchema,
6862
7103
  managedStockItemSchema,
6863
7104
  managedTelegramAccountSchema,
@@ -6881,10 +7122,16 @@ export {
6881
7122
  memberImportAccountSchema,
6882
7123
  memberImportActionSchema,
6883
7124
  memberImportCreateSchema,
7125
+ memberImportFullRowSchema,
7126
+ memberImportFullRowsInputSchema,
6884
7127
  memberImportIdentitySchema,
6885
7128
  memberImportListQuerySchema,
6886
7129
  memberImportPageSchema,
7130
+ memberImportReferralSchema,
6887
7131
  memberImportRefusalSchema,
7132
+ memberImportRevertInputSchema,
7133
+ memberImportRevertOutcomeSchema,
7134
+ memberImportRevertSchema,
6888
7135
  memberImportRowPageSchema,
6889
7136
  memberImportRowQuerySchema,
6890
7137
  memberImportRowResultSchema,
@@ -6892,6 +7139,7 @@ export {
6892
7139
  memberImportRowsInputSchema,
6893
7140
  memberImportSchema,
6894
7141
  memberImportSummarySchema,
7142
+ memberImportVouchedAccountSchema,
6895
7143
  memberLookupSchema,
6896
7144
  memberOAuthUnlinkInputSchema,
6897
7145
  memberSchema,
@@ -6901,6 +7149,8 @@ export {
6901
7149
  metricsSchema,
6902
7150
  nextScheduleRun,
6903
7151
  oauthIdentitySelectorSchema,
7152
+ offerLifecycleInputSchema,
7153
+ offerLifecycleResultSchema,
6904
7154
  offeredStarterSchema,
6905
7155
  operationInputSchema,
6906
7156
  operationSchema,
@@ -6994,6 +7244,7 @@ export {
6994
7244
  testMemberAccountUnlinkSchema,
6995
7245
  testMemberActionSchema,
6996
7246
  testMemberAdvanceSchema,
7247
+ testMemberClockAdvanceSchema,
6997
7248
  testMemberCreateSchema,
6998
7249
  testMemberDiscordMessageSchema,
6999
7250
  testMemberDiscordReactionSchema,
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { L as LedgerReference, x as QuestHandle } from './schema-BA0nRRlt.js';
3
- import { k as ProjectGroupReference } from './groups-CFuTfFqG.js';
2
+ import { L as LedgerReference, x as QuestHandle } from './schema-CwbRkmlr.js';
3
+ import { k as ProjectGroupReference } from './groups-9Jm3peq3.js';
4
4
 
5
5
  declare const completionPrerequisiteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
6
  kind: z.ZodLiteral<"completion">;
@@ -1,7 +1,7 @@
1
- import { a as AuthProvider, b as TelegramSignInMethods } from './accounts-CVonEkdb.js';
2
- import { p as createRelayClient, k as RelayRequestOptions, g as RelayError } from './client-3b9HjSzZ.js';
3
- import { b as ParticipantSession } from './participant-activity-iciCEs_8.js';
4
- import { C as CosmosChain, a as CosmosNetwork, m as WalletSigner, k as WalletSignInNetwork } from './wallet-B06zvDXp.js';
1
+ import { a as AuthProvider, b as TelegramSignInMethods } from './accounts-DoabriBX.js';
2
+ import { p as createRelayClient, k as RelayRequestOptions, g as RelayError } from './client-Cw1pB5sv.js';
3
+ import { b as ParticipantSession } from './participant-activity-DHL8QYks.js';
4
+ import { C as CosmosChain, a as CosmosNetwork, m as WalletSigner, k as WalletSignInNetwork } from './wallet-DZWL7lJH.js';
5
5
 
6
6
  /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
7
7
  type Eip1193Provider = {
package/dist/testing.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { c5 as memberIdentitySchema, cg as pointBalanceSchema, dw as trackerQuerySchema, dr as trackerPageSchema, dF as trackerSummarySchema, b1 as TrackerContentQuery, db as trackerContentSchema, ca as photoResultSchema, a7 as TextReviewInput, R as Reward, a9 as Decision, aZ as TrackerAttribution, U as Tracker, V as TrackerData, ae as ContentBody, a5 as TrackerTriggerContext, ak as TrackerPage } from './schema-BA0nRRlt.js';
1
+ import { ar as memberIdentitySchema, as as pointBalanceSchema, at as trackerQuerySchema, au as trackerPageSchema, av as trackerSummarySchema, aw as TrackerContentQuery, ax as trackerContentSchema, ay as photoResultSchema, a7 as TextReviewInput, R as Reward, a9 as Decision, az as TrackerAttribution, U as Tracker, V as TrackerData, ae as ContentBody, a5 as TrackerTriggerContext, ak as TrackerPage } from './schema-CwbRkmlr.js';
2
2
  import * as z from 'zod';
3
- import { u as discordMemberSchema, x as discordMessageSchema, H as telegramChatMemberSchema } from './accounts-CVonEkdb.js';
4
- import { b as CapabilityFailure, h as memberCompletionSchema } from './capability-error-DDJl0LY-.js';
5
- export { C as CapabilityError } from './capability-error-DDJl0LY-.js';
6
- import { z as xConnectionSchema, C as xProfileSchema, B as xPostSchema, f as ImageReference, s as imageInspectionSchema, o as imageComparisonSchema, v as imageSightingsSchema } from './x-C28SNifw.js';
7
- import { aO as profileReferralSchema, aE as linkedWalletSchema, aY as walletBalanceSchema, b2 as walletNftsSchema, K as WalletCallArgument, aZ as walletCallSchema, a$ as walletDelegationsSchema, T as WalletEventCondition, b0 as walletEventsSchema, b7 as walletTransactionsSchema } from './wallet-B06zvDXp.js';
8
- export { A as AttemptCapture, C as CapturedFact } from './attempt-captures-DBj-rxak.js';
3
+ import { m as discordMemberSchema, n as discordMessageSchema, t as telegramChatMemberSchema } from './accounts-DoabriBX.js';
4
+ import { b as CapabilityFailure, m as memberCompletionSchema } from './capability-error-DufwG3G0.js';
5
+ export { C as CapabilityError } from './capability-error-DufwG3G0.js';
6
+ import { x as xConnectionSchema, a as xProfileSchema, b as xPostSchema, c as ImageReference, i as imageInspectionSchema, d as imageComparisonSchema, e as imageSightingsSchema } from './x-KFJD2x8y.js';
7
+ import { aj as profileReferralSchema, ak as linkedWalletSchema, al as walletBalanceSchema, am as walletNftsSchema, K as WalletCallArgument, an as walletCallSchema, ao as walletDelegationsSchema, T as WalletEventCondition, ap as walletEventsSchema, aq as walletTransactionsSchema } from './wallet-DZWL7lJH.js';
8
+ export { A as AttemptCapture, C as CapturedFact } from './attempt-captures-W2dgzGqE.js';
9
9
 
10
10
  /** One project time-zone change: from `effectiveAt` on, days are counted in `timeZone`. */
11
11
  type CalendarSegment = {