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