@domino-sdk/relay 1.51.0 → 1.52.1

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 (51) hide show
  1. package/dist/{attempt-captures-DF--rIgJ.d.ts → attempt-captures-QC4kTA44.d.ts} +2 -1
  2. package/dist/authoring.d.ts +57 -47
  3. package/dist/authoring.js +21 -5
  4. package/dist/{automatic-outcomes-C7f5-N0M.d.ts → automatic-outcomes-CVyZHxir.d.ts} +1 -1
  5. package/dist/browser.d.ts +6 -6
  6. package/dist/browser.js +10 -10
  7. package/dist/{chunk-MMR6CZEJ.js → chunk-2NUD237O.js} +1 -1
  8. package/dist/{chunk-DP7FGRUW.js → chunk-53JMTUWG.js} +1 -1
  9. package/dist/{chunk-GYXYZL5E.js → chunk-7BNCLWAO.js} +1 -1
  10. package/dist/{chunk-AYJHU5QG.js → chunk-BMZAYH65.js} +8 -8
  11. package/dist/{chunk-SGWAVIEP.js → chunk-CCE2JWES.js} +1 -1
  12. package/dist/{chunk-7WVTYMFA.js → chunk-GTQJSDBS.js} +6 -6
  13. package/dist/{chunk-VTD4YDEO.js → chunk-IELNFM3V.js} +581 -537
  14. package/dist/{chunk-3LK6JIBY.js → chunk-K6TVMNU4.js} +1 -1
  15. package/dist/{chunk-55EDUZNS.js → chunk-K74XFZGW.js} +2 -2
  16. package/dist/{chunk-FJ33W2IU.js → chunk-LAO3L4VS.js} +1 -1
  17. package/dist/{chunk-CHURQQBP.js → chunk-LPHXTZDA.js} +2 -2
  18. package/dist/{chunk-O5WR2JT4.js → chunk-S2PMKZSX.js} +1 -1
  19. package/dist/{chunk-NDKDKRCE.js → chunk-X6V5WY4M.js} +4 -4
  20. package/dist/{chunk-W3SQLZRA.js → chunk-XFAYQFRO.js} +1 -1
  21. package/dist/{chunk-NAEVXBSF.js → chunk-YVC3B72P.js} +1 -1
  22. package/dist/{chunk-4Y5AYL3C.js → chunk-ZJ3FVZRP.js} +2 -2
  23. package/dist/{client-C5sCO45H.d.ts → client-CzNtl8UO.d.ts} +4 -4
  24. package/dist/{deployments-DLVhetCw.d.ts → deployments-DkoBtC5t.d.ts} +213 -213
  25. package/dist/{groups-DG7_3ipk.d.ts → groups-B5R1RCsl.d.ts} +1 -1
  26. package/dist/index.d.ts +7 -7
  27. package/dist/index.js +9 -9
  28. package/dist/internal.d.ts +9 -9
  29. package/dist/internal.js +8 -8
  30. package/dist/{offers-yZTUWHSp.d.ts → offers-CH1RZekg.d.ts} +2 -2
  31. package/dist/{pages-DLFRK5l7.d.ts → pages-BTlOg8sl.d.ts} +1 -1
  32. package/dist/portal-proxy.js +3 -3
  33. package/dist/react/index.d.ts +8 -8
  34. package/dist/react/index.js +10 -10
  35. package/dist/runtime/authoring.js +1 -1
  36. package/dist/runtime/chunks/AVRVSLHX.js +1 -0
  37. package/dist/runtime/manifest.json +3 -3
  38. package/dist/runtime/schema.js +1 -1
  39. package/dist/{schema-6uU1s4if.d.ts → schema-BJ9bOgpN.d.ts} +1 -0
  40. package/dist/schema.d.ts +335 -321
  41. package/dist/schema.js +9 -7
  42. package/dist/server/index.d.ts +9 -9
  43. package/dist/server/index.js +14 -14
  44. package/dist/{submission-input-DtNMoL30.d.ts → submission-input-BNah53go.d.ts} +2 -2
  45. package/dist/{telegram-browser-DE9d1M-g.d.ts → telegram-browser-C36j_6v-.d.ts} +1 -1
  46. package/dist/testing.d.ts +3 -3
  47. package/dist/testing.js +5 -5
  48. package/dist/{transport-IcjSKp4J.d.ts → transport-B8w9oqCY.d.ts} +3113 -3112
  49. package/dist/{x-B6mbKgoQ.d.ts → x-BfQcsDp0.d.ts} +1 -1
  50. package/package.json +1 -1
  51. package/dist/runtime/chunks/4O3MZT45.js +0 -1
@@ -2100,8 +2100,40 @@ var trackerTriggerContextSchema = z13.object({
2100
2100
  enrolledAt: timestamp3.optional()
2101
2101
  });
2102
2102
 
2103
- // src/sdk-runtime.ts
2103
+ // src/reject-codes.ts
2104
2104
  import * as z14 from "zod";
2105
+ var reservedAttemptCodes = Object.freeze([
2106
+ "budget-exhausted",
2107
+ "defer-expired",
2108
+ "defer-limit-exceeded",
2109
+ "evaluator-deferred",
2110
+ "evaluator-progress",
2111
+ "imported",
2112
+ "integration-required",
2113
+ "not-linked",
2114
+ "provider-unavailable",
2115
+ "author-error"
2116
+ ]);
2117
+ var rejectCodeMaxLength = 64;
2118
+ var rejectCodePattern = /^[a-z0-9-]+$/;
2119
+ function rejectCodeIssue(code) {
2120
+ if (typeof code !== "string" || code.length === 0 || code.length > rejectCodeMaxLength || !rejectCodePattern.test(code)) {
2121
+ return `Invalid reject code ${JSON.stringify(code)}: use lowercase letters, digits and hyphens, at most ${rejectCodeMaxLength} characters, such as "wrong-answers"`;
2122
+ }
2123
+ if (reservedAttemptCodes.includes(code)) {
2124
+ return `Invalid reject code ${JSON.stringify(code)}: Relay writes it itself. A reject code cannot be ${reservedAttemptCodes.join(", ")}`;
2125
+ }
2126
+ return null;
2127
+ }
2128
+ var rejectCodeSchema = z14.string().superRefine((code, context) => {
2129
+ const issue = rejectCodeIssue(code);
2130
+ if (issue) {
2131
+ context.addIssue({ code: "custom", message: issue });
2132
+ }
2133
+ });
2134
+
2135
+ // src/sdk-runtime.ts
2136
+ import * as z15 from "zod";
2105
2137
  var questScaleLimits = {
2106
2138
  quests: 1e3,
2107
2139
  questTypes: 200,
@@ -2112,22 +2144,22 @@ var sdkRuntimeLimits = {
2112
2144
  /** Characters of module source, summed over all modules. */
2113
2145
  size: 2e6
2114
2146
  };
2115
- var sha256 = z14.string().regex(/^[0-9a-f]{64}$/);
2116
- var sdkRuntimeModulePathSchema = z14.string().max(200).regex(/^[a-z0-9_][a-z0-9_.-]*(\/[a-z0-9_][a-z0-9_.-]*)*\.js$/i).refine(
2147
+ var sha256 = z15.string().regex(/^[0-9a-f]{64}$/);
2148
+ var sdkRuntimeModulePathSchema = z15.string().max(200).regex(/^[a-z0-9_][a-z0-9_.-]*(\/[a-z0-9_][a-z0-9_.-]*)*\.js$/i).refine(
2117
2149
  (path) => !path.split("/").some((part) => part === "." || part === ".."),
2118
2150
  "Runtime module paths cannot contain . or .. segments"
2119
2151
  );
2120
- var sdkRuntimeReferenceSchema = z14.object({
2152
+ var sdkRuntimeReferenceSchema = z15.object({
2121
2153
  digest: sha256,
2122
2154
  /** The SDK version that built the runtime, for display. The digest is what pins it. */
2123
- sdkVersion: z14.string().min(1).max(64)
2155
+ sdkVersion: z15.string().min(1).max(64)
2124
2156
  }).strict();
2125
- var sdkRuntimeModulesSchema = z14.record(sdkRuntimeModulePathSchema, z14.string().min(1)).refine((modules) => {
2157
+ var sdkRuntimeModulesSchema = z15.record(sdkRuntimeModulePathSchema, z15.string().min(1)).refine((modules) => {
2126
2158
  const entries = Object.values(modules);
2127
2159
  return entries.length > 0 && entries.length <= sdkRuntimeLimits.modules && entries.reduce((sum, source) => sum + source.length, 0) <= sdkRuntimeLimits.size;
2128
2160
  }, `A runtime has 1 to ${sdkRuntimeLimits.modules} modules and at most ${sdkRuntimeLimits.size} characters of source`);
2129
2161
  var sdkRuntimeSchema = sdkRuntimeReferenceSchema.extend({
2130
- zodVersion: z14.string().min(1).max(64),
2162
+ zodVersion: z15.string().min(1).max(64),
2131
2163
  modules: sdkRuntimeModulesSchema
2132
2164
  }).strict();
2133
2165
  async function sdkRuntimeDigest(modules) {
@@ -2142,60 +2174,60 @@ async function sdkRuntimeDigest(modules) {
2142
2174
  }
2143
2175
 
2144
2176
  // src/completion.ts
2145
- import * as z15 from "zod";
2146
- var name = z15.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$/);
2147
- var completionPolicySchema = z15.discriminatedUnion("kind", [
2177
+ import * as z16 from "zod";
2178
+ var name = z16.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$/);
2179
+ var completionPolicySchema = z16.discriminatedUnion("kind", [
2148
2180
  streakPolicySchema,
2149
2181
  counterPolicySchema,
2150
- z15.object({ kind: z15.literal("once") }).strict(),
2151
- z15.object({ kind: z15.literal("keyed") }).strict()
2182
+ z16.object({ kind: z16.literal("once") }).strict(),
2183
+ z16.object({ kind: z16.literal("keyed") }).strict()
2152
2184
  ]);
2153
- var completionKeySchema = z15.string().min(1).max(500);
2154
- var budgetSchema = z15.object({
2185
+ var completionKeySchema = z16.string().min(1).max(500);
2186
+ var budgetSchema = z16.object({
2155
2187
  id: name,
2156
- scope: z15.enum(["member", "project"]),
2188
+ scope: z16.enum(["member", "project"]),
2157
2189
  /**
2158
2190
  * The project calendar period of the attempt's eligibility time that one bucket covers:
2159
2191
  * `"day"`, `"week"` (ISO, starting on Monday) or `"month"` in the project timezone.
2160
2192
  * `"lifetime"` never resets.
2161
2193
  */
2162
2194
  period: calendarPeriodSchema,
2163
- limit: z15.number().int().positive().max(Number.MAX_SAFE_INTEGER),
2164
- cost: z15.union([
2165
- z15.number().int().positive().max(Number.MAX_SAFE_INTEGER),
2166
- z15.object({ balance: name }).strict()
2195
+ limit: z16.number().int().positive().max(Number.MAX_SAFE_INTEGER),
2196
+ cost: z16.union([
2197
+ z16.number().int().positive().max(Number.MAX_SAFE_INTEGER),
2198
+ z16.object({ balance: name }).strict()
2167
2199
  ])
2168
2200
  }).strict();
2169
2201
 
2170
2202
  // src/integrations.ts
2171
- import * as z16 from "zod";
2172
- var evaluatorIntegrationProviderSchema = z16.enum(["discord", "x"]);
2173
- var integrationProviderSchema = z16.enum(["discord"]);
2174
- var discordServerSchema = z16.object({
2175
- id: z16.string().regex(/^[0-9]{1,20}$/),
2176
- name: z16.string().min(1),
2177
- icon: z16.string().nullable()
2178
- });
2179
- var projectIntegrationSchema = z16.object({
2203
+ import * as z17 from "zod";
2204
+ var evaluatorIntegrationProviderSchema = z17.enum(["discord", "x"]);
2205
+ var integrationProviderSchema = z17.enum(["discord"]);
2206
+ var discordServerSchema = z17.object({
2207
+ id: z17.string().regex(/^[0-9]{1,20}$/),
2208
+ name: z17.string().min(1),
2209
+ icon: z17.string().nullable()
2210
+ });
2211
+ var projectIntegrationSchema = z17.object({
2180
2212
  provider: integrationProviderSchema,
2181
- configured: z16.boolean(),
2182
- status: z16.enum(["disconnected", "ready", "attention"]),
2183
- revision: z16.number().int().nonnegative(),
2213
+ configured: z17.boolean(),
2214
+ status: z17.enum(["disconnected", "ready", "attention"]),
2215
+ revision: z17.number().int().nonnegative(),
2184
2216
  server: discordServerSchema.nullable(),
2185
- issue: z16.string().nullable(),
2186
- connectedAt: z16.number().default(0)
2217
+ issue: z17.string().nullable(),
2218
+ connectedAt: z17.number().default(0)
2187
2219
  });
2188
2220
 
2189
2221
  // src/wallet.ts
2190
- import * as z17 from "zod";
2191
- var solanaAddressSchema = z17.string().min(32).max(44).regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
2192
- var walletChainSchema = z17.enum(["solana", "eip155", "cosmos"]);
2222
+ import * as z18 from "zod";
2223
+ var solanaAddressSchema = z18.string().min(32).max(44).regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
2224
+ var walletChainSchema = z18.enum(["solana", "eip155", "cosmos"]);
2193
2225
  var cosmosNetworkPattern = /^cosmos:[-_a-zA-Z0-9]{1,32}$/;
2194
- var cosmosNetworkSchema = z17.custom(
2226
+ var cosmosNetworkSchema = z18.custom(
2195
2227
  (value) => typeof value === "string" && cosmosNetworkPattern.test(value),
2196
2228
  "Use a Cosmos network: cosmos:<chain ID>"
2197
2229
  );
2198
- var cosmosDenomSchema = z17.string().regex(
2230
+ var cosmosDenomSchema = z18.string().regex(
2199
2231
  /^[a-zA-Z][a-zA-Z0-9/:._-]{2,127}$/,
2200
2232
  "Use a Cosmos bank denomination such as uatom or uosmo"
2201
2233
  );
@@ -2221,51 +2253,51 @@ function cosmosChain(chain) {
2221
2253
  return { ...value, network };
2222
2254
  }
2223
2255
  var solanaMainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
2224
- var evmAddressSchema = z17.string().regex(/^0x[0-9a-fA-F]{40}$/);
2225
- var cosmosAddressSchema = z17.string().min(8).max(90).regex(
2256
+ var evmAddressSchema = z18.string().regex(/^0x[0-9a-fA-F]{40}$/);
2257
+ var cosmosAddressSchema = z18.string().min(8).max(90).regex(
2226
2258
  /^(?:[a-z][a-z0-9]{0,82}1[02-9ac-hj-np-z]{38,}|[A-Z][A-Z0-9]{0,82}1[02-9AC-HJ-NP-Z]{38,})$/
2227
2259
  );
2228
- var walletAddressInputSchema = z17.discriminatedUnion("chain", [
2229
- z17.object({ chain: z17.literal("solana"), address: solanaAddressSchema }).strict(),
2230
- z17.object({
2231
- chain: z17.literal("eip155"),
2260
+ var walletAddressInputSchema = z18.discriminatedUnion("chain", [
2261
+ z18.object({ chain: z18.literal("solana"), address: solanaAddressSchema }).strict(),
2262
+ z18.object({
2263
+ chain: z18.literal("eip155"),
2232
2264
  address: evmAddressSchema,
2233
2265
  /** Shown in the sign-in message's Chain ID line only: links are chain-agnostic. Defaults to 1. */
2234
- chainId: z17.number().int().positive().safe().optional()
2266
+ chainId: z18.number().int().positive().safe().optional()
2235
2267
  }).strict(),
2236
- z17.object({
2237
- chain: z17.literal("cosmos"),
2268
+ z18.object({
2269
+ chain: z18.literal("cosmos"),
2238
2270
  network: cosmosNetworkSchema,
2239
2271
  address: cosmosAddressSchema
2240
2272
  }).strict()
2241
2273
  ]);
2242
- var walletMessageChallengeSchema = z17.object({
2243
- id: z17.string().min(1).max(200),
2244
- purpose: z17.enum(["link", "sign-in"]),
2274
+ var walletMessageChallengeSchema = z18.object({
2275
+ id: z18.string().min(1).max(200),
2276
+ purpose: z18.enum(["link", "sign-in"]),
2245
2277
  chain: walletChainSchema,
2246
2278
  network: cosmosNetworkSchema.nullable(),
2247
2279
  /** Canonical (base58, EIP-55 or lowercase bech32). The signer must sign with this address. */
2248
- address: z17.string(),
2249
- message: z17.string().max(4096),
2250
- expiresAt: z17.number().int()
2280
+ address: z18.string(),
2281
+ message: z18.string().max(4096),
2282
+ expiresAt: z18.number().int()
2251
2283
  });
2252
- var walletSignatureSchema = z17.object({
2253
- challenge: z17.string().min(1).max(200),
2284
+ var walletSignatureSchema = z18.object({
2285
+ challenge: z18.string().min(1).max(200),
2254
2286
  /** solana: base58, 64 bytes · eip155: 0x and 130 hex digits (65 bytes) · cosmos: base64, 64 bytes (r‖s) */
2255
- signature: z17.string().min(1).max(256),
2287
+ signature: z18.string().min(1).max(256),
2256
2288
  /** cosmos only: the base64 33-byte compressed secp256k1 key from signArbitrary's pub_key.value */
2257
- publicKey: z17.string().max(128).optional()
2289
+ publicKey: z18.string().max(128).optional()
2258
2290
  }).strict();
2259
- var linkedWalletSchema = z17.object({
2291
+ var linkedWalletSchema = z18.object({
2260
2292
  chain: walletChainSchema,
2261
2293
  network: cosmosNetworkSchema.nullable(),
2262
- address: z17.string(),
2263
- verifiedAt: z17.number().int().nonnegative(),
2264
- revision: z17.number().int().positive(),
2294
+ address: z18.string(),
2295
+ verifiedAt: z18.number().int().nonnegative(),
2296
+ revision: z18.number().int().positive(),
2265
2297
  /** True when this wallet can sign in: it was first used through wallet sign-in. Linking never enables sign-in. */
2266
- signIn: z17.boolean()
2298
+ signIn: z18.boolean()
2267
2299
  });
2268
- var walletUnlinkInputSchema = z17.object({ chain: walletChainSchema, address: z17.string().min(1).max(100) }).strict();
2300
+ var walletUnlinkInputSchema = z18.object({ chain: walletChainSchema, address: z18.string().min(1).max(100) }).strict();
2269
2301
  async function walletAddressInput(signer) {
2270
2302
  const address = await signer.address();
2271
2303
  switch (signer.chain) {
@@ -2289,8 +2321,8 @@ async function walletAddressInput(signer) {
2289
2321
  }
2290
2322
  var WALLETS_PER_CHAIN = 5;
2291
2323
  var walletSignInFamilies = ["solana", "eip155", "cosmos"];
2292
- var walletSignInNetworkSchema = z17.enum(walletSignInFamilies);
2293
- var walletSignInNetworksSchema = z17.array(walletSignInNetworkSchema).max(walletSignInFamilies.length).refine((values2) => new Set(values2).size === values2.length, {
2324
+ var walletSignInNetworkSchema = z18.enum(walletSignInFamilies);
2325
+ var walletSignInNetworksSchema = z18.array(walletSignInNetworkSchema).max(walletSignInFamilies.length).refine((values2) => new Set(values2).size === values2.length, {
2294
2326
  message: "Duplicate wallet family"
2295
2327
  }).transform(
2296
2328
  (values2) => walletSignInFamilies.filter((family) => values2.includes(family))
@@ -2315,41 +2347,41 @@ function caip10(wallet, network) {
2315
2347
  function isEvmChainId(value) {
2316
2348
  return /^eip155:[1-9][0-9]{0,15}$/.test(value);
2317
2349
  }
2318
- var evmChainIdSchema = z17.custom(
2350
+ var evmChainIdSchema = z18.custom(
2319
2351
  (value) => typeof value === "string" && isEvmChainId(value),
2320
2352
  'Use an EVM chain ID such as "eip155:8453"'
2321
2353
  );
2322
- var units = z17.string().regex(/^(0|[1-9][0-9]*)$/);
2354
+ var units = z18.string().regex(/^(0|[1-9][0-9]*)$/);
2323
2355
  var walletBalanceSchema = responseShape(
2324
- z17.object({
2356
+ z18.object({
2325
2357
  /** Canonical CAIP-2 ID for Solana, EVM or a supported Cosmos SDK chain. */
2326
- chain: z17.string(),
2358
+ chain: z18.string(),
2327
2359
  /** The canonical mint, EIP-55 contract or Cosmos bank denom; null for a native coin. */
2328
- token: z17.string().nullable(),
2360
+ token: z18.string().nullable(),
2329
2361
  /** Null when token metadata does not report decimals. */
2330
- decimals: z17.number().int().min(0).max(255).nullable(),
2362
+ decimals: z18.number().int().min(0).max(255).nullable(),
2331
2363
  /** The sum over `wallets`. */
2332
2364
  total: units,
2333
- wallets: z17.array(
2334
- z17.object({ address: z17.string(), amount: units }).strict()
2365
+ wallets: z18.array(
2366
+ z18.object({ address: z18.string(), amount: units }).strict()
2335
2367
  ),
2336
2368
  /** Solana: lowest slot. EVM: approximate latest block. Cosmos: the fixed queried block. */
2337
- at: z17.object({ kind: z17.enum(["slot", "block"]), number: units }).strict(),
2338
- observedAt: z17.number().int().nonnegative()
2369
+ at: z18.object({ kind: z18.enum(["slot", "block"]), number: units }).strict(),
2370
+ observedAt: z18.number().int().nonnegative()
2339
2371
  }).strict()
2340
2372
  );
2341
2373
 
2342
2374
  // src/submission-input.ts
2343
- import * as z18 from "zod";
2344
- var textOptionsSchema = z18.object({
2345
- required: z18.boolean().default(true),
2346
- minLength: z18.number().int().min(0).max(1e4).default(1),
2347
- maxLength: z18.number().int().min(1).max(1e4).default(1e4)
2375
+ import * as z19 from "zod";
2376
+ var textOptionsSchema = z19.object({
2377
+ required: z19.boolean().default(true),
2378
+ minLength: z19.number().int().min(0).max(1e4).default(1),
2379
+ maxLength: z19.number().int().min(1).max(1e4).default(1e4)
2348
2380
  }).strict().refine(
2349
2381
  (v) => v.minLength <= v.maxLength,
2350
2382
  "minLength must not exceed maxLength"
2351
2383
  );
2352
- var hostSchema = z18.string().min(1).max(253).refine((host) => {
2384
+ var hostSchema = z19.string().min(1).max(253).refine((host) => {
2353
2385
  if (!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/i.test(host) || host.includes("..")) {
2354
2386
  return false;
2355
2387
  }
@@ -2360,13 +2392,13 @@ var hostSchema = z18.string().min(1).max(253).refine((host) => {
2360
2392
  return false;
2361
2393
  }
2362
2394
  }, "Use a hostname without a scheme, path, port, or wildcard");
2363
- var urlOptionsSchema = z18.object({
2364
- required: z18.boolean().default(true),
2365
- allowedHosts: z18.array(hostSchema).min(1).max(100).optional()
2395
+ var urlOptionsSchema = z19.object({
2396
+ required: z19.boolean().default(true),
2397
+ allowedHosts: z19.array(hostSchema).min(1).max(100).optional()
2366
2398
  }).strict();
2367
- var textEvidenceSchema = z18.object({ kind: z18.literal("text"), value: z18.string().max(1e4) }).strict();
2368
- var urlEvidenceSchema = z18.object({ kind: z18.literal("url"), value: z18.string().max(2048) }).strict();
2369
- var valueEvidenceSchema = z18.discriminatedUnion("kind", [
2399
+ var textEvidenceSchema = z19.object({ kind: z19.literal("text"), value: z19.string().max(1e4) }).strict();
2400
+ var urlEvidenceSchema = z19.object({ kind: z19.literal("url"), value: z19.string().max(2048) }).strict();
2401
+ var valueEvidenceSchema = z19.discriminatedUnion("kind", [
2370
2402
  textEvidenceSchema,
2371
2403
  urlEvidenceSchema
2372
2404
  ]);
@@ -2429,22 +2461,22 @@ function xPostId(value) {
2429
2461
  }
2430
2462
 
2431
2463
  // src/quiz.ts
2432
- import * as z19 from "zod";
2433
- var quizId = z19.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
2434
- var quizChoiceSchema = z19.object({ id: quizId, label: z19.string().trim().min(1).max(500) }).strict();
2435
- var quizQuestionSchema = z19.object({
2464
+ import * as z20 from "zod";
2465
+ var quizId = z20.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
2466
+ var quizChoiceSchema = z20.object({ id: quizId, label: z20.string().trim().min(1).max(500) }).strict();
2467
+ var quizQuestionSchema = z20.object({
2436
2468
  id: quizId,
2437
- prompt: z19.string().trim().min(1).max(1e3),
2438
- choices: z19.array(quizChoiceSchema).min(2).max(8).refine(
2469
+ prompt: z20.string().trim().min(1).max(1e3),
2470
+ choices: z20.array(quizChoiceSchema).min(2).max(8).refine(
2439
2471
  (choices) => new Set(choices.map((choice) => choice.id)).size === choices.length,
2440
2472
  "Choice IDs must be unique"
2441
2473
  )
2442
2474
  }).strict();
2443
- var quizQuestionsSchema = z19.array(quizQuestionSchema).min(1).max(20).refine(
2475
+ var quizQuestionsSchema = z20.array(quizQuestionSchema).min(1).max(20).refine(
2444
2476
  (questions) => new Set(questions.map((question) => question.id)).size === questions.length,
2445
2477
  "Question IDs must be unique"
2446
2478
  );
2447
- var quizContentSchema = z19.array(
2479
+ var quizContentSchema = z20.array(
2448
2480
  quizQuestionSchema.extend({ correct: quizId }).refine(
2449
2481
  (question) => question.choices.some((choice) => choice.id === question.correct),
2450
2482
  "Choose a correct answer from the available choices"
@@ -2455,99 +2487,99 @@ var quizContentSchema = z19.array(
2455
2487
  );
2456
2488
 
2457
2489
  // src/resources.ts
2458
- import * as z20 from "zod";
2459
- var resourceSourceSchema = z20.union([
2460
- z20.strictObject({
2461
- provider: z20.literal("domino"),
2462
- resource: z20.literal("point-ledger")
2490
+ import * as z21 from "zod";
2491
+ var resourceSourceSchema = z21.union([
2492
+ z21.strictObject({
2493
+ provider: z21.literal("domino"),
2494
+ resource: z21.literal("point-ledger")
2463
2495
  }),
2464
2496
  discordResourceSourceSchema
2465
2497
  ]);
2466
- var resourceRequestSchema = z20.object({
2498
+ var resourceRequestSchema = z21.object({
2467
2499
  source: resourceSourceSchema,
2468
- query: z20.string().max(100).optional(),
2469
- cursor: z20.string().regex(/^\d{1,6}$/).optional(),
2470
- ids: z20.array(z20.string().min(1).max(100)).max(50).optional()
2500
+ query: z21.string().max(100).optional(),
2501
+ cursor: z21.string().regex(/^\d{1,6}$/).optional(),
2502
+ ids: z21.array(z21.string().min(1).max(100)).max(50).optional()
2471
2503
  }).strict();
2472
- var resourceOptionsSchema = z20.object({
2473
- revision: z20.number().int(),
2474
- options: z20.array(
2475
- z20.object({
2476
- id: z20.string(),
2477
- label: z20.string(),
2478
- description: z20.string().optional(),
2479
- group: z20.string().optional(),
2480
- disabledReason: z20.string().optional()
2504
+ var resourceOptionsSchema = z21.object({
2505
+ revision: z21.number().int(),
2506
+ options: z21.array(
2507
+ z21.object({
2508
+ id: z21.string(),
2509
+ label: z21.string(),
2510
+ description: z21.string().optional(),
2511
+ group: z21.string().optional(),
2512
+ disabledReason: z21.string().optional()
2481
2513
  })
2482
2514
  ),
2483
2515
  /** Pass back as `cursor` for the next page; null on the last one. */
2484
- nextCursor: z20.string().nullable().default(null),
2516
+ nextCursor: z21.string().nullable().default(null),
2485
2517
  /** @deprecated Use `nextCursor`. Removed in 2.0.0. */
2486
- cursor: z20.string().nullable()
2518
+ cursor: z21.string().nullable()
2487
2519
  });
2488
2520
 
2489
2521
  // src/settings.ts
2490
- import * as z22 from "zod";
2522
+ import * as z23 from "zod";
2491
2523
 
2492
2524
  // src/setting-values.ts
2493
- import * as z21 from "zod";
2494
- var settingInstant = z21.iso.datetime({ offset: true }).transform((value) => new Date(value).toISOString());
2495
- var settingResourceId = z21.union([
2496
- z21.literal(""),
2497
- z21.string().regex(/^\S{1,200}$/)
2525
+ import * as z22 from "zod";
2526
+ var settingInstant = z22.iso.datetime({ offset: true }).transform((value) => new Date(value).toISOString());
2527
+ var settingResourceId = z22.union([
2528
+ z22.literal(""),
2529
+ z22.string().regex(/^\S{1,200}$/)
2498
2530
  ]);
2499
2531
 
2500
2532
  // src/settings.ts
2501
- var base = { label: z22.string().min(1), description: z22.string().optional() };
2502
- var settingFieldSchema = z22.discriminatedUnion("kind", [
2503
- z22.object({
2533
+ var base = { label: z23.string().min(1), description: z23.string().optional() };
2534
+ var settingFieldSchema = z23.discriminatedUnion("kind", [
2535
+ z23.object({
2504
2536
  ...base,
2505
- kind: z22.literal("point-ledger"),
2506
- default: identifier.or(z22.literal(""))
2537
+ kind: z23.literal("point-ledger"),
2538
+ default: identifier.or(z23.literal(""))
2507
2539
  }).strict(),
2508
- z22.object({ ...base, kind: z22.literal("datetime"), default: settingInstant }).strict(),
2509
- z22.object({
2540
+ z23.object({ ...base, kind: z23.literal("datetime"), default: settingInstant }).strict(),
2541
+ z23.object({
2510
2542
  ...base,
2511
- kind: z22.literal("resource"),
2543
+ kind: z23.literal("resource"),
2512
2544
  default: settingResourceId,
2513
2545
  source: resourceSourceSchema
2514
2546
  }).strict(),
2515
- z22.object({ ...base, kind: z22.literal("quiz"), default: quizContentSchema }).strict(),
2516
- z22.object({
2547
+ z23.object({ ...base, kind: z23.literal("quiz"), default: quizContentSchema }).strict(),
2548
+ z23.object({
2517
2549
  ...base,
2518
- kind: z22.literal("text"),
2519
- default: z22.string(),
2520
- minLength: z22.number().int().nonnegative(),
2521
- maxLength: z22.number().int().positive(),
2522
- multiline: z22.boolean(),
2550
+ kind: z23.literal("text"),
2551
+ default: z23.string(),
2552
+ minLength: z23.number().int().nonnegative(),
2553
+ maxLength: z23.number().int().positive(),
2554
+ multiline: z23.boolean(),
2523
2555
  /**
2524
2556
  * A list Console offers the value from, beside free text: `telegram-chat` lists the
2525
2557
  * project's connected Telegram chats. Unknown pickers read as free text.
2526
2558
  */
2527
- picker: z22.string().optional()
2559
+ picker: z23.string().optional()
2528
2560
  }).strict(),
2529
- z22.object({
2561
+ z23.object({
2530
2562
  ...base,
2531
- kind: z22.literal("integer"),
2532
- default: z22.number().int(),
2533
- min: z22.number().int(),
2534
- max: z22.number().int()
2563
+ kind: z23.literal("integer"),
2564
+ default: z23.number().int(),
2565
+ min: z23.number().int(),
2566
+ max: z23.number().int()
2535
2567
  }).strict(),
2536
- z22.object({ ...base, kind: z22.literal("boolean"), default: z22.boolean() }).strict(),
2537
- z22.object({
2568
+ z23.object({ ...base, kind: z23.literal("boolean"), default: z23.boolean() }).strict(),
2569
+ z23.object({
2538
2570
  ...base,
2539
- kind: z22.literal("choice"),
2540
- default: z22.string(),
2541
- options: z22.array(z22.string().min(1)).min(1)
2571
+ kind: z23.literal("choice"),
2572
+ default: z23.string(),
2573
+ options: z23.array(z23.string().min(1)).min(1)
2542
2574
  }).strict()
2543
2575
  ]);
2544
- var settingsFieldsSchema = z22.record(
2545
- z22.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
2576
+ var settingsFieldsSchema = z23.record(
2577
+ z23.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
2546
2578
  settingFieldSchema
2547
2579
  );
2548
- var settingsValuesSchema = z22.record(
2549
- z22.string(),
2550
- z22.union([z22.string(), z22.number().finite(), z22.boolean(), quizContentSchema])
2580
+ var settingsValuesSchema = z23.record(
2581
+ z23.string(),
2582
+ z23.union([z23.string(), z23.number().finite(), z23.boolean(), quizContentSchema])
2551
2583
  );
2552
2584
  function parseSettings(fields2, input) {
2553
2585
  const shape = {};
@@ -2566,20 +2598,20 @@ function parseSettings(fields2, input) {
2566
2598
  shape[key] = quizContentSchema.default(field.default);
2567
2599
  break;
2568
2600
  case "text":
2569
- shape[key] = z22.string().min(field.minLength).max(field.maxLength).default(field.default);
2601
+ shape[key] = z23.string().min(field.minLength).max(field.maxLength).default(field.default);
2570
2602
  break;
2571
2603
  case "integer":
2572
- shape[key] = z22.number().int().min(field.min).max(field.max).default(field.default);
2604
+ shape[key] = z23.number().int().min(field.min).max(field.max).default(field.default);
2573
2605
  break;
2574
2606
  case "boolean":
2575
- shape[key] = z22.boolean().default(field.default);
2607
+ shape[key] = z23.boolean().default(field.default);
2576
2608
  break;
2577
2609
  case "choice":
2578
- shape[key] = z22.enum(field.options).default(field.default);
2610
+ shape[key] = z23.enum(field.options).default(field.default);
2579
2611
  break;
2580
2612
  }
2581
2613
  }
2582
- return settingsValuesSchema.parse(z22.object(shape).strict().parse(input));
2614
+ return settingsValuesSchema.parse(z23.object(shape).strict().parse(input));
2583
2615
  }
2584
2616
  function missingResourceSettings(fields2, values2) {
2585
2617
  return Object.entries(fields2).filter(
@@ -2600,21 +2632,21 @@ function authoringKey(input) {
2600
2632
  }
2601
2633
 
2602
2634
  // src/campaigns.ts
2603
- import * as z23 from "zod";
2604
- var timestamp4 = z23.number().int().safe().nonnegative();
2605
- var availabilityWindowSchema = z23.object({ from: timestamp4, until: timestamp4 }).strict().refine((window) => window.until > window.from, {
2635
+ import * as z24 from "zod";
2636
+ var timestamp4 = z24.number().int().safe().nonnegative();
2637
+ var availabilityWindowSchema = z24.object({ from: timestamp4, until: timestamp4 }).strict().refine((window) => window.until > window.from, {
2606
2638
  message: "Window end must follow its start",
2607
2639
  path: ["until"]
2608
2640
  });
2609
- var campaignDefinitionSchema = z23.object({
2641
+ var campaignDefinitionSchema = z24.object({
2610
2642
  key: identifier,
2611
- title: z23.string().trim().min(1).max(120),
2643
+ title: z24.string().trim().min(1).max(120),
2612
2644
  window: availabilityWindowSchema.optional(),
2613
- enrollment: z23.enum(["none", "required"]).default("none")
2645
+ enrollment: z24.enum(["none", "required"]).default("none")
2614
2646
  }).strict();
2615
2647
  var campaignAuthoringSchema = campaignDefinitionSchema.omit({ key: true, title: true }).extend({
2616
2648
  ...authoringIdentityShape,
2617
- title: z23.string().trim().min(1).max(120).optional()
2649
+ title: z24.string().trim().min(1).max(120).optional()
2618
2650
  }).strict().transform((value) => {
2619
2651
  const normalized = value;
2620
2652
  return campaignDefinitionSchema.parse({
@@ -2628,42 +2660,42 @@ function defineCampaign(input) {
2628
2660
  var campaignViewSchema = campaignDefinitionSchema.extend({
2629
2661
  enrolledAt: timestamp4.nullable(),
2630
2662
  withdrawnAt: timestamp4.nullable().default(null),
2631
- withdrawalReason: z23.string().nullable().default(null)
2663
+ withdrawalReason: z24.string().nullable().default(null)
2632
2664
  });
2633
- var campaignEnrollmentInputSchema = z23.object({ actionId: identifier, campaign: identifier }).strict();
2665
+ var campaignEnrollmentInputSchema = z24.object({ actionId: identifier, campaign: identifier }).strict();
2634
2666
  var memberCampaignEnrollmentInputSchema = campaignEnrollmentInputSchema.extend({ member: identifier });
2635
2667
  var campaignWithdrawalInputSchema = campaignEnrollmentInputSchema;
2636
2668
  var memberCampaignWithdrawalInputSchema = campaignWithdrawalInputSchema.extend({
2637
2669
  member: identifier,
2638
- reason: z23.string().trim().min(1).max(500)
2670
+ reason: z24.string().trim().min(1).max(500)
2639
2671
  });
2640
- var campaignEnrollmentSchema = z23.object({
2672
+ var campaignEnrollmentSchema = z24.object({
2641
2673
  campaign: identifier,
2642
2674
  member: identifier,
2643
2675
  enrolledAt: timestamp4,
2644
2676
  withdrawnAt: timestamp4.nullable().default(null),
2645
- withdrawalReason: z23.string().nullable().default(null)
2677
+ withdrawalReason: z24.string().nullable().default(null)
2646
2678
  });
2647
2679
 
2648
2680
  // src/resource-handle.ts
2649
- import * as z24 from "zod";
2681
+ import * as z25 from "zod";
2650
2682
  function resourceHandle(_kind, definition) {
2651
2683
  return definition;
2652
2684
  }
2653
- var ledgerSettingSchema = identifier.or(z24.literal("")).brand();
2685
+ var ledgerSettingSchema = identifier.or(z25.literal("")).brand();
2654
2686
  function ledgerKey(ledger) {
2655
2687
  return typeof ledger === "string" ? ledger : ledger.key;
2656
2688
  }
2657
2689
 
2658
2690
  // src/groups.ts
2659
- import * as z25 from "zod";
2660
- var projectGroupSchema = z25.object({
2691
+ import * as z26 from "zod";
2692
+ var projectGroupSchema = z26.object({
2661
2693
  key: identifier,
2662
- title: z25.string().trim().min(1).max(120)
2694
+ title: z26.string().trim().min(1).max(120)
2663
2695
  }).strict();
2664
2696
  var projectGroupAuthoringSchema = projectGroupSchema.omit({ key: true, title: true }).extend({
2665
2697
  ...authoringIdentityShape,
2666
- title: z25.string().trim().min(1).max(120).optional()
2698
+ title: z26.string().trim().min(1).max(120).optional()
2667
2699
  }).strict().transform((value) => {
2668
2700
  return projectGroupSchema.parse({
2669
2701
  ...value,
@@ -2676,92 +2708,92 @@ function defineGroup(input) {
2676
2708
  function projectGroupKey(group) {
2677
2709
  return identifier.parse(group.key);
2678
2710
  }
2679
- var groupTitle = z25.string().trim().min(1).max(120);
2680
- var reason = z25.string().trim().min(1).max(1e3);
2681
- var timestamp5 = z25.number().int().nonnegative().max(864e13);
2682
- var createGroupSchema = z25.object({ actionId: identifier, key: identifier, title: groupTitle }).strict();
2683
- var updateGroupSchema = z25.object({ title: groupTitle }).strict();
2684
- var addGroupMemberSchema = z25.object({ actionId: identifier, member: identifier, reason }).strict();
2685
- var removeGroupMemberSchema = z25.object({ actionId: identifier, reason }).strict();
2686
- var groupPageQuerySchema = z25.strictObject({
2711
+ var groupTitle = z26.string().trim().min(1).max(120);
2712
+ var reason = z26.string().trim().min(1).max(1e3);
2713
+ var timestamp5 = z26.number().int().nonnegative().max(864e13);
2714
+ var createGroupSchema = z26.object({ actionId: identifier, key: identifier, title: groupTitle }).strict();
2715
+ var updateGroupSchema = z26.object({ title: groupTitle }).strict();
2716
+ var addGroupMemberSchema = z26.object({ actionId: identifier, member: identifier, reason }).strict();
2717
+ var removeGroupMemberSchema = z26.object({ actionId: identifier, reason }).strict();
2718
+ var groupPageQuerySchema = z26.strictObject({
2687
2719
  cursor: pageCursorSchema.optional(),
2688
2720
  /** Items per page, 1–100; the default is 50. */
2689
- limit: z25.number().int().min(1).max(100).optional()
2721
+ limit: z26.number().int().min(1).max(100).optional()
2690
2722
  });
2691
- var managedGroupSchema = z25.object({
2723
+ var managedGroupSchema = z26.object({
2692
2724
  key: identifier,
2693
- title: z25.string(),
2694
- members: z25.number().int().nonnegative(),
2725
+ title: z26.string(),
2726
+ members: z26.number().int().nonnegative(),
2695
2727
  createdAt: timestamp5,
2696
2728
  archivedAt: timestamp5.nullable()
2697
2729
  });
2698
- var groupPageSchema = z25.object({
2699
- items: z25.array(managedGroupSchema),
2730
+ var groupPageSchema = z26.object({
2731
+ items: z26.array(managedGroupSchema),
2700
2732
  nextCursor: pageCursorSchema.nullable()
2701
2733
  });
2702
- var groupMemberSchema = z25.object({
2734
+ var groupMemberSchema = z26.object({
2703
2735
  member: identifier,
2704
2736
  addedAt: timestamp5.nullable()
2705
2737
  });
2706
- var groupMemberPageSchema = z25.object({
2707
- items: z25.array(groupMemberSchema),
2738
+ var groupMemberPageSchema = z26.object({
2739
+ items: z26.array(groupMemberSchema),
2708
2740
  nextCursor: pageCursorSchema.nullable()
2709
2741
  });
2710
2742
 
2711
2743
  // src/prerequisites.ts
2712
- import * as z26 from "zod";
2713
- var amount = z26.number().int().safe().nonnegative();
2744
+ import * as z27 from "zod";
2745
+ var amount = z27.number().int().safe().nonnegative();
2714
2746
  var threshold = amount.positive();
2715
- var completionPrerequisiteSchema = z26.discriminatedUnion("scope", [
2716
- z26.object({
2717
- kind: z26.literal("completion"),
2747
+ var completionPrerequisiteSchema = z27.discriminatedUnion("scope", [
2748
+ z27.object({
2749
+ kind: z27.literal("completion"),
2718
2750
  quest: identifier,
2719
- scope: z26.literal("ever")
2751
+ scope: z27.literal("ever")
2720
2752
  }).strict(),
2721
- z26.object({
2722
- kind: z26.literal("completion"),
2753
+ z27.object({
2754
+ kind: z27.literal("completion"),
2723
2755
  quest: identifier,
2724
- scope: z26.literal("period"),
2756
+ scope: z27.literal("period"),
2725
2757
  period: calendarPeriodSchema.exclude(["lifetime"])
2726
2758
  }).strict()
2727
2759
  ]);
2728
- var balancePrerequisiteSchema = z26.object({
2729
- kind: z26.literal("balance"),
2760
+ var balancePrerequisiteSchema = z27.object({
2761
+ kind: z27.literal("balance"),
2730
2762
  balance: identifier,
2731
2763
  minimum: threshold
2732
2764
  }).strict();
2733
- var groupPrerequisiteSchema = z26.object({ kind: z26.literal("group"), group: identifier, title: z26.string() }).strict();
2734
- var prerequisiteSchema = z26.discriminatedUnion("kind", [
2765
+ var groupPrerequisiteSchema = z27.object({ kind: z27.literal("group"), group: identifier, title: z27.string() }).strict();
2766
+ var prerequisiteSchema = z27.discriminatedUnion("kind", [
2735
2767
  completionPrerequisiteSchema,
2736
2768
  balancePrerequisiteSchema,
2737
2769
  groupPrerequisiteSchema
2738
2770
  ]);
2739
- var missingPrerequisiteSchema = z26.union([
2740
- z26.object({
2741
- kind: z26.literal("completion"),
2771
+ var missingPrerequisiteSchema = z27.union([
2772
+ z27.object({
2773
+ kind: z27.literal("completion"),
2742
2774
  quest: identifier,
2743
- title: z26.string(),
2744
- scope: z26.literal("ever")
2775
+ title: z27.string(),
2776
+ scope: z27.literal("ever")
2745
2777
  }),
2746
- z26.object({
2747
- kind: z26.literal("completion"),
2778
+ z27.object({
2779
+ kind: z27.literal("completion"),
2748
2780
  quest: identifier,
2749
- title: z26.string(),
2750
- scope: z26.literal("period"),
2781
+ title: z27.string(),
2782
+ scope: z27.literal("period"),
2751
2783
  period: calendarPeriodSchema.exclude(["lifetime"]),
2752
- resetsAt: z26.number().int().safe()
2784
+ resetsAt: z27.number().int().safe()
2753
2785
  }),
2754
- z26.object({
2755
- kind: z26.literal("balance"),
2786
+ z27.object({
2787
+ kind: z27.literal("balance"),
2756
2788
  balance: identifier,
2757
- title: z26.string(),
2789
+ title: z27.string(),
2758
2790
  minimum: threshold,
2759
2791
  current: amount
2760
2792
  }),
2761
- z26.object({
2762
- kind: z26.literal("group"),
2793
+ z27.object({
2794
+ kind: z27.literal("group"),
2763
2795
  group: identifier,
2764
- title: z26.string()
2796
+ title: z27.string()
2765
2797
  })
2766
2798
  ]);
2767
2799
  function completed(quest, options = {}) {
@@ -2792,29 +2824,29 @@ function inGroup(group) {
2792
2824
  var maxPointsAmount = 2147483647;
2793
2825
 
2794
2826
  // src/schema.ts
2795
- import * as z27 from "zod";
2796
- var pointsRewardSchema = z27.object({
2797
- kind: z27.literal("points").default("points"),
2827
+ import * as z28 from "zod";
2828
+ var pointsRewardSchema = z28.object({
2829
+ kind: z28.literal("points").default("points"),
2798
2830
  balance: identifier,
2799
- amount: z27.number().int().min(0).max(maxPointsAmount)
2831
+ amount: z28.number().int().min(0).max(maxPointsAmount)
2800
2832
  }).strict();
2801
- var tieredRewardDefinitionSchema = z27.object({
2833
+ var tieredRewardDefinitionSchema = z28.object({
2802
2834
  /** An automatic achievement backed by the project badge catalog. */
2803
2835
  badge: identifier.optional(),
2804
2836
  /** Membership in the project group with this key, added when the reward is delivered. */
2805
2837
  group: identifier.optional(),
2806
2838
  id: identifier,
2807
- title: z27.string().min(1).max(120),
2808
- tiers: z27.array(
2809
- z27.object({ id: identifier, title: z27.string().min(1).max(120) }).strict()
2839
+ title: z28.string().min(1).max(120),
2840
+ tiers: z28.array(
2841
+ z28.object({ id: identifier, title: z28.string().min(1).max(120) }).strict()
2810
2842
  ).min(1).max(20).refine(
2811
2843
  (tiers) => new Set(tiers.map((t) => t.id)).size === tiers.length,
2812
2844
  "Tier IDs must be unique"
2813
2845
  ),
2814
- inventory: z27.object({ kind: z27.literal("untracked") }).strict(),
2815
- fulfillment: z27.discriminatedUnion("kind", [
2816
- z27.object({ kind: z27.literal("staff-handover") }).strict(),
2817
- z27.object({ kind: z27.literal("automatic") }).strict()
2846
+ inventory: z28.object({ kind: z28.literal("untracked") }).strict(),
2847
+ fulfillment: z28.discriminatedUnion("kind", [
2848
+ z28.object({ kind: z28.literal("staff-handover") }).strict(),
2849
+ z28.object({ kind: z28.literal("automatic") }).strict()
2818
2850
  ])
2819
2851
  }).strict().refine(
2820
2852
  (value) => value.badge === void 0 && value.group === void 0 || value.fulfillment.kind === "automatic" && value.tiers.length === 1 && value.tiers[0].id === "awarded",
@@ -2823,12 +2855,12 @@ var tieredRewardDefinitionSchema = z27.object({
2823
2855
  (value) => value.badge === void 0 || value.group === void 0,
2824
2856
  "A reward is either a badge or a group membership"
2825
2857
  );
2826
- var tieredRewardReferenceSchema = z27.object({
2858
+ var tieredRewardReferenceSchema = z28.object({
2827
2859
  id: identifier,
2828
2860
  key: identifier.nullable()
2829
2861
  });
2830
- var tierRewardSchema = z27.object({
2831
- kind: z27.literal("tier"),
2862
+ var tierRewardSchema = z28.object({
2863
+ kind: z28.literal("tier"),
2832
2864
  reward: tieredRewardDefinitionSchema,
2833
2865
  tier: identifier
2834
2866
  }).strict().refine(
@@ -2840,7 +2872,7 @@ var badgeRewardSchema = tierRewardSchema.transform(
2840
2872
  const badge = value.reward.badge;
2841
2873
  if (!badge || value.reward.fulfillment.kind !== "automatic" || value.reward.tiers.length !== 1 || value.tier !== "awarded") {
2842
2874
  context.addIssue({ code: "custom", message: "Invalid badge reward" });
2843
- return z27.NEVER;
2875
+ return z28.NEVER;
2844
2876
  }
2845
2877
  return { ...value, reward: { ...value.reward, badge } };
2846
2878
  }
@@ -2864,7 +2896,7 @@ var groupRewardSchema = tierRewardSchema.transform(
2864
2896
  const group = value.reward.group;
2865
2897
  if (!group || value.reward.fulfillment.kind !== "automatic" || value.reward.tiers.length !== 1 || value.tier !== "awarded") {
2866
2898
  context.addIssue({ code: "custom", message: "Invalid group reward" });
2867
- return z27.NEVER;
2899
+ return z28.NEVER;
2868
2900
  }
2869
2901
  return { ...value, reward: { ...value.reward, group } };
2870
2902
  }
@@ -2884,7 +2916,7 @@ function groupReward(key, title) {
2884
2916
  });
2885
2917
  }
2886
2918
  var integrationRewardSchema = discordRewardSchema;
2887
- var rewardSchema = z27.union([
2919
+ var rewardSchema = z28.union([
2888
2920
  pointsRewardSchema,
2889
2921
  tierRewardSchema,
2890
2922
  integrationRewardSchema
@@ -2901,39 +2933,39 @@ function rewardKey(reward) {
2901
2933
  }
2902
2934
  return reward.kind === "points" ? "points:" + reward.balance : "tier:" + reward.reward.id;
2903
2935
  }
2904
- var triggerSchema = z27.union([
2905
- z27.object({
2906
- kind: z27.literal("manual"),
2907
- input: z27.literal("text"),
2936
+ var triggerSchema = z28.union([
2937
+ z28.object({
2938
+ kind: z28.literal("manual"),
2939
+ input: z28.literal("text"),
2908
2940
  constraints: textOptionsSchema,
2909
- actor: z27.enum(["member", "staff"]).optional()
2941
+ actor: z28.enum(["member", "staff"]).optional()
2910
2942
  }).strict(),
2911
- z27.object({
2912
- kind: z27.literal("manual"),
2913
- input: z27.literal("url"),
2943
+ z28.object({
2944
+ kind: z28.literal("manual"),
2945
+ input: z28.literal("url"),
2914
2946
  constraints: urlOptionsSchema,
2915
- actor: z27.enum(["member", "staff"]).optional()
2947
+ actor: z28.enum(["member", "staff"]).optional()
2916
2948
  }).strict(),
2917
- z27.object({
2918
- kind: z27.literal("manual"),
2919
- input: z27.enum(["photo", "quiz", "none"]),
2920
- actor: z27.enum(["member", "staff"]).optional()
2949
+ z28.object({
2950
+ kind: z28.literal("manual"),
2951
+ input: z28.enum(["photo", "quiz", "none"]),
2952
+ actor: z28.enum(["member", "staff"]).optional()
2921
2953
  }).strict(),
2922
- z27.object({
2923
- kind: z27.literal("automatic"),
2954
+ z28.object({
2955
+ kind: z28.literal("automatic"),
2924
2956
  tracker: trackerTriggerPolicySchema.optional()
2925
2957
  }).strict()
2926
2958
  ]);
2927
- var triggerResponseSchema = z27.union(
2959
+ var triggerResponseSchema = z28.union(
2928
2960
  triggerSchema.options.map((option) => option.strip())
2929
2961
  );
2930
- var photoResultSchema = z27.object({
2931
- kind: z27.enum(["pass", "fail", "unclear"]),
2932
- reason: z27.string().min(1).max(2e3)
2962
+ var photoResultSchema = z28.object({
2963
+ kind: z28.enum(["pass", "fail", "unclear"]),
2964
+ reason: z28.string().min(1).max(2e3)
2933
2965
  }).strict();
2934
- var textReviewInputSchema = z27.object({
2935
- text: z27.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
2936
- criteria: z27.string().trim().min(1).max(2e3)
2966
+ var textReviewInputSchema = z28.object({
2967
+ text: z28.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
2968
+ criteria: z28.string().trim().min(1).max(2e3)
2937
2969
  }).strict();
2938
2970
  var textResultSchema = photoResultSchema;
2939
2971
  var deferPolicy = {
@@ -2947,54 +2979,60 @@ var retryCooldownPolicy = {
2947
2979
  minMs: 1e3,
2948
2980
  maxMs: 6048e5
2949
2981
  };
2950
- var retryCooldownMsSchema = z27.number().int().min(retryCooldownPolicy.minMs).max(retryCooldownPolicy.maxMs);
2951
- var evaluatorProgressSchema = z27.object({
2952
- current: z27.number().finite().nonnegative(),
2953
- target: z27.number().finite().positive(),
2954
- reason: z27.string().min(1).max(2e3)
2982
+ var retryCooldownMsSchema = z28.number().int().min(retryCooldownPolicy.minMs).max(retryCooldownPolicy.maxMs);
2983
+ var evaluatorProgressSchema = z28.object({
2984
+ current: z28.number().finite().nonnegative(),
2985
+ target: z28.number().finite().positive(),
2986
+ reason: z28.string().min(1).max(2e3)
2955
2987
  }).refine((value) => value.current <= value.target, {
2956
2988
  message: "Progress current must not exceed target"
2957
2989
  });
2958
- var decisionSchema = z27.discriminatedUnion("kind", [
2959
- z27.strictObject({
2960
- kind: z27.literal("defer"),
2961
- reason: z27.string().min(1).max(2e3),
2962
- retryAfterMs: z27.number().int().min(deferPolicy.minRetryAfterMs).max(deferPolicy.maxRetryAfterMs).optional(),
2990
+ var decisionSchema = z28.discriminatedUnion("kind", [
2991
+ z28.strictObject({
2992
+ kind: z28.literal("defer"),
2993
+ reason: z28.string().min(1).max(2e3),
2994
+ retryAfterMs: z28.number().int().min(deferPolicy.minRetryAfterMs).max(deferPolicy.maxRetryAfterMs).optional(),
2963
2995
  /** Absolute Unix milliseconds; the platform can only shorten its existing deadline. */
2964
- until: z27.number().int().safe().nonnegative().optional()
2996
+ until: z28.number().int().safe().nonnegative().optional()
2965
2997
  }),
2966
- evaluatorProgressSchema.safeExtend({ kind: z27.literal("progress") }).strict(),
2967
- z27.object({
2968
- kind: z27.literal("accept"),
2969
- rewards: z27.array(rewardSchema).max(10),
2998
+ evaluatorProgressSchema.safeExtend({ kind: z28.literal("progress") }).strict(),
2999
+ z28.object({
3000
+ kind: z28.literal("accept"),
3001
+ rewards: z28.array(rewardSchema).max(10),
2970
3002
  completionKey: completionKeySchema.optional()
2971
3003
  }).strict(),
2972
- z27.object({
2973
- kind: z27.literal("reject"),
2974
- reason: z27.string().min(1).max(2e3),
3004
+ z28.object({
3005
+ kind: z28.literal("reject"),
3006
+ reason: z28.string().min(1).max(2e3),
3007
+ /**
3008
+ * A stable key for the rejection's cause, such as `wrong-answers`, stored as the attempt's
3009
+ * `code`: lowercase letters, digits and hyphens, at most 64 characters, and none of the
3010
+ * codes Relay writes itself.
3011
+ */
3012
+ code: rejectCodeSchema.optional(),
2975
3013
  /** The evaluator asked for human review, but review is off for the quest, so this is a reject. */
2976
- requestedReview: z27.literal(true).optional()
3014
+ requestedReview: z28.literal(true).optional()
2977
3015
  }).strict(),
2978
- z27.object({
2979
- kind: z27.literal("review"),
2980
- reason: z27.string().min(1).max(2e3),
2981
- rewards: z27.array(rewardSchema).max(10).optional(),
3016
+ z28.object({
3017
+ kind: z28.literal("review"),
3018
+ reason: z28.string().min(1).max(2e3),
3019
+ rewards: z28.array(rewardSchema).max(10).optional(),
2982
3020
  completionKey: completionKeySchema.optional()
2983
3021
  }).strict()
2984
3022
  ]);
2985
- var reviewModeSchema = z27.enum(["workers-ai"]);
2986
- var storedReviewModeSchema = z27.enum([
3023
+ var reviewModeSchema = z28.enum(["workers-ai"]);
3024
+ var storedReviewModeSchema = z28.enum([
2987
3025
  "fixture-pass",
2988
3026
  "fixture-fail",
2989
3027
  "fixture-unclear",
2990
3028
  "fixture-error",
2991
3029
  "workers-ai"
2992
3030
  ]);
2993
- var rewardBundleSchema = z27.array(rewardSchema).max(10).refine(
3031
+ var rewardBundleSchema = z28.array(rewardSchema).max(10).refine(
2994
3032
  (rewards) => new Set(rewards.map(rewardKey)).size === rewards.length,
2995
3033
  "Use one entry per balance or shared reward"
2996
3034
  );
2997
- var mediaUrlSchema = z27.string().max(2e3).refine((value) => {
3035
+ var mediaUrlSchema = z28.string().max(2e3).refine((value) => {
2998
3036
  if (/^\/(?!\/)[^\\\s]*$/.test(value)) {
2999
3037
  return true;
3000
3038
  }
@@ -3004,90 +3042,90 @@ var mediaUrlSchema = z27.string().max(2e3).refine((value) => {
3004
3042
  return false;
3005
3043
  }
3006
3044
  }, "Use an HTTPS URL or a same-site path beginning with /");
3007
- var questStepActionSchema = z27.discriminatedUnion("kind", [
3008
- z27.object({
3009
- kind: z27.literal("link"),
3045
+ var questStepActionSchema = z28.discriminatedUnion("kind", [
3046
+ z28.object({
3047
+ kind: z28.literal("link"),
3010
3048
  url: mediaUrlSchema.refine(
3011
3049
  (value) => value.startsWith("https://"),
3012
3050
  "Use an HTTPS URL"
3013
3051
  ),
3014
- label: z27.string().trim().min(1).max(120)
3052
+ label: z28.string().trim().min(1).max(120)
3015
3053
  }).strict()
3016
3054
  ]);
3017
- var questStepSchema = z27.object({
3018
- title: z27.string().trim().min(1).max(120),
3019
- description: z27.string().max(4e3).optional(),
3055
+ var questStepSchema = z28.object({
3056
+ title: z28.string().trim().min(1).max(120),
3057
+ description: z28.string().max(4e3).optional(),
3020
3058
  action: questStepActionSchema.optional()
3021
3059
  }).strict();
3022
- var questPresentationRequirementSchema = z27.discriminatedUnion("kind", [
3023
- z27.object({ kind: z27.literal("account"), provider: authProviderSchema }).strict(),
3024
- z27.object({ kind: z27.literal("wallet"), chain: walletChainSchema.optional() }).strict()
3060
+ var questPresentationRequirementSchema = z28.discriminatedUnion("kind", [
3061
+ z28.object({ kind: z28.literal("account"), provider: authProviderSchema }).strict(),
3062
+ z28.object({ kind: z28.literal("wallet"), chain: walletChainSchema.optional() }).strict()
3025
3063
  ]);
3026
- var questPresentationContentSchema = z27.object({
3027
- steps: z27.array(questStepSchema).max(30).optional(),
3064
+ var questPresentationContentSchema = z28.object({
3065
+ steps: z28.array(questStepSchema).max(30).optional(),
3028
3066
  image: mediaUrlSchema.optional(),
3029
- imageAlt: z27.string().max(500).optional(),
3030
- requirements: z27.array(questPresentationRequirementSchema).max(10).optional()
3067
+ imageAlt: z28.string().max(500).optional(),
3068
+ requirements: z28.array(questPresentationRequirementSchema).max(10).optional()
3031
3069
  }).strict();
3032
3070
  var questPresentationSchema = questPresentationContentSchema.extend({
3033
3071
  quiz: quizQuestionsSchema.optional(),
3034
- instructions: z27.string().max(4e3).optional(),
3035
- video: z27.object({
3072
+ instructions: z28.string().max(4e3).optional(),
3073
+ video: z28.object({
3036
3074
  url: mediaUrlSchema,
3037
3075
  poster: mediaUrlSchema.optional(),
3038
- captions: z27.object({
3076
+ captions: z28.object({
3039
3077
  url: mediaUrlSchema,
3040
- language: z27.string().min(2).max(20),
3041
- label: z27.string().min(1).max(80)
3078
+ language: z28.string().min(2).max(20),
3079
+ label: z28.string().min(1).max(80)
3042
3080
  }).strict().optional()
3043
3081
  }).strict().optional()
3044
3082
  }).strict();
3045
- var questProfileSchema = z27.object({ visible: z27.boolean() }).strict();
3083
+ var questProfileSchema = z28.object({ visible: z28.boolean() }).strict();
3046
3084
  var evaluatorProtocol = 2;
3047
- var evaluatorProtocolSchema = z27.literal(evaluatorProtocol);
3048
- var questDescriptionSchema = z27.object({
3085
+ var evaluatorProtocolSchema = z28.literal(evaluatorProtocol);
3086
+ var questDescriptionSchema = z28.object({
3049
3087
  quest: identifier,
3050
3088
  evaluatorProtocol: evaluatorProtocolSchema,
3051
- title: z27.string().min(1).max(120),
3089
+ title: z28.string().min(1).max(120),
3052
3090
  presentation: questPresentationSchema.default({}),
3053
- integrations: z27.array(evaluatorIntegrationProviderSchema).max(10).default([]),
3091
+ integrations: z28.array(evaluatorIntegrationProviderSchema).max(10).default([]),
3054
3092
  fields: settingsFieldsSchema,
3055
3093
  values: settingsValuesSchema,
3056
3094
  rewards: rewardBundleSchema,
3057
- humanReview: z27.boolean(),
3095
+ humanReview: z28.boolean(),
3058
3096
  trigger: triggerSchema,
3059
3097
  performance: contentPerformancePolicySchema.optional(),
3060
- requires: z27.array(prerequisiteSchema).max(30).default([]),
3098
+ requires: z28.array(prerequisiteSchema).max(30).default([]),
3061
3099
  campaign: campaignDefinitionSchema.optional(),
3062
3100
  availability: availabilityWindowSchema.optional(),
3063
- completion: z27.preprocess(refuseStreakTimeZone, completionPolicySchema),
3064
- visibility: z27.enum(["visible", "hidden"]).default("visible"),
3101
+ completion: z28.preprocess(refuseStreakTimeZone, completionPolicySchema),
3102
+ visibility: z28.enum(["visible", "hidden"]).default("visible"),
3065
3103
  /** Whether completions show on participant profiles (`/v1/profiles/:id/completions`). */
3066
3104
  profile: questProfileSchema.default({ visible: false }),
3067
- budgets: z27.array(budgetSchema).max(20).default([]),
3105
+ budgets: z28.array(budgetSchema).max(20).default([]),
3068
3106
  /**
3069
3107
  * Milliseconds a member waits after an attempt is rejected (by the evaluator or a reviewer)
3070
3108
  * before submitting this quest again. Only for quests members submit. Omitted: no cooldown.
3071
3109
  */
3072
3110
  retryCooldownMs: retryCooldownMsSchema.optional()
3073
3111
  }).strict();
3074
- var artifactSchema = z27.object({ code: z27.string().min(1).max(1e6) }).strict();
3112
+ var artifactSchema = z28.object({ code: z28.string().min(1).max(1e6) }).strict();
3075
3113
  var releaseSchema = artifactSchema.extend({
3076
3114
  /** The SDK runtime the code imports. Absent, the code bundles its own SDK. */
3077
3115
  runtime: sdkRuntimeReferenceSchema.optional(),
3078
3116
  settings: settingsValuesSchema,
3079
3117
  provider: reviewModeSchema,
3080
3118
  expectedRelease: identifier.nullable().optional(),
3081
- settingRenames: z27.record(z27.string(), z27.string()).optional()
3119
+ settingRenames: z28.record(z28.string(), z28.string()).optional()
3082
3120
  }).strict();
3083
- var batchReleaseSchema = z27.object({
3084
- releases: z27.array(releaseSchema).min(1).max(questScaleLimits.quests)
3121
+ var batchReleaseSchema = z28.object({
3122
+ releases: z28.array(releaseSchema).min(1).max(questScaleLimits.quests)
3085
3123
  }).strict();
3086
- var questSettingsInputSchema = z27.object({
3124
+ var questSettingsInputSchema = z28.object({
3087
3125
  quest: identifier,
3088
3126
  expectedRelease: identifier,
3089
3127
  set: settingsValuesSchema,
3090
- reset: z27.array(z27.string()),
3128
+ reset: z28.array(z28.string()),
3091
3129
  /** Replace the editable presentation fields; null restores the code defaults. */
3092
3130
  presentation: questPresentationContentSchema.nullable().optional()
3093
3131
  }).strict();
@@ -3097,28 +3135,28 @@ var storedQuestDescriptionSchema = questDescriptionSchema.extend({
3097
3135
  var publishedReleaseSchema = responseShape(
3098
3136
  storedQuestDescriptionSchema.extend({
3099
3137
  key: identifier.optional(),
3100
- code: z27.string(),
3138
+ code: z28.string(),
3101
3139
  /** The SDK runtime `code` imports. Absent, the code bundles its own SDK. */
3102
3140
  runtime: sdkRuntimeReferenceSchema.optional(),
3103
3141
  provider: storedReviewModeSchema,
3104
3142
  id: identifier,
3105
- createdAt: z27.number(),
3106
- origin: z27.object({ typeVersion: identifier }).strict().optional(),
3107
- lifecycle: z27.enum(["active", "paused", "archived"]).default("active"),
3108
- configuration: z27.object({
3143
+ createdAt: z28.number(),
3144
+ origin: z28.object({ typeVersion: identifier }).strict().optional(),
3145
+ lifecycle: z28.enum(["active", "paused", "archived"]).default("active"),
3146
+ configuration: z28.object({
3109
3147
  defaults: settingsValuesSchema,
3110
3148
  overrides: settingsValuesSchema,
3111
- preserved: z27.array(z27.string()),
3149
+ preserved: z28.array(z28.string()),
3112
3150
  presentation: questPresentationContentSchema.optional(),
3113
3151
  presentationDefaults: questPresentationContentSchema.optional()
3114
3152
  }).strict().optional()
3115
3153
  })
3116
3154
  );
3117
- var templateSchema = z27.object({
3118
- code: z27.string(),
3155
+ var templateSchema = z28.object({
3156
+ code: z28.string(),
3119
3157
  definition: questDescriptionSchema
3120
3158
  });
3121
- var quizAnswersSchema = z27.record(identifier, identifier).refine(
3159
+ var quizAnswersSchema = z28.record(identifier, identifier).refine(
3122
3160
  (answers) => Object.keys(answers).length > 0 && Object.keys(answers).length <= 50,
3123
3161
  "Provide between 1 and 50 answers"
3124
3162
  ).transform(
@@ -3126,17 +3164,17 @@ var quizAnswersSchema = z27.record(identifier, identifier).refine(
3126
3164
  Object.entries(answers).sort(([a], [b]) => a.localeCompare(b))
3127
3165
  )
3128
3166
  );
3129
- var quizEvidenceSchema = z27.object({
3130
- kind: z27.literal("quiz"),
3167
+ var quizEvidenceSchema = z28.object({
3168
+ kind: z28.literal("quiz"),
3131
3169
  release: identifier.optional(),
3132
3170
  answers: quizAnswersSchema
3133
3171
  }).strict();
3134
- var submissionEvidenceSchema = z27.union([
3172
+ var submissionEvidenceSchema = z28.union([
3135
3173
  quizEvidenceSchema,
3136
3174
  textEvidenceSchema,
3137
3175
  urlEvidenceSchema
3138
3176
  ]);
3139
- var submitSchema = z27.object({
3177
+ var submitSchema = z28.object({
3140
3178
  actionId: identifier,
3141
3179
  quest: identifier,
3142
3180
  member: identifier,
@@ -3144,7 +3182,7 @@ var submitSchema = z27.object({
3144
3182
  input: submissionEvidenceSchema.optional(),
3145
3183
  release: identifier.optional(),
3146
3184
  /** @deprecated Relay refuses a submission that sets it to `true` and ignores `false`. Removed in 2.0.0. */
3147
- faultAfterReview: z27.boolean().optional()
3185
+ faultAfterReview: z28.boolean().optional()
3148
3186
  }).strict();
3149
3187
  var AttemptStatus = {
3150
3188
  Queued: "queued",
@@ -3156,8 +3194,8 @@ var AttemptStatus = {
3156
3194
  NeedsReview: "needs-review",
3157
3195
  Failed: "failed"
3158
3196
  };
3159
- var attemptStatusSchema = z27.string();
3160
- var attemptSchema = z27.object({
3197
+ var attemptStatusSchema = z28.string();
3198
+ var attemptSchema = z28.object({
3161
3199
  id: identifier,
3162
3200
  release: identifier,
3163
3201
  quest: identifier,
@@ -3165,25 +3203,29 @@ var attemptSchema = z27.object({
3165
3203
  evidence: identifier.nullable(),
3166
3204
  input: submissionEvidenceSchema.optional(),
3167
3205
  status: attemptStatusSchema,
3168
- reason: z27.string().nullable(),
3169
- retries: z27.number(),
3170
- generation: z27.number(),
3171
- completion: z27.string().nullable(),
3206
+ reason: z28.string().nullable(),
3207
+ retries: z28.number(),
3208
+ generation: z28.number(),
3209
+ completion: z28.string().nullable(),
3172
3210
  reviewRewards: rewardBundleSchema.nullable().default(null),
3173
3211
  /** Scheduled reruns advance this number; failure retries preserve it. */
3174
- evaluationRun: z27.number().int().nonnegative().default(0),
3175
- deferCount: z27.number().int().nonnegative().default(0),
3176
- deferUntil: z27.number().int().safe().nullable().default(null),
3177
- nextEvaluationAt: z27.number().int().safe().nullable().default(null),
3178
- /** Open code: consumers must tolerate new values. */
3179
- code: z27.string().nullable().default(null),
3212
+ evaluationRun: z28.number().int().nonnegative().default(0),
3213
+ deferCount: z28.number().int().nonnegative().default(0),
3214
+ deferUntil: z28.number().int().safe().nullable().default(null),
3215
+ nextEvaluationAt: z28.number().int().safe().nullable().default(null),
3216
+ /**
3217
+ * Open code: consumers must tolerate new values. Relay writes its own codes, such as
3218
+ * `budget-exhausted`; an attempt the evaluator rejected with `decision.reject({ reason, code })`
3219
+ * carries the evaluator's code in management reads, and null in responses to members.
3220
+ */
3221
+ code: z28.string().nullable().default(null),
3180
3222
  progress: evaluatorProgressSchema.nullable().default(null),
3181
3223
  /**
3182
3224
  * The evaluator asked for human review of a quest with review off, so Domino rejected the attempt
3183
3225
  * with the evaluator's reason. Only set on a rejected attempt.
3184
3226
  */
3185
- requestedReview: z27.boolean().default(false),
3186
- createdAt: z27.number()
3227
+ requestedReview: z28.boolean().default(false),
3228
+ createdAt: z28.number()
3187
3229
  });
3188
3230
  var QuestSubmissionStatus = {
3189
3231
  Open: "open",
@@ -3191,9 +3233,9 @@ var QuestSubmissionStatus = {
3191
3233
  Discarded: "discarded",
3192
3234
  Expired: "expired"
3193
3235
  };
3194
- var questSubmissionStatusSchema = z27.string();
3236
+ var questSubmissionStatusSchema = z28.string();
3195
3237
  var questSubmissionSchema = responseShape(
3196
- z27.object({
3238
+ z28.object({
3197
3239
  id: identifier,
3198
3240
  quest: identifier,
3199
3241
  member: identifier,
@@ -3203,85 +3245,85 @@ var questSubmissionSchema = responseShape(
3203
3245
  /** An uploaded photo's evidence ID. */
3204
3246
  evidence: identifier.nullable(),
3205
3247
  /** Submitting was refused because the quest changed: review the draft before submitting again. */
3206
- reviewRequired: z27.boolean(),
3248
+ reviewRequired: z28.boolean(),
3207
3249
  status: questSubmissionStatusSchema,
3208
3250
  /** The attempt a `submitted` submission admitted. */
3209
3251
  attempt: identifier.nullable(),
3210
- createdAt: z27.number(),
3211
- updatedAt: z27.number(),
3252
+ createdAt: z28.number(),
3253
+ updatedAt: z28.number(),
3212
3254
  /** When an open submission expires unless it changes again. */
3213
- expiresAt: z27.number()
3255
+ expiresAt: z28.number()
3214
3256
  })
3215
3257
  );
3216
- var questSubmissionUpdateSchema = z27.object({
3258
+ var questSubmissionUpdateSchema = z28.object({
3217
3259
  release: identifier.nullable().optional(),
3218
3260
  input: submissionEvidenceSchema.nullable().optional(),
3219
3261
  evidence: identifier.nullable().optional()
3220
3262
  }).strict();
3221
3263
  var questSubmissionResultSchema = responseShape(
3222
- z27.object({
3264
+ z28.object({
3223
3265
  submission: questSubmissionSchema,
3224
3266
  attempt: attemptSchema,
3225
- replayed: z27.boolean()
3267
+ replayed: z28.boolean()
3226
3268
  })
3227
3269
  );
3228
- var eventSchema = z27.object({
3229
- id: z27.number(),
3230
- attempt: z27.string().nullable(),
3231
- kind: z27.string(),
3232
- detail: z27.string(),
3233
- actor: z27.string().nullable().default(null),
3234
- at: z27.number()
3235
- });
3236
- var pickupSelectionSchema = z27.object({
3270
+ var eventSchema = z28.object({
3271
+ id: z28.number(),
3272
+ attempt: z28.string().nullable(),
3273
+ kind: z28.string(),
3274
+ detail: z28.string(),
3275
+ actor: z28.string().nullable().default(null),
3276
+ at: z28.number()
3277
+ });
3278
+ var pickupSelectionSchema = z28.object({
3237
3279
  item: identifier,
3238
- revision: z27.number().int().nonnegative()
3280
+ revision: z28.number().int().nonnegative()
3239
3281
  }).strict();
3240
- var pickupAllocationSchema = z27.object({
3282
+ var pickupAllocationSchema = z28.object({
3241
3283
  item: identifier,
3242
- label: z27.string().min(1).max(80)
3284
+ label: z28.string().min(1).max(80)
3243
3285
  }).strict();
3244
- var pickupPolicySchema = z27.discriminatedUnion("kind", [
3245
- z27.object({ kind: z27.literal("untracked") }).strict(),
3246
- z27.object({
3247
- kind: z27.literal("at-pickup"),
3248
- tiers: z27.array(
3249
- z27.object({
3286
+ var pickupPolicySchema = z28.discriminatedUnion("kind", [
3287
+ z28.object({ kind: z28.literal("untracked") }).strict(),
3288
+ z28.object({
3289
+ kind: z28.literal("at-pickup"),
3290
+ tiers: z28.array(
3291
+ z28.object({
3250
3292
  tier: identifier,
3251
- variants: z27.array(pickupAllocationSchema).min(1).max(100)
3293
+ variants: z28.array(pickupAllocationSchema).min(1).max(100)
3252
3294
  }).strict()
3253
3295
  ).min(1).max(100)
3254
3296
  }).strict()
3255
3297
  ]);
3256
- var pickupCatalogSchema = z27.object({
3298
+ var pickupCatalogSchema = z28.object({
3257
3299
  reward: tieredRewardDefinitionSchema,
3258
- revision: z27.number().int().nonnegative(),
3300
+ revision: z28.number().int().nonnegative(),
3259
3301
  policy: pickupPolicySchema
3260
3302
  });
3261
- var pickupAvailabilitySchema = z27.discriminatedUnion("kind", [
3262
- z27.object({ kind: z27.literal("untracked") }).strict(),
3263
- z27.object({
3264
- kind: z27.literal("at-pickup"),
3265
- revision: z27.number().int().nonnegative(),
3266
- variants: z27.array(
3303
+ var pickupAvailabilitySchema = z28.discriminatedUnion("kind", [
3304
+ z28.object({ kind: z28.literal("untracked") }).strict(),
3305
+ z28.object({
3306
+ kind: z28.literal("at-pickup"),
3307
+ revision: z28.number().int().nonnegative(),
3308
+ variants: z28.array(
3267
3309
  pickupAllocationSchema.extend({
3268
- available: z27.number().int().nonnegative()
3310
+ available: z28.number().int().nonnegative()
3269
3311
  })
3270
3312
  )
3271
3313
  }).strict()
3272
3314
  ]);
3273
- var configurePickupSchema = z27.object({
3315
+ var configurePickupSchema = z28.object({
3274
3316
  reward: identifier,
3275
- revision: z27.number().int().nonnegative(),
3317
+ revision: z28.number().int().nonnegative(),
3276
3318
  actionId: identifier,
3277
- policy: z27.discriminatedUnion("kind", [
3278
- z27.object({ kind: z27.literal("untracked") }).strict(),
3279
- z27.object({
3280
- kind: z27.literal("at-pickup"),
3281
- tiers: z27.array(
3282
- z27.object({
3319
+ policy: z28.discriminatedUnion("kind", [
3320
+ z28.object({ kind: z28.literal("untracked") }).strict(),
3321
+ z28.object({
3322
+ kind: z28.literal("at-pickup"),
3323
+ tiers: z28.array(
3324
+ z28.object({
3283
3325
  tier: identifier,
3284
- variants: z27.array(
3326
+ variants: z28.array(
3285
3327
  pickupAllocationSchema.extend({
3286
3328
  item: identifier.optional()
3287
3329
  })
@@ -3291,10 +3333,10 @@ var configurePickupSchema = z27.object({
3291
3333
  }).strict()
3292
3334
  ])
3293
3335
  }).strict();
3294
- var entitlementRecoverySchema = z27.object({
3336
+ var entitlementRecoverySchema = z28.object({
3295
3337
  completion: identifier,
3296
- reason: z27.string(),
3297
- flaggedAt: z27.number(),
3338
+ reason: z28.string(),
3339
+ flaggedAt: z28.number(),
3298
3340
  /** Null means no accepted completion currently earns this reward. */
3299
3341
  remainingTier: identifier.nullable()
3300
3342
  });
@@ -3304,40 +3346,40 @@ var entitlementBase = {
3304
3346
  reward: tieredRewardDefinitionSchema,
3305
3347
  earnedTier: identifier,
3306
3348
  tier: identifier,
3307
- revision: z27.number().int().positive()
3349
+ revision: z28.number().int().positive()
3308
3350
  };
3309
- var entitlementStateSchema = z27.discriminatedUnion("status", [
3310
- z27.object({ ...entitlementBase, status: z27.literal("available") }).strict(),
3311
- z27.object({
3351
+ var entitlementStateSchema = z28.discriminatedUnion("status", [
3352
+ z28.object({ ...entitlementBase, status: z28.literal("available") }).strict(),
3353
+ z28.object({
3312
3354
  ...entitlementBase,
3313
- status: z27.literal("handing-over"),
3355
+ status: z28.literal("handing-over"),
3314
3356
  handover: identifier,
3315
- startedAt: z27.number(),
3357
+ startedAt: z28.number(),
3316
3358
  allocation: pickupAllocationSchema.optional()
3317
3359
  }).strict(),
3318
- z27.object({
3360
+ z28.object({
3319
3361
  ...entitlementBase,
3320
- status: z27.literal("collected"),
3362
+ status: z28.literal("collected"),
3321
3363
  handover: identifier,
3322
- startedAt: z27.number(),
3364
+ startedAt: z28.number(),
3323
3365
  allocation: pickupAllocationSchema.optional(),
3324
- collectedAt: z27.number(),
3366
+ collectedAt: z28.number(),
3325
3367
  recovery: entitlementRecoverySchema.optional()
3326
3368
  }).strict(),
3327
3369
  // An operator voided it: it can no longer be handed over. A quest grant of the same reward to
3328
3370
  // the member (the same grant key) makes it available again; a voided referral reward stays void.
3329
- z27.object({
3371
+ z28.object({
3330
3372
  ...entitlementBase,
3331
- status: z27.literal("void"),
3332
- voidedAt: z27.number()
3373
+ status: z28.literal("void"),
3374
+ voidedAt: z28.number()
3333
3375
  }).strict()
3334
3376
  ]);
3335
- var tieredRewardReadSchema = z27.object({
3377
+ var tieredRewardReadSchema = z28.object({
3336
3378
  id: identifier,
3337
- title: z27.string(),
3338
- tiers: z27.array(z27.object({ id: identifier, title: z27.string() }).loose()),
3339
- inventory: z27.object({ kind: z27.string() }).loose(),
3340
- fulfillment: z27.object({ kind: z27.string() }).loose()
3379
+ title: z28.string(),
3380
+ tiers: z28.array(z28.object({ id: identifier, title: z28.string() }).loose()),
3381
+ inventory: z28.object({ kind: z28.string() }).loose(),
3382
+ fulfillment: z28.object({ kind: z28.string() }).loose()
3341
3383
  }).loose();
3342
3384
  var entitlementReadBase = {
3343
3385
  id: identifier,
@@ -3345,63 +3387,63 @@ var entitlementReadBase = {
3345
3387
  reward: tieredRewardReadSchema,
3346
3388
  earnedTier: identifier,
3347
3389
  tier: identifier,
3348
- revision: z27.number().int()
3390
+ revision: z28.number().int()
3349
3391
  };
3350
- var allocationReadSchema = z27.object({ item: identifier, label: z27.string() }).loose();
3351
- var entitlementSchema = z27.union([
3352
- z27.discriminatedUnion("status", [
3353
- z27.object({ ...entitlementReadBase, status: z27.literal("available") }).loose(),
3354
- z27.object({
3392
+ var allocationReadSchema = z28.object({ item: identifier, label: z28.string() }).loose();
3393
+ var entitlementSchema = z28.union([
3394
+ z28.discriminatedUnion("status", [
3395
+ z28.object({ ...entitlementReadBase, status: z28.literal("available") }).loose(),
3396
+ z28.object({
3355
3397
  ...entitlementReadBase,
3356
- status: z27.literal("handing-over"),
3398
+ status: z28.literal("handing-over"),
3357
3399
  handover: identifier,
3358
- startedAt: z27.number(),
3400
+ startedAt: z28.number(),
3359
3401
  allocation: allocationReadSchema.optional()
3360
3402
  }).loose(),
3361
- z27.object({
3403
+ z28.object({
3362
3404
  ...entitlementReadBase,
3363
- status: z27.literal("collected"),
3405
+ status: z28.literal("collected"),
3364
3406
  handover: identifier,
3365
- startedAt: z27.number(),
3407
+ startedAt: z28.number(),
3366
3408
  allocation: allocationReadSchema.optional(),
3367
- collectedAt: z27.number(),
3409
+ collectedAt: z28.number(),
3368
3410
  recovery: entitlementRecoverySchema.optional()
3369
3411
  }).loose(),
3370
- z27.object({
3412
+ z28.object({
3371
3413
  ...entitlementReadBase,
3372
- status: z27.literal("void"),
3373
- voidedAt: z27.number()
3414
+ status: z28.literal("void"),
3415
+ voidedAt: z28.number()
3374
3416
  }).loose()
3375
3417
  ]),
3376
- z27.object({ ...entitlementReadBase, status: z27.string() }).loose().transform(({ status, ...entitlement }) => ({
3418
+ z28.object({ ...entitlementReadBase, status: z28.string() }).loose().transform(({ status, ...entitlement }) => ({
3377
3419
  ...entitlement,
3378
3420
  status: "unsupported",
3379
3421
  reportedStatus: status
3380
3422
  }))
3381
3423
  ]);
3382
- var beginHandoverSchema = z27.object({
3424
+ var beginHandoverSchema = z28.object({
3383
3425
  actionId: identifier,
3384
- revision: z27.number().int().positive(),
3426
+ revision: z28.number().int().positive(),
3385
3427
  selection: pickupSelectionSchema.optional()
3386
3428
  }).strict();
3387
- var confirmHandoverSchema = z27.object({ actionId: identifier, handover: identifier }).strict();
3388
- var entitlementCorrectionSchema = z27.object({
3429
+ var confirmHandoverSchema = z28.object({ actionId: identifier, handover: identifier }).strict();
3430
+ var entitlementCorrectionSchema = z28.object({
3389
3431
  actionId: identifier,
3390
- revision: z27.number().int().positive(),
3391
- reason: z27.string().trim().min(1).max(500)
3432
+ revision: z28.number().int().positive(),
3433
+ reason: z28.string().trim().min(1).max(500)
3392
3434
  }).strict();
3393
3435
  var CompletionSourceKind = {
3394
3436
  Quest: "quest",
3395
3437
  Leaderboard: "leaderboard"
3396
3438
  };
3397
- var completionSourceKindSchema = z27.string().min(1).max(64);
3398
- var completionSourceSchema = z27.object({
3439
+ var completionSourceKindSchema = z28.string().min(1).max(64);
3440
+ var completionSourceSchema = z28.object({
3399
3441
  kind: completionSourceKindSchema,
3400
3442
  id: identifier
3401
3443
  });
3402
- var completionRecordSchema = z27.object({
3444
+ var completionRecordSchema = z28.object({
3403
3445
  /** The occurrence the completion consumed. For a leaderboard prize, the settlement ID. */
3404
- key: z27.string().default("once"),
3446
+ key: z28.string().default("once"),
3405
3447
  id: identifier,
3406
3448
  /** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
3407
3449
  quest: identifier,
@@ -3409,19 +3451,19 @@ var completionRecordSchema = z27.object({
3409
3451
  /** What paid the completion. `source.id` repeats `quest`. */
3410
3452
  source: completionSourceSchema.optional()
3411
3453
  });
3412
- var questAvailabilitySchema = z27.discriminatedUnion("kind", [
3413
- z27.object({
3414
- kind: z27.literal("available"),
3415
- input: z27.enum(["photo", "quiz", "none", "text", "url"])
3454
+ var questAvailabilitySchema = z28.discriminatedUnion("kind", [
3455
+ z28.object({
3456
+ kind: z28.literal("available"),
3457
+ input: z28.enum(["photo", "quiz", "none", "text", "url"])
3416
3458
  }).strict(),
3417
- z27.object({ kind: z27.literal("completed") }).strict(),
3418
- z27.object({
3419
- kind: z27.literal("locked"),
3420
- missing: z27.array(missingPrerequisiteSchema).min(1)
3459
+ z28.object({ kind: z28.literal("completed") }).strict(),
3460
+ z28.object({
3461
+ kind: z28.literal("locked"),
3462
+ missing: z28.array(missingPrerequisiteSchema).min(1)
3421
3463
  }).strict(),
3422
- z27.object({
3423
- kind: z27.literal("blocked"),
3424
- reason: z27.enum([
3464
+ z28.object({
3465
+ kind: z28.literal("blocked"),
3466
+ reason: z28.enum([
3425
3467
  "budget-exhausted",
3426
3468
  "connection-required",
3427
3469
  "wallet-required",
@@ -3430,152 +3472,152 @@ var questAvailabilitySchema = z27.discriminatedUnion("kind", [
3430
3472
  "enrollment-required"
3431
3473
  ]),
3432
3474
  /** Which window refused admission when `reason` is `outside-window`. */
3433
- window: z27.enum(["tracker", "quest"]).optional(),
3434
- resetsAt: z27.number().int().safe().optional()
3475
+ window: z28.enum(["tracker", "quest"]).optional(),
3476
+ resetsAt: z28.number().int().safe().optional()
3435
3477
  }).strict(),
3436
- z27.object({ kind: z27.literal("staff-required") }).strict(),
3437
- z27.object({ kind: z27.literal("automatic") }).strict(),
3438
- z27.object({ kind: z27.literal("checking"), attempt: identifier }).strict(),
3439
- z27.object({ kind: z27.literal("needs-review"), attempt: identifier }).strict(),
3440
- z27.object({ kind: z27.literal("retryable"), attempt: identifier }).strict()
3478
+ z28.object({ kind: z28.literal("staff-required") }).strict(),
3479
+ z28.object({ kind: z28.literal("automatic") }).strict(),
3480
+ z28.object({ kind: z28.literal("checking"), attempt: identifier }).strict(),
3481
+ z28.object({ kind: z28.literal("needs-review"), attempt: identifier }).strict(),
3482
+ z28.object({ kind: z28.literal("retryable"), attempt: identifier }).strict()
3441
3483
  ]);
3442
- var questAvailabilityResponseSchema = z27.union(
3484
+ var questAvailabilityResponseSchema = z28.union(
3443
3485
  questAvailabilitySchema.options.map((option) => option.strip())
3444
3486
  );
3445
- var questBudgetViewSchema = z27.object({
3487
+ var questBudgetViewSchema = z28.object({
3446
3488
  id: identifier,
3447
- scope: z27.enum(["member", "project"]),
3448
- period: z27.enum(["day", "week", "month", "lifetime"]),
3449
- remaining: z27.number().int().safe().nonnegative(),
3450
- resetsAt: z27.number().int().safe().nullable()
3489
+ scope: z28.enum(["member", "project"]),
3490
+ period: z28.enum(["day", "week", "month", "lifetime"]),
3491
+ remaining: z28.number().int().safe().nonnegative(),
3492
+ resetsAt: z28.number().int().safe().nullable()
3451
3493
  });
3452
3494
  var memberProgressSchema = responseShape(
3453
- z27.object({
3495
+ z28.object({
3454
3496
  member: identifier,
3455
- quests: z27.array(
3456
- z27.object({
3497
+ quests: z28.array(
3498
+ z28.object({
3457
3499
  quest: identifier,
3458
3500
  key: identifier.optional(),
3459
3501
  release: identifier.optional(),
3460
- title: z27.string(),
3502
+ title: z28.string(),
3461
3503
  presentation: questPresentationSchema.default({}),
3462
- connections: z27.array(authProviderSchema).default([]),
3504
+ connections: z28.array(authProviderSchema).default([]),
3463
3505
  trigger: triggerResponseSchema,
3464
3506
  availability: questAvailabilityResponseSchema,
3465
- completed: z27.boolean(),
3507
+ completed: z28.boolean(),
3466
3508
  completion: completionPolicySchema.default({ kind: "once" }),
3467
3509
  streak: streakProgressSchema.nullable().optional(),
3468
3510
  counter: counterProgressSchema.nullable().optional(),
3469
3511
  /** Latest attempt's committed evaluator progress, while it remains deferred/evaluating. */
3470
3512
  progress: evaluatorProgressSchema.nullable().default(null),
3471
- completionCount: z27.number().int().nonnegative().default(0),
3472
- visibility: z27.enum(["visible", "hidden"]).default("visible"),
3473
- missing: z27.array(missingPrerequisiteSchema),
3513
+ completionCount: z28.number().int().nonnegative().default(0),
3514
+ visibility: z28.enum(["visible", "hidden"]).default("visible"),
3515
+ missing: z28.array(missingPrerequisiteSchema),
3474
3516
  campaign: campaignViewSchema.nullable().default(null),
3475
3517
  window: availabilityWindowSchema.nullable().default(null),
3476
- budgets: z27.array(questBudgetViewSchema).default([]),
3518
+ budgets: z28.array(questBudgetViewSchema).default([]),
3477
3519
  /**
3478
3520
  * Unix milliseconds when the member may submit again, while the quest's retry cooldown
3479
3521
  * after their rejected attempt runs. Until then a new attempt is refused with
3480
3522
  * `retry-cooldown`. Absent when no cooldown is running.
3481
3523
  */
3482
- retryAt: z27.number().int().safe().optional(),
3524
+ retryAt: z28.number().int().safe().optional(),
3483
3525
  attempt: attemptSchema.nullable()
3484
3526
  })
3485
3527
  ),
3486
- entitlements: z27.array(entitlementSchema)
3528
+ entitlements: z28.array(entitlementSchema)
3487
3529
  })
3488
3530
  );
3489
3531
  var snapshotSchema = responseShape(
3490
- z27.object({
3491
- releases: z27.array(publishedReleaseSchema),
3492
- completions: z27.array(completionRecordSchema),
3493
- entitlements: z27.array(entitlementSchema),
3494
- attempts: z27.array(attemptSchema),
3495
- balances: z27.array(
3496
- z27.object({
3497
- member: z27.string(),
3498
- balance: z27.string(),
3499
- earned: z27.number(),
3500
- held: z27.number(),
3501
- available: z27.number()
3532
+ z28.object({
3533
+ releases: z28.array(publishedReleaseSchema),
3534
+ completions: z28.array(completionRecordSchema),
3535
+ entitlements: z28.array(entitlementSchema),
3536
+ attempts: z28.array(attemptSchema),
3537
+ balances: z28.array(
3538
+ z28.object({
3539
+ member: z28.string(),
3540
+ balance: z28.string(),
3541
+ earned: z28.number(),
3542
+ held: z28.number(),
3543
+ available: z28.number()
3502
3544
  })
3503
3545
  ),
3504
- events: z27.array(eventSchema)
3546
+ events: z28.array(eventSchema)
3505
3547
  })
3506
3548
  );
3507
- var evidenceSchema = z27.object({
3549
+ var evidenceSchema = z28.object({
3508
3550
  id: identifier,
3509
3551
  member: identifier,
3510
- type: z27.enum(["image/jpeg", "image/png"]),
3511
- size: z27.number()
3552
+ type: z28.enum(["image/jpeg", "image/png"]),
3553
+ size: z28.number()
3512
3554
  });
3513
- var errorSchema = z27.object({
3514
- error: z27.string(),
3515
- code: z27.string().optional(),
3555
+ var errorSchema = z28.object({
3556
+ error: z28.string(),
3557
+ code: z28.string().optional(),
3516
3558
  /** Which window refused admission when `code` is `outside-window`. */
3517
- window: z27.enum(["tracker", "quest"]).optional(),
3518
- missing: z27.array(missingPrerequisiteSchema).optional(),
3559
+ window: z28.enum(["tracker", "quest"]).optional(),
3560
+ missing: z28.array(missingPrerequisiteSchema).optional(),
3519
3561
  /** Unix milliseconds when the member may submit again, when `code` is `retry-cooldown`. */
3520
- retryAt: z27.number().int().safe().optional()
3562
+ retryAt: z28.number().int().safe().optional()
3521
3563
  });
3522
- var staffDecisionSchema = z27.object({
3564
+ var staffDecisionSchema = z28.object({
3523
3565
  actionId: identifier,
3524
- generation: z27.number().int().nonnegative(),
3525
- decision: z27.enum(["accept", "reject"]),
3526
- reason: z27.string().trim().min(1).max(2e3)
3566
+ generation: z28.number().int().nonnegative(),
3567
+ decision: z28.enum(["accept", "reject"]),
3568
+ reason: z28.string().trim().min(1).max(2e3)
3527
3569
  }).strict();
3528
- var stockSchema = z27.object({ item: identifier, quantity: z27.number().int().min(0).max(1e4) }).strict();
3529
- var reservationSchema = z27.object({
3570
+ var stockSchema = z28.object({ item: identifier, quantity: z28.number().int().min(0).max(1e4) }).strict();
3571
+ var reservationSchema = z28.object({
3530
3572
  actionId: identifier,
3531
3573
  member: identifier,
3532
3574
  item: identifier,
3533
3575
  balance: identifier,
3534
- price: z27.number().int().positive().max(1e4)
3576
+ price: z28.number().int().positive().max(1e4)
3535
3577
  }).strict();
3536
3578
  var pageOptions = {
3537
- limit: z27.number().int().min(1).max(100).default(25),
3538
- cursor: z27.string().min(1).max(4096).optional()
3579
+ limit: z28.number().int().min(1).max(100).default(25),
3580
+ cursor: z28.string().min(1).max(4096).optional()
3539
3581
  };
3540
- var reviewListSchema = z27.object({
3582
+ var reviewListSchema = z28.object({
3541
3583
  ...pageOptions,
3542
3584
  member: identifier.optional(),
3543
3585
  quest: identifier.optional()
3544
3586
  }).strict();
3545
- var memberListSchema = z27.object({
3587
+ var memberListSchema = z28.object({
3546
3588
  ...pageOptions,
3547
3589
  prefix: identifier.optional()
3548
3590
  }).strict();
3549
- var reviewItemSchema = z27.object({
3591
+ var reviewItemSchema = z28.object({
3550
3592
  attempt: attemptSchema,
3551
- title: z27.string(),
3552
- checks: z27.array(
3553
- z27.object({ criteria: z27.string(), result: photoResultSchema })
3593
+ title: z28.string(),
3594
+ checks: z28.array(
3595
+ z28.object({ criteria: z28.string(), result: photoResultSchema })
3554
3596
  )
3555
3597
  });
3556
- var reviewPageSchema = z27.object({
3557
- items: z27.array(reviewItemSchema).max(100),
3558
- nextCursor: z27.string().nullable()
3598
+ var reviewPageSchema = z28.object({
3599
+ items: z28.array(reviewItemSchema).max(100),
3600
+ nextCursor: z28.string().nullable()
3559
3601
  });
3560
- var memberPageSchema = z27.object({
3561
- items: z27.array(z27.object({ member: identifier })).max(100),
3562
- nextCursor: z27.string().nullable()
3602
+ var memberPageSchema = z28.object({
3603
+ items: z28.array(z28.object({ member: identifier })).max(100),
3604
+ nextCursor: z28.string().nullable()
3563
3605
  });
3564
- var createStockItemSchema = z27.object({ actionId: identifier, name: z27.string().trim().min(1).max(80) }).strict();
3565
- var stockItemSchema = z27.object({ id: identifier, name: z27.string() });
3566
- var contentPerformanceSnapshotSchema = z27.strictObject({
3606
+ var createStockItemSchema = z28.object({ actionId: identifier, name: z28.string().trim().min(1).max(80) }).strict();
3607
+ var stockItemSchema = z28.object({ id: identifier, name: z28.string() });
3608
+ var contentPerformanceSnapshotSchema = z28.strictObject({
3567
3609
  contentAttempt: identifier,
3568
3610
  observation: identifier,
3569
- observedAt: z27.number().int().safe().nonnegative(),
3611
+ observedAt: z28.number().int().safe().nonnegative(),
3570
3612
  metrics: contentMetricsSchema,
3571
3613
  rewards: rewardBundleSchema
3572
3614
  });
3573
3615
  var contentPerformanceQuerySchema = contentQualificationQuerySchema.extend({
3574
- content: z27.string().min(1).max(256)
3616
+ content: z28.string().min(1).max(256)
3575
3617
  });
3576
- var contentPerformancePageSchema = z27.strictObject({
3577
- current: z27.strictObject({
3578
- state: z27.enum([
3618
+ var contentPerformancePageSchema = z28.strictObject({
3619
+ current: z28.strictObject({
3620
+ state: z28.enum([
3579
3621
  "content-pending",
3580
3622
  "content-unqualified",
3581
3623
  "waiting",
@@ -3586,19 +3628,19 @@ var contentPerformancePageSchema = z27.strictObject({
3586
3628
  "failed",
3587
3629
  "superseded"
3588
3630
  ]),
3589
- reason: z27.string().nullable(),
3631
+ reason: z28.string().nullable(),
3590
3632
  contentAttempt: identifier,
3591
3633
  attempt: identifier.nullable(),
3592
3634
  reward: contentQualificationSchema.shape.reward
3593
3635
  }),
3594
- items: z27.array(
3595
- z27.strictObject({
3636
+ items: z28.array(
3637
+ z28.strictObject({
3596
3638
  attempt: identifier,
3597
3639
  contentAttempt: identifier,
3598
3640
  observation: identifier,
3599
- observedAt: z27.number(),
3641
+ observedAt: z28.number(),
3600
3642
  metrics: contentMetricsSchema,
3601
- state: z27.enum([
3643
+ state: z28.enum([
3602
3644
  "pending",
3603
3645
  "qualified",
3604
3646
  "unqualified",
@@ -3606,7 +3648,7 @@ var contentPerformancePageSchema = z27.strictObject({
3606
3648
  "failed",
3607
3649
  "superseded"
3608
3650
  ]),
3609
- reason: z27.string().nullable()
3651
+ reason: z28.string().nullable()
3610
3652
  })
3611
3653
  ),
3612
3654
  nextCursor: pageCursorSchema.nullable()
@@ -3755,6 +3797,8 @@ export {
3755
3797
  trackerTriggerRecordSchema,
3756
3798
  trackerContentStageSchema,
3757
3799
  trackerTriggerContextSchema,
3800
+ reservedAttemptCodes,
3801
+ rejectCodeIssue,
3758
3802
  maxPointsAmount,
3759
3803
  questScaleLimits,
3760
3804
  sdkRuntimeLimits,