@domino-sdk/relay 1.75.0 → 1.76.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.
@@ -34,6 +34,7 @@ import {
34
34
  credentialSecretSchema,
35
35
  customDomainListSchema,
36
36
  customDomainSchema,
37
+ environmentSchema,
37
38
  identityIntegrationSchema,
38
39
  identityIntegrationSecretSchema,
39
40
  identityKindClaimSchema,
@@ -43,8 +44,12 @@ import {
43
44
  memberImportRowPageSchema,
44
45
  memberImportSchema,
45
46
  offeredStarterSchema,
47
+ permissionListSchema,
48
+ permissionSchema,
49
+ projectRoleSchema,
50
+ roleSchema,
46
51
  starterIdSchema
47
- } from "./chunk-SIKP4VMU.js";
52
+ } from "./chunk-ZXFRHGZC.js";
48
53
  import {
49
54
  automaticCatchUpPreviewSchema,
50
55
  automaticCatchUpResultSchema,
@@ -70,13 +75,13 @@ import {
70
75
  import {
71
76
  createHttpExchange,
72
77
  uncertainStatuses
73
- } from "./chunk-CEG67D4T.js";
78
+ } from "./chunk-4YKOSNYI.js";
74
79
  import {
75
80
  MANAGEMENT_TIMEOUT,
76
81
  lifetime,
77
82
  retrying,
78
83
  validTimeout
79
- } from "./chunk-XJCKQSFS.js";
84
+ } from "./chunk-X5REDFGV.js";
80
85
  import {
81
86
  collectionPreviewSchema,
82
87
  creatorAccountProviderSchema,
@@ -1781,103 +1786,57 @@ var connectionEndpoints = /* @__PURE__ */ (() => ({
1781
1786
  })
1782
1787
  }))();
1783
1788
 
1784
- // src/server/permissions.ts
1785
- import * as z14 from "zod";
1786
- var environmentSchema = /* @__PURE__ */ (() => z14.enum(["test", "live"]))();
1787
- var roleSchema = /* @__PURE__ */ (() => z14.enum(["editor", "reviewer", "staff"]))();
1788
- var permissionSchema = /* @__PURE__ */ (() => z14.enum([
1789
- "read",
1790
- "publish",
1791
- "review",
1792
- "confirm",
1793
- "handover",
1794
- "inventory",
1795
- "access",
1796
- "points",
1797
- /**
1798
- * Custom tracker ingestion only (`trackers.ingest`), such as for an indexer's key. Editors and
1799
- * hosted-app keys hold it.
1800
- */
1801
- "ingest",
1802
- /**
1803
- * Enrolling members from a server (`quests.enroll`), which vouches for their consent. Editors
1804
- * hold it; hosted-app keys do not.
1805
- */
1806
- "enroll"
1807
- ]))();
1808
- var permissionListSchema = /* @__PURE__ */ (() => z14.array(z14.string()).transform(
1809
- (values) => values.filter(
1810
- (value) => permissionSchema.safeParse(value).success
1811
- )
1812
- ))();
1813
- var rolePermissions = {
1814
- editor: ["read", "publish", "inventory", "points", "ingest", "enroll"],
1815
- reviewer: ["read", "review"],
1816
- staff: ["read", "confirm", "handover"]
1817
- };
1818
- var projectRoleSchema = /* @__PURE__ */ (() => z14.enum([...roleSchema.options, "viewer"]))();
1819
- var projectPermissionSchema = /* @__PURE__ */ (() => z14.enum([
1820
- ...permissionSchema.options,
1821
- "dashboards"
1822
- ]))();
1823
- var projectRolePermissions = {
1824
- editor: [...rolePermissions.editor, "dashboards"],
1825
- reviewer: [...rolePermissions.reviewer, "dashboards"],
1826
- staff: [...rolePermissions.staff, "dashboards"],
1827
- viewer: ["dashboards"]
1828
- };
1829
-
1830
1789
  // src/server/api-keys.ts
1831
- import * as z15 from "zod";
1832
- var ingestTrackerScopeSchema = /* @__PURE__ */ (() => z15.array(identifier).min(1).max(100).nullable())();
1833
- var tokenScopeInputSchema = /* @__PURE__ */ (() => z15.object({ ingestTrackers: ingestTrackerScopeSchema }).strict())();
1834
- var tokenInputSchema = /* @__PURE__ */ (() => z15.object({
1835
- name: z15.string().trim().min(1).max(80),
1790
+ import * as z14 from "zod";
1791
+ var ingestTrackerScopeSchema = /* @__PURE__ */ (() => z14.array(identifier).min(1).max(100).nullable())();
1792
+ var tokenScopeInputSchema = /* @__PURE__ */ (() => z14.object({ ingestTrackers: ingestTrackerScopeSchema }).strict())();
1793
+ var tokenInputSchema = /* @__PURE__ */ (() => z14.object({
1794
+ name: z14.string().trim().min(1).max(80),
1836
1795
  project: identifier,
1837
1796
  environment: environmentSchema,
1838
- permissions: z15.array(permissionSchema).min(1),
1797
+ permissions: z14.array(permissionSchema).min(1),
1839
1798
  ingestTrackers: ingestTrackerScopeSchema.optional(),
1840
- days: z15.number().int().min(1).max(90).default(30)
1799
+ days: z14.number().int().min(1).max(90).default(30)
1841
1800
  }).strict())();
1842
- var tokenSchema = /* @__PURE__ */ (() => z15.object({
1843
- id: z15.string(),
1844
- name: z15.string(),
1845
- project: z15.string(),
1801
+ var tokenSchema = /* @__PURE__ */ (() => z14.object({
1802
+ id: z14.string(),
1803
+ name: z14.string(),
1804
+ project: z14.string(),
1846
1805
  environment: environmentSchema,
1847
1806
  permissions: permissionListSchema,
1848
1807
  ingestTrackers: ingestTrackerScopeSchema.optional(),
1849
- expiresAt: z15.number()
1808
+ expiresAt: z14.number()
1850
1809
  }))();
1851
- var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token: z15.string() }))();
1852
- var serviceKeyInputSchema = /* @__PURE__ */ (() => z15.object({
1853
- name: z15.string().trim().min(1).max(80),
1854
- permissions: z15.array(permissionSchema).min(1).refine(
1810
+ var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token: z14.string() }))();
1811
+ var serviceKeyInputSchema = /* @__PURE__ */ (() => z14.object({
1812
+ name: z14.string().trim().min(1).max(80),
1813
+ permissions: z14.array(permissionSchema).min(1).refine(
1855
1814
  (permissions) => !permissions.includes("access"),
1856
1815
  "Service keys cannot hold the access permission"
1857
1816
  ),
1858
1817
  /** Days until the first secret expires. Omit it for a key that never expires. */
1859
- expiresInDays: z15.number().int().min(1).max(3650).optional()
1818
+ expiresInDays: z14.number().int().min(1).max(3650).optional()
1860
1819
  }).strict())();
1861
- var serviceKeySchema = /* @__PURE__ */ (() => z15.object({
1862
- id: z15.string().uuid(),
1863
- organization: z15.string(),
1864
- project: z15.string(),
1820
+ var serviceKeySchema = /* @__PURE__ */ (() => z14.object({
1821
+ id: z14.string().uuid(),
1822
+ organization: z14.string(),
1823
+ project: z14.string(),
1865
1824
  environment: environmentSchema,
1866
- name: z15.string(),
1825
+ name: z14.string(),
1867
1826
  permissions: permissionListSchema,
1868
1827
  /** The Clerk user ID of the administrator who created it. */
1869
- createdBy: z15.string(),
1870
- createdAt: z15.number(),
1828
+ createdBy: z14.string(),
1829
+ createdAt: z14.number(),
1871
1830
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
1872
- lastUsedAt: z15.number().nullable(),
1831
+ lastUsedAt: z14.number().nullable(),
1873
1832
  /** Its working secrets, oldest first. Any of them authenticates the key. */
1874
- secrets: z15.array(credentialSecretSchema)
1833
+ secrets: z14.array(credentialSecretSchema)
1875
1834
  }))();
1876
1835
  var issuedServiceKeySchema = /* @__PURE__ */ (() => serviceKeySchema.extend({
1877
- secret: z15.string().uuid(),
1878
- token: z15.string()
1836
+ secret: z14.string().uuid(),
1837
+ token: z14.string()
1879
1838
  }))();
1880
- var automationKeyPermissionSchema = /* @__PURE__ */ (() => z15.enum([
1839
+ var automationKeyPermissionSchema = /* @__PURE__ */ (() => z14.enum([
1881
1840
  "read",
1882
1841
  "publish",
1883
1842
  "inventory",
@@ -1885,61 +1844,61 @@ var automationKeyPermissionSchema = /* @__PURE__ */ (() => z15.enum([
1885
1844
  "ingest",
1886
1845
  "enroll"
1887
1846
  ]))();
1888
- var automationKeyInputSchema = /* @__PURE__ */ (() => z15.object({
1889
- name: z15.string().trim().min(1).max(80),
1890
- permissions: z15.array(automationKeyPermissionSchema).min(1),
1847
+ var automationKeyInputSchema = /* @__PURE__ */ (() => z14.object({
1848
+ name: z14.string().trim().min(1).max(80),
1849
+ permissions: z14.array(automationKeyPermissionSchema).min(1),
1891
1850
  /**
1892
1851
  * The projects it reaches. Omit it for every project of the organization, current and future.
1893
1852
  * An empty list, allowed only with `createProjects`, reaches only the projects it creates.
1894
1853
  */
1895
- projects: z15.array(identifier).max(100).optional(),
1854
+ projects: z14.array(identifier).max(100).optional(),
1896
1855
  /** Whether it may create projects. A project it creates joins its `projects` list. */
1897
- createProjects: z15.boolean().default(false),
1856
+ createProjects: z14.boolean().default(false),
1898
1857
  /** Days until the first secret expires. Omit it for a key that never expires. */
1899
- expiresInDays: z15.number().int().min(1).max(3650).optional()
1858
+ expiresInDays: z14.number().int().min(1).max(3650).optional()
1900
1859
  }).strict().refine((key2) => key2.projects?.length !== 0 || key2.createProjects, {
1901
1860
  message: "Choose a project, or let the key create projects",
1902
1861
  path: ["projects"]
1903
1862
  }))();
1904
- var automationKeySchema = /* @__PURE__ */ (() => z15.object({
1905
- id: z15.string().uuid(),
1906
- organization: z15.string(),
1907
- name: z15.string(),
1863
+ var automationKeySchema = /* @__PURE__ */ (() => z14.object({
1864
+ id: z14.string().uuid(),
1865
+ organization: z14.string(),
1866
+ name: z14.string(),
1908
1867
  permissions: permissionListSchema,
1909
1868
  /** The projects it reaches; null for every project of the organization. */
1910
- projects: z15.array(z15.string()).nullable(),
1911
- createProjects: z15.boolean(),
1869
+ projects: z14.array(z14.string()).nullable(),
1870
+ createProjects: z14.boolean(),
1912
1871
  /** The Clerk user ID of the administrator who created it. */
1913
- createdBy: z15.string(),
1914
- createdAt: z15.number(),
1872
+ createdBy: z14.string(),
1873
+ createdAt: z14.number(),
1915
1874
  /** The latest use of any of its secrets, revoked ones included; null when none was used. */
1916
- lastUsedAt: z15.number().nullable(),
1875
+ lastUsedAt: z14.number().nullable(),
1917
1876
  /** Its working secrets, oldest first. Any of them authenticates the key. */
1918
- secrets: z15.array(credentialSecretSchema)
1877
+ secrets: z14.array(credentialSecretSchema)
1919
1878
  }))();
1920
1879
  var issuedAutomationKeySchema = /* @__PURE__ */ (() => automationKeySchema.extend({
1921
- secret: z15.string().uuid(),
1922
- token: z15.string()
1880
+ secret: z14.string().uuid(),
1881
+ token: z14.string()
1923
1882
  }))();
1924
1883
 
1925
1884
  // src/server/grants.ts
1926
- import * as z16 from "zod";
1927
- var grantSchema = /* @__PURE__ */ (() => z16.object({
1928
- subject: z16.string().min(1).max(200),
1929
- roles: z16.array(roleSchema),
1930
- environments: z16.array(environmentSchema)
1885
+ import * as z15 from "zod";
1886
+ var grantSchema = /* @__PURE__ */ (() => z15.object({
1887
+ subject: z15.string().min(1).max(200),
1888
+ roles: z15.array(roleSchema),
1889
+ environments: z15.array(environmentSchema)
1931
1890
  }).strict())();
1932
- var projectGrantSchema = /* @__PURE__ */ (() => z16.object({
1891
+ var projectGrantSchema = /* @__PURE__ */ (() => z15.object({
1933
1892
  subject: grantSchema.shape.subject,
1934
- roles: z16.array(projectRoleSchema),
1893
+ roles: z15.array(projectRoleSchema),
1935
1894
  environments: grantSchema.shape.environments,
1936
1895
  /**
1937
1896
  * When the grant stops giving access (epoch ms). Omit it, or send null, for a grant without
1938
1897
  * an end. An ended grant stays listed, so the project's access shows who had it and until when.
1939
1898
  */
1940
- expiresAt: z16.number().int().positive().nullable().optional()
1899
+ expiresAt: z15.number().int().positive().nullable().optional()
1941
1900
  }).strict())();
1942
- var grantRecordSchema = /* @__PURE__ */ (() => z16.object({
1901
+ var grantRecordSchema = /* @__PURE__ */ (() => z15.object({
1943
1902
  ...grantSchema.shape,
1944
1903
  /**
1945
1904
  * Every role the grant gives, `viewer` included, which `roles` leaves out. Absent from Relay
@@ -1947,21 +1906,21 @@ var grantRecordSchema = /* @__PURE__ */ (() => z16.object({
1947
1906
  *
1948
1907
  * @experimental
1949
1908
  */
1950
- projectRoles: z16.array(z16.string()).optional(),
1909
+ projectRoles: z15.array(z15.string()).optional(),
1951
1910
  /**
1952
1911
  * When the grant stops giving access (epoch ms), or null for no end. A grant past it is still
1953
1912
  * listed and gives no permission.
1954
1913
  *
1955
1914
  * @experimental
1956
1915
  */
1957
- expiresAt: z16.number().nullable().optional()
1916
+ expiresAt: z15.number().nullable().optional()
1958
1917
  }))();
1959
- var teamSchema = /* @__PURE__ */ (() => z16.array(
1960
- z16.object({ id: z16.string(), label: z16.string() })
1918
+ var teamSchema = /* @__PURE__ */ (() => z15.array(
1919
+ z15.object({ id: z15.string(), label: z15.string() })
1961
1920
  ))();
1962
1921
 
1963
1922
  // src/server/endpoints/credentials.ts
1964
- import * as z17 from "zod";
1923
+ import * as z16 from "zod";
1965
1924
  var TOKEN_PATTERN = ".+";
1966
1925
  var grantEndpoints = /* @__PURE__ */ (() => ({
1967
1926
  list: managementEndpoint({
@@ -1970,7 +1929,7 @@ var grantEndpoints = /* @__PURE__ */ (() => ({
1970
1929
  parameters: {},
1971
1930
  permission: { organization: "admin" },
1972
1931
  ledger: null,
1973
- result: () => z17.array(grantRecordSchema)
1932
+ result: () => z16.array(grantRecordSchema)
1974
1933
  }),
1975
1934
  set: managementEndpoint({
1976
1935
  method: "PUT",
@@ -1988,7 +1947,7 @@ var tokenEndpoints = /* @__PURE__ */ (() => ({
1988
1947
  parameters: {},
1989
1948
  permission: { handler: "tokens" },
1990
1949
  ledger: null,
1991
- result: () => z17.array(tokenSchema)
1950
+ result: () => z16.array(tokenSchema)
1992
1951
  }),
1993
1952
  create: managementEndpoint({
1994
1953
  method: "POST",
@@ -2021,7 +1980,7 @@ var tokenEndpoints = /* @__PURE__ */ (() => ({
2021
1980
  parameters: {},
2022
1981
  permission: { handler: "tokens" },
2023
1982
  ledger: null,
2024
- result: () => z17.unknown()
1983
+ result: () => z16.unknown()
2025
1984
  })
2026
1985
  }))();
2027
1986
  var key = { key: ID_PATTERN };
@@ -2033,7 +1992,7 @@ var serviceKeyEndpoints = /* @__PURE__ */ (() => ({
2033
1992
  parameters: {},
2034
1993
  permission: { organization: "service-keys" },
2035
1994
  ledger: null,
2036
- result: () => z17.array(serviceKeySchema)
1995
+ result: () => z16.array(serviceKeySchema)
2037
1996
  }),
2038
1997
  create: managementEndpoint({
2039
1998
  method: "POST",
@@ -2065,7 +2024,7 @@ var serviceKeyEndpoints = /* @__PURE__ */ (() => ({
2065
2024
  parameters: key,
2066
2025
  permission: { organization: "service-keys" },
2067
2026
  ledger: null,
2068
- result: () => z17.null()
2027
+ result: () => z16.null()
2069
2028
  })
2070
2029
  }))();
2071
2030
  var automationKeyEndpoints = /* @__PURE__ */ (() => ({
@@ -2075,7 +2034,7 @@ var automationKeyEndpoints = /* @__PURE__ */ (() => ({
2075
2034
  parameters: {},
2076
2035
  permission: { organization: "automation-keys" },
2077
2036
  ledger: null,
2078
- result: () => z17.array(automationKeySchema)
2037
+ result: () => z16.array(automationKeySchema)
2079
2038
  }),
2080
2039
  create: managementEndpoint({
2081
2040
  method: "POST",
@@ -2107,12 +2066,12 @@ var automationKeyEndpoints = /* @__PURE__ */ (() => ({
2107
2066
  parameters: key,
2108
2067
  permission: { organization: "automation-keys" },
2109
2068
  ledger: null,
2110
- result: () => z17.null()
2069
+ result: () => z16.null()
2111
2070
  })
2112
2071
  }))();
2113
2072
 
2114
2073
  // src/server/endpoints/deployments.ts
2115
- import * as z18 from "zod";
2074
+ import * as z17 from "zod";
2116
2075
  var deployment = { deployment: ID_PATTERN };
2117
2076
  var deploymentEndpoints = /* @__PURE__ */ (() => ({
2118
2077
  preview: managementEndpoint({
@@ -2130,7 +2089,7 @@ var deploymentEndpoints = /* @__PURE__ */ (() => ({
2130
2089
  parameters: {},
2131
2090
  permission: "read",
2132
2091
  ledger: "deployments.list",
2133
- result: () => z18.array(deploymentRecordSchema)
2092
+ result: () => z17.array(deploymentRecordSchema)
2134
2093
  }),
2135
2094
  history: managementEndpoint({
2136
2095
  method: "GET",
@@ -2231,8 +2190,8 @@ var deploymentEndpoints = /* @__PURE__ */ (() => ({
2231
2190
  }))();
2232
2191
 
2233
2192
  // src/server/resource-lifecycle.ts
2234
- import * as z19 from "zod";
2235
- var resourceLifecycleKindSchema = /* @__PURE__ */ (() => z19.enum([
2193
+ import * as z18 from "zod";
2194
+ var resourceLifecycleKindSchema = /* @__PURE__ */ (() => z18.enum([
2236
2195
  "tracker",
2237
2196
  "referral",
2238
2197
  "leaderboard",
@@ -2242,51 +2201,51 @@ var resourceLifecycleKindSchema = /* @__PURE__ */ (() => z19.enum([
2242
2201
  "image",
2243
2202
  "point-ledger"
2244
2203
  ]))();
2245
- var managedResourceSchema = /* @__PURE__ */ (() => z19.object({
2204
+ var managedResourceSchema = /* @__PURE__ */ (() => z18.object({
2246
2205
  kind: resourceLifecycleKindSchema,
2247
2206
  id: identifier,
2248
2207
  key: identifier.nullable(),
2249
- title: z19.string(),
2250
- archivedAt: z19.number().int().nonnegative().nullable()
2208
+ title: z18.string(),
2209
+ archivedAt: z18.number().int().nonnegative().nullable()
2251
2210
  }))();
2252
- var resourceLifecycleInputSchema = /* @__PURE__ */ (() => z19.object({
2253
- actionId: z19.string().uuid(),
2211
+ var resourceLifecycleInputSchema = /* @__PURE__ */ (() => z18.object({
2212
+ actionId: z18.string().uuid(),
2254
2213
  kind: resourceLifecycleKindSchema,
2255
2214
  resource: identifier,
2256
- archived: z19.boolean(),
2215
+ archived: z18.boolean(),
2257
2216
  reason: lifecycleReasonSchema,
2258
- expectedArchivedAt: z19.number().int().nonnegative().nullable().optional()
2217
+ expectedArchivedAt: z18.number().int().nonnegative().nullable().optional()
2259
2218
  }).strict())();
2260
- var resourceLifecycleResultSchema = /* @__PURE__ */ (() => z19.object({
2219
+ var resourceLifecycleResultSchema = /* @__PURE__ */ (() => z18.object({
2261
2220
  resource: managedResourceSchema,
2262
- changed: z19.boolean()
2221
+ changed: z18.boolean()
2263
2222
  }))();
2264
2223
  var managedOfferSchema = /* @__PURE__ */ (() => managedResourceSchema.extend({
2265
- kind: z19.literal("offer")
2224
+ kind: z18.literal("offer")
2266
2225
  }))();
2267
2226
  var managedTieredRewardSchema = /* @__PURE__ */ (() => managedResourceSchema.extend({
2268
- kind: z19.literal("tiered-reward")
2227
+ kind: z18.literal("tiered-reward")
2269
2228
  }))();
2270
- var managedResourceListSchema = /* @__PURE__ */ (() => z19.object({
2271
- resources: z19.array(managedResourceSchema),
2272
- offers: z19.array(managedOfferSchema).default([]),
2229
+ var managedResourceListSchema = /* @__PURE__ */ (() => z18.object({
2230
+ resources: z18.array(managedResourceSchema),
2231
+ offers: z18.array(managedOfferSchema).default([]),
2273
2232
  /** Absent from a Relay older than tiered reward archiving; treat it as none. */
2274
- tieredRewards: z19.array(managedTieredRewardSchema).optional()
2233
+ tieredRewards: z18.array(managedTieredRewardSchema).optional()
2275
2234
  }))();
2276
- var offerLifecycleResultSchema = /* @__PURE__ */ (() => z19.object({
2235
+ var offerLifecycleResultSchema = /* @__PURE__ */ (() => z18.object({
2277
2236
  resource: managedOfferSchema,
2278
- changed: z19.boolean()
2237
+ changed: z18.boolean()
2279
2238
  }))();
2280
- var offerLifecycleInputSchema = /* @__PURE__ */ (() => z19.strictObject({
2281
- actionId: z19.string().uuid(),
2239
+ var offerLifecycleInputSchema = /* @__PURE__ */ (() => z18.strictObject({
2240
+ actionId: z18.string().uuid(),
2282
2241
  offer: identifier,
2283
- archived: z19.boolean(),
2284
- reason: z19.string().trim().min(1).max(500),
2285
- expectedArchivedAt: z19.number().int().nonnegative().nullable().optional()
2242
+ archived: z18.boolean(),
2243
+ reason: z18.string().trim().min(1).max(500),
2244
+ expectedArchivedAt: z18.number().int().nonnegative().nullable().optional()
2286
2245
  }))();
2287
- var tieredRewardLifecycleResultSchema = /* @__PURE__ */ (() => z19.object({
2246
+ var tieredRewardLifecycleResultSchema = /* @__PURE__ */ (() => z18.object({
2288
2247
  resource: managedTieredRewardSchema,
2289
- changed: z19.boolean()
2248
+ changed: z18.boolean()
2290
2249
  }))();
2291
2250
  var tieredRewardLifecycleInputSchema = /* @__PURE__ */ (() => offerLifecycleInputSchema.omit({ offer: true }).extend({ reward: identifier }))();
2292
2251
  var resourceLifecyclePaths = {
@@ -2306,7 +2265,7 @@ var resourceArchiveInputSchema = /* @__PURE__ */ (() => resourceLifecycleInputSc
2306
2265
  }))();
2307
2266
 
2308
2267
  // src/server/endpoints/engagement.ts
2309
- import * as z20 from "zod";
2268
+ import * as z19 from "zod";
2310
2269
  var resource = { resource: ID_PATTERN };
2311
2270
  var engagementEndpoints = /* @__PURE__ */ (() => ({
2312
2271
  list: managementEndpoint({
@@ -2315,7 +2274,7 @@ var engagementEndpoints = /* @__PURE__ */ (() => ({
2315
2274
  parameters: {},
2316
2275
  permission: "read",
2317
2276
  ledger: "engagement.list",
2318
- result: () => z20.array(engagementRuleSchema)
2277
+ result: () => z19.array(engagementRuleSchema)
2319
2278
  }),
2320
2279
  page: managementEndpoint({
2321
2280
  method: "GET",
@@ -2414,10 +2373,10 @@ var contentEndpoints = /* @__PURE__ */ (() => ({
2414
2373
  }))();
2415
2374
 
2416
2375
  // src/server/entitlements.ts
2417
- import * as z21 from "zod";
2418
- var managedEntitlementQuerySchema = /* @__PURE__ */ (() => z21.strictObject({
2419
- q: z21.string().max(200).optional(),
2420
- status: z21.string().min(1).max(50).optional(),
2376
+ import * as z20 from "zod";
2377
+ var managedEntitlementQuerySchema = /* @__PURE__ */ (() => z20.strictObject({
2378
+ q: z20.string().max(200).optional(),
2379
+ status: z20.string().min(1).max(50).optional(),
2421
2380
  limit: pageLimit,
2422
2381
  cursor: pageCursorSchema.optional()
2423
2382
  }))();
@@ -2431,25 +2390,25 @@ var EntitlementSourceKind = {
2431
2390
  /** An offer redemption: `id` is the offer. */
2432
2391
  Offer: "offer"
2433
2392
  };
2434
- var entitlementSourceSchema = /* @__PURE__ */ (() => z21.object({
2435
- kind: z21.string(),
2393
+ var entitlementSourceSchema = /* @__PURE__ */ (() => z20.object({
2394
+ kind: z20.string(),
2436
2395
  id: identifier,
2437
2396
  completion: identifier.nullish(),
2438
2397
  attempt: identifier.nullish(),
2439
2398
  invitee: identifier.nullish(),
2440
2399
  redemption: identifier.nullish()
2441
2400
  }).loose())();
2442
- var entitlementProvenanceSchema = /* @__PURE__ */ (() => z21.object({
2443
- earnedAt: z21.number().nullish(),
2401
+ var entitlementProvenanceSchema = /* @__PURE__ */ (() => z20.object({
2402
+ earnedAt: z20.number().nullish(),
2444
2403
  source: entitlementSourceSchema.nullish()
2445
2404
  }))();
2446
- var managedEntitlementPageSchema = /* @__PURE__ */ (() => z21.object({
2447
- items: z21.array(entitlementSchema),
2448
- people: z21.array(personSchema),
2449
- total: z21.number().int().nonnegative(),
2450
- nextCursor: z21.string().nullable()
2405
+ var managedEntitlementPageSchema = /* @__PURE__ */ (() => z20.object({
2406
+ items: z20.array(entitlementSchema),
2407
+ people: z20.array(personSchema),
2408
+ total: z20.number().int().nonnegative(),
2409
+ nextCursor: z20.string().nullable()
2451
2410
  }))();
2452
- var managedEntitlementSchema = /* @__PURE__ */ (() => z21.object({
2411
+ var managedEntitlementSchema = /* @__PURE__ */ (() => z20.object({
2453
2412
  entitlement: entitlementSchema,
2454
2413
  person: personSchema
2455
2414
  }))();
@@ -2540,69 +2499,69 @@ var entitlementEndpoints = /* @__PURE__ */ (() => ({
2540
2499
  }))();
2541
2500
 
2542
2501
  // src/server/galleries.ts
2543
- import * as z22 from "zod";
2544
- var gallerySchema = /* @__PURE__ */ (() => z22.object({
2502
+ import * as z21 from "zod";
2503
+ var gallerySchema = /* @__PURE__ */ (() => z21.object({
2545
2504
  /** The quest's ID. */
2546
2505
  quest: identifier,
2547
2506
  /** The key the quest is written under in code. */
2548
- key: z22.string(),
2549
- title: z22.string(),
2550
- kind: z22.string(),
2551
- photos: z22.number().int().nonnegative(),
2552
- hiddenPhotos: z22.number().int().nonnegative()
2553
- }))();
2554
- var galleryListSchema = /* @__PURE__ */ (() => z22.object({ items: z22.array(gallerySchema) }))();
2555
- var galleryHiddenFilterSchema = /* @__PURE__ */ (() => z22.enum(["include", "exclude", "only"]))();
2556
- var galleryPhotoQuerySchema = /* @__PURE__ */ (() => z22.strictObject({
2557
- quest: z22.string().min(1).max(200).optional(),
2558
- day: z22.iso.date().optional(),
2507
+ key: z21.string(),
2508
+ title: z21.string(),
2509
+ kind: z21.string(),
2510
+ photos: z21.number().int().nonnegative(),
2511
+ hiddenPhotos: z21.number().int().nonnegative()
2512
+ }))();
2513
+ var galleryListSchema = /* @__PURE__ */ (() => z21.object({ items: z21.array(gallerySchema) }))();
2514
+ var galleryHiddenFilterSchema = /* @__PURE__ */ (() => z21.enum(["include", "exclude", "only"]))();
2515
+ var galleryPhotoQuerySchema = /* @__PURE__ */ (() => z21.strictObject({
2516
+ quest: z21.string().min(1).max(200).optional(),
2517
+ day: z21.iso.date().optional(),
2559
2518
  hidden: galleryHiddenFilterSchema.optional(),
2560
2519
  winners: booleanQuery.optional(),
2561
2520
  cursor: pageCursorSchema.optional(),
2562
2521
  limit: pageLimit
2563
2522
  }))();
2564
- var galleryExportQuerySchema = /* @__PURE__ */ (() => z22.strictObject({
2565
- quest: z22.string().min(1).max(200).optional(),
2566
- day: z22.iso.date().optional(),
2523
+ var galleryExportQuerySchema = /* @__PURE__ */ (() => z21.strictObject({
2524
+ quest: z21.string().min(1).max(200).optional(),
2525
+ day: z21.iso.date().optional(),
2567
2526
  includeHidden: booleanQuery.optional(),
2568
2527
  cursor: pageCursorSchema.optional()
2569
2528
  }))();
2570
2529
  var galleryPhotoHiddenSchema = evidenceRedactionSchema;
2571
- var galleryWinnerRewardSchema = /* @__PURE__ */ (() => z22.object({
2530
+ var galleryWinnerRewardSchema = /* @__PURE__ */ (() => z21.object({
2572
2531
  quest: identifier,
2573
2532
  attempt: identifier
2574
2533
  }))();
2575
- var galleryWinnerSchema = /* @__PURE__ */ (() => z22.object({
2576
- at: z22.number(),
2577
- actor: z22.string().nullable(),
2534
+ var galleryWinnerSchema = /* @__PURE__ */ (() => z21.object({
2535
+ at: z21.number(),
2536
+ actor: z21.string().nullable(),
2578
2537
  reward: galleryWinnerRewardSchema.nullable()
2579
2538
  }))();
2580
- var galleryPhotoSchema = /* @__PURE__ */ (() => z22.object({
2539
+ var galleryPhotoSchema = /* @__PURE__ */ (() => z21.object({
2581
2540
  attempt: identifier,
2582
2541
  quest: identifier,
2583
2542
  member: identifier,
2584
- name: z22.string().nullable(),
2543
+ name: z21.string().nullable(),
2585
2544
  evidence: identifier,
2586
- submittedAt: z22.number().int().nonnegative(),
2587
- decidedAt: z22.number().int().nonnegative().nullable(),
2545
+ submittedAt: z21.number().int().nonnegative(),
2546
+ decidedAt: z21.number().int().nonnegative().nullable(),
2588
2547
  hidden: galleryPhotoHiddenSchema.nullable(),
2589
2548
  winner: galleryWinnerSchema.nullable()
2590
2549
  }))();
2591
- var galleryPhotoPageSchema = /* @__PURE__ */ (() => z22.object({
2592
- items: z22.array(galleryPhotoSchema),
2550
+ var galleryPhotoPageSchema = /* @__PURE__ */ (() => z21.object({
2551
+ items: z21.array(galleryPhotoSchema),
2593
2552
  nextCursor: pageCursorSchema.nullable()
2594
2553
  }))();
2595
2554
  var galleryPhotoHideInputSchema = staffReasonInputSchema;
2596
- var galleryPhotoHideResultSchema = /* @__PURE__ */ (() => z22.object({
2555
+ var galleryPhotoHideResultSchema = /* @__PURE__ */ (() => z21.object({
2597
2556
  attempt: identifier,
2598
2557
  hidden: galleryPhotoHiddenSchema.nullable()
2599
2558
  }))();
2600
- var galleryWinnerMarkInputSchema = /* @__PURE__ */ (() => z22.object({
2559
+ var galleryWinnerMarkInputSchema = /* @__PURE__ */ (() => z21.object({
2601
2560
  actionId: identifier,
2602
- reward: z22.object({ quest: identifier }).strict().optional()
2561
+ reward: z21.object({ quest: identifier }).strict().optional()
2603
2562
  }).strict())();
2604
- var galleryWinnerUnmarkInputSchema = /* @__PURE__ */ (() => z22.object({ actionId: identifier }).strict())();
2605
- var galleryWinnerResultSchema = /* @__PURE__ */ (() => z22.object({
2563
+ var galleryWinnerUnmarkInputSchema = /* @__PURE__ */ (() => z21.object({ actionId: identifier }).strict())();
2564
+ var galleryWinnerResultSchema = /* @__PURE__ */ (() => z21.object({
2606
2565
  attempt: identifier,
2607
2566
  winner: galleryWinnerSchema.nullable()
2608
2567
  }))();
@@ -2756,7 +2715,7 @@ var groupEndpoints = /* @__PURE__ */ (() => ({
2756
2715
  }))();
2757
2716
 
2758
2717
  // src/server/endpoints/hosting.ts
2759
- import * as z23 from "zod";
2718
+ import * as z22 from "zod";
2760
2719
  var liveAppEndpoints = /* @__PURE__ */ (() => ({
2761
2720
  get: managementEndpoint({
2762
2721
  method: "GET",
@@ -2901,7 +2860,7 @@ var storageEndpoints = /* @__PURE__ */ (() => ({
2901
2860
  parameters: { kind: "kv|sql", name: HOSTING_NAME_PATTERN },
2902
2861
  permission: "publish",
2903
2862
  ledger: null,
2904
- result: () => z23.discriminatedUnion("kind", [
2863
+ result: () => z22.discriminatedUnion("kind", [
2905
2864
  appStorageSqlClearResultSchema,
2906
2865
  appStorageKvClearResultSchema
2907
2866
  ])
@@ -2966,7 +2925,7 @@ var repositoryEndpoints = /* @__PURE__ */ (() => ({
2966
2925
  parameters: {},
2967
2926
  permission: { handler: "read" },
2968
2927
  ledger: null,
2969
- result: () => z23.unknown()
2928
+ result: () => z22.unknown()
2970
2929
  }),
2971
2930
  create: managementEndpoint({
2972
2931
  method: "POST",
@@ -2974,7 +2933,7 @@ var repositoryEndpoints = /* @__PURE__ */ (() => ({
2974
2933
  parameters: {},
2975
2934
  permission: { handler: "publish" },
2976
2935
  ledger: null,
2977
- result: () => z23.unknown()
2936
+ result: () => z22.unknown()
2978
2937
  }),
2979
2938
  starter: managementEndpoint({
2980
2939
  method: "GET",
@@ -2982,7 +2941,7 @@ var repositoryEndpoints = /* @__PURE__ */ (() => ({
2982
2941
  parameters: { starter: SEGMENT_PATTERN },
2983
2942
  permission: { handler: "read" },
2984
2943
  ledger: null,
2985
- result: () => z23.unknown()
2944
+ result: () => z22.unknown()
2986
2945
  })
2987
2946
  }))();
2988
2947
  var buildEndpoints = /* @__PURE__ */ (() => ({
@@ -2992,7 +2951,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
2992
2951
  parameters: {},
2993
2952
  permission: { handler: "read" },
2994
2953
  ledger: null,
2995
- result: () => z23.unknown()
2954
+ result: () => z22.unknown()
2996
2955
  }),
2997
2956
  start: managementEndpoint({
2998
2957
  method: "POST",
@@ -3000,7 +2959,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
3000
2959
  parameters: {},
3001
2960
  permission: { handler: "publish" },
3002
2961
  ledger: null,
3003
- result: () => z23.unknown()
2962
+ result: () => z22.unknown()
3004
2963
  }),
3005
2964
  // A server-sent event stream of the repository's builds.
3006
2965
  events: managementEndpoint({
@@ -3017,7 +2976,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
3017
2976
  parameters: { build: UUID_PATTERN },
3018
2977
  permission: { handler: "read" },
3019
2978
  ledger: null,
3020
- result: () => z23.unknown()
2979
+ result: () => z22.unknown()
3021
2980
  }),
3022
2981
  logs: managementEndpoint({
3023
2982
  method: "GET",
@@ -3025,7 +2984,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
3025
2984
  parameters: { build: UUID_PATTERN },
3026
2985
  permission: { handler: "read" },
3027
2986
  ledger: null,
3028
- result: () => z23.unknown()
2987
+ result: () => z22.unknown()
3029
2988
  }),
3030
2989
  // A WebP image.
3031
2990
  screenshot: managementEndpoint({
@@ -3037,6 +2996,16 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
3037
2996
  result: "raw"
3038
2997
  })
3039
2998
  }))();
2999
+ var runtimeLogEndpoints = /* @__PURE__ */ (() => ({
3000
+ list: managementEndpoint({
3001
+ method: "GET",
3002
+ path: "/runtime-logs",
3003
+ parameters: {},
3004
+ permission: "read",
3005
+ ledger: null,
3006
+ result: () => z22.unknown()
3007
+ })
3008
+ }))();
3040
3009
  var stagingEndpoints = /* @__PURE__ */ (() => ({
3041
3010
  access: managementEndpoint({
3042
3011
  method: "GET",
@@ -3044,7 +3013,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
3044
3013
  parameters: {},
3045
3014
  permission: { handler: "read" },
3046
3015
  ledger: null,
3047
- result: () => z23.unknown()
3016
+ result: () => z22.unknown()
3048
3017
  }),
3049
3018
  setAccess: managementEndpoint({
3050
3019
  method: "PUT",
@@ -3052,7 +3021,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
3052
3021
  parameters: {},
3053
3022
  permission: { handler: "publish" },
3054
3023
  ledger: null,
3055
- result: () => z23.unknown()
3024
+ result: () => z22.unknown()
3056
3025
  }),
3057
3026
  // A one-time link that opens the staging app with the caller's Console session.
3058
3027
  link: managementEndpoint({
@@ -3061,7 +3030,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
3061
3030
  parameters: {},
3062
3031
  permission: { handler: "read" },
3063
3032
  ledger: null,
3064
- result: () => z23.unknown()
3033
+ result: () => z22.unknown()
3065
3034
  }),
3066
3035
  serverKeys: managementEndpoint({
3067
3036
  method: "GET",
@@ -3069,7 +3038,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
3069
3038
  parameters: {},
3070
3039
  permission: { handler: "read" },
3071
3040
  ledger: null,
3072
- result: () => z23.unknown()
3041
+ result: () => z22.unknown()
3073
3042
  }),
3074
3043
  createServerKey: managementEndpoint({
3075
3044
  method: "POST",
@@ -3077,7 +3046,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
3077
3046
  parameters: {},
3078
3047
  permission: { handler: "publish" },
3079
3048
  ledger: null,
3080
- result: () => z23.unknown()
3049
+ result: () => z22.unknown()
3081
3050
  }),
3082
3051
  revokeServerKey: managementEndpoint({
3083
3052
  method: "DELETE",
@@ -3085,7 +3054,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
3085
3054
  parameters: { key: UUID_PATTERN },
3086
3055
  permission: { handler: "publish" },
3087
3056
  ledger: null,
3088
- result: () => z23.unknown()
3057
+ result: () => z22.unknown()
3089
3058
  })
3090
3059
  }))();
3091
3060
  var developmentEndpoints = /* @__PURE__ */ (() => ({
@@ -3095,7 +3064,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
3095
3064
  parameters: {},
3096
3065
  permission: { handler: "session" },
3097
3066
  ledger: null,
3098
- result: () => z23.unknown()
3067
+ result: () => z22.unknown()
3099
3068
  }),
3100
3069
  revokeKey: managementEndpoint({
3101
3070
  method: "DELETE",
@@ -3103,7 +3072,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
3103
3072
  parameters: { key: UUID_PATTERN },
3104
3073
  permission: { handler: "session" },
3105
3074
  ledger: null,
3106
- result: () => z23.unknown()
3075
+ result: () => z22.unknown()
3107
3076
  }),
3108
3077
  startSession: managementEndpoint({
3109
3078
  method: "POST",
@@ -3111,7 +3080,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
3111
3080
  parameters: {},
3112
3081
  permission: { handler: "publish" },
3113
3082
  ledger: null,
3114
- result: () => z23.unknown()
3083
+ result: () => z22.unknown()
3115
3084
  }),
3116
3085
  renewSession: managementEndpoint({
3117
3086
  method: "PUT",
@@ -3119,7 +3088,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
3119
3088
  parameters: {},
3120
3089
  permission: { handler: "publish" },
3121
3090
  ledger: null,
3122
- result: () => z23.unknown()
3091
+ result: () => z22.unknown()
3123
3092
  }),
3124
3093
  stopSession: managementEndpoint({
3125
3094
  method: "DELETE",
@@ -3127,12 +3096,12 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
3127
3096
  parameters: {},
3128
3097
  permission: { handler: "publish" },
3129
3098
  ledger: null,
3130
- result: () => z23.unknown()
3099
+ result: () => z22.unknown()
3131
3100
  })
3132
3101
  }))();
3133
3102
 
3134
3103
  // src/server/endpoints/identity-integrations.ts
3135
- import * as z24 from "zod";
3104
+ import * as z23 from "zod";
3136
3105
  var integration = { integration: ID_PATTERN };
3137
3106
  var secret2 = { integration: ID_PATTERN, secret: ID_PATTERN };
3138
3107
  var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
@@ -3142,7 +3111,7 @@ var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
3142
3111
  parameters: {},
3143
3112
  permission: { organization: "identity-reader" },
3144
3113
  ledger: null,
3145
- result: () => z24.array(identityIntegrationSchema)
3114
+ result: () => z23.array(identityIntegrationSchema)
3146
3115
  }),
3147
3116
  kinds: managementEndpoint({
3148
3117
  method: "GET",
@@ -3150,7 +3119,7 @@ var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
3150
3119
  parameters: {},
3151
3120
  permission: { organization: "identity-reader" },
3152
3121
  ledger: null,
3153
- result: () => z24.array(identityKindClaimSchema)
3122
+ result: () => z23.array(identityKindClaimSchema)
3154
3123
  }),
3155
3124
  create: managementEndpoint({
3156
3125
  method: "POST",
@@ -3206,12 +3175,12 @@ var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
3206
3175
  parameters: integration,
3207
3176
  permission: { organization: "identity-admin" },
3208
3177
  ledger: null,
3209
- result: () => z24.null()
3178
+ result: () => z23.null()
3210
3179
  })
3211
3180
  }))();
3212
3181
 
3213
3182
  // src/server/endpoints/integrations.ts
3214
- import * as z25 from "zod";
3183
+ import * as z24 from "zod";
3215
3184
  var integrationEndpoints = /* @__PURE__ */ (() => ({
3216
3185
  // The list may name providers a release doesn't know, so the client reads it entry by entry.
3217
3186
  list: managementEndpoint({
@@ -3220,7 +3189,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3220
3189
  parameters: {},
3221
3190
  permission: "read",
3222
3191
  ledger: null,
3223
- result: () => z25.array(z25.unknown())
3192
+ result: () => z24.array(z24.unknown())
3224
3193
  }),
3225
3194
  discordServers: managementEndpoint({
3226
3195
  method: "GET",
@@ -3268,7 +3237,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3268
3237
  parameters: {},
3269
3238
  permission: "read",
3270
3239
  ledger: null,
3271
- result: () => z25.unknown()
3240
+ result: () => z24.unknown()
3272
3241
  }),
3273
3242
  connectDiscord: managementEndpoint({
3274
3243
  method: "POST",
@@ -3276,7 +3245,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3276
3245
  parameters: {},
3277
3246
  permission: { handler: "integration-admin" },
3278
3247
  ledger: null,
3279
- result: () => z25.unknown()
3248
+ result: () => z24.unknown()
3280
3249
  }),
3281
3250
  discordLink: managementEndpoint({
3282
3251
  method: "POST",
@@ -3284,7 +3253,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3284
3253
  parameters: {},
3285
3254
  permission: { handler: "integration-admin" },
3286
3255
  ledger: null,
3287
- result: () => z25.unknown()
3256
+ result: () => z24.unknown()
3288
3257
  }),
3289
3258
  completeDiscord: managementEndpoint({
3290
3259
  method: "POST",
@@ -3292,7 +3261,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3292
3261
  parameters: {},
3293
3262
  permission: { handler: "integration-admin" },
3294
3263
  ledger: null,
3295
- result: () => z25.unknown()
3264
+ result: () => z24.unknown()
3296
3265
  }),
3297
3266
  refreshDiscord: managementEndpoint({
3298
3267
  method: "POST",
@@ -3300,7 +3269,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3300
3269
  parameters: {},
3301
3270
  permission: { handler: "integration-admin" },
3302
3271
  ledger: null,
3303
- result: () => z25.unknown()
3272
+ result: () => z24.unknown()
3304
3273
  }),
3305
3274
  disconnectDiscord: managementEndpoint({
3306
3275
  method: "DELETE",
@@ -3308,7 +3277,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3308
3277
  parameters: {},
3309
3278
  permission: { handler: "integration-admin" },
3310
3279
  ledger: null,
3311
- result: () => z25.unknown()
3280
+ result: () => z24.unknown()
3312
3281
  }),
3313
3282
  // The Discord event receiver's state, when the backend runs it.
3314
3283
  discordEvents: managementEndpoint({
@@ -3317,7 +3286,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3317
3286
  parameters: {},
3318
3287
  permission: "read",
3319
3288
  ledger: null,
3320
- result: () => z25.unknown()
3289
+ result: () => z24.unknown()
3321
3290
  }),
3322
3291
  // Always 403: Domino restarts the receiver itself.
3323
3292
  restartDiscordEvents: managementEndpoint({
@@ -3326,63 +3295,63 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
3326
3295
  parameters: {},
3327
3296
  permission: "read",
3328
3297
  ledger: null,
3329
- result: () => z25.unknown()
3298
+ result: () => z24.unknown()
3330
3299
  })
3331
3300
  }))();
3332
3301
 
3333
3302
  // src/server/inventory-items.ts
3334
- import * as z26 from "zod";
3335
- var inventoryItemStateSchema = /* @__PURE__ */ (() => z26.object({
3303
+ import * as z25 from "zod";
3304
+ var inventoryItemStateSchema = /* @__PURE__ */ (() => z25.object({
3336
3305
  item: identifier,
3337
- name: z26.string().nullable(),
3338
- available: z26.number().int().safe().nonnegative(),
3339
- reserved: z26.number().int().safe().nonnegative(),
3340
- allocated: z26.number().int().safe().nonnegative(),
3341
- offers: z26.array(identifier),
3342
- revision: z26.number().int().nonnegative(),
3343
- archivedAt: z26.number().int().safe().nonnegative().nullable()
3306
+ name: z25.string().nullable(),
3307
+ available: z25.number().int().safe().nonnegative(),
3308
+ reserved: z25.number().int().safe().nonnegative(),
3309
+ allocated: z25.number().int().safe().nonnegative(),
3310
+ offers: z25.array(identifier),
3311
+ revision: z25.number().int().nonnegative(),
3312
+ archivedAt: z25.number().int().safe().nonnegative().nullable()
3344
3313
  }))();
3345
3314
  var correction = /* @__PURE__ */ (() => ({
3346
- actionId: z26.string().uuid().default(() => crypto.randomUUID()),
3347
- expectedRevision: z26.number().int().nonnegative(),
3348
- reason: z26.string().trim().min(1).max(500)
3315
+ actionId: z25.string().uuid().default(() => crypto.randomUUID()),
3316
+ expectedRevision: z25.number().int().nonnegative(),
3317
+ reason: z25.string().trim().min(1).max(500)
3349
3318
  }))();
3350
- var inventoryItemActionSchema = /* @__PURE__ */ (() => z26.strictObject(correction))();
3351
- var inventoryItemRenameSchema = /* @__PURE__ */ (() => z26.strictObject({
3319
+ var inventoryItemActionSchema = /* @__PURE__ */ (() => z25.strictObject(correction))();
3320
+ var inventoryItemRenameSchema = /* @__PURE__ */ (() => z25.strictObject({
3352
3321
  ...correction,
3353
- name: z26.string().trim().min(1).max(200)
3322
+ name: z25.string().trim().min(1).max(200)
3354
3323
  }))();
3355
- var inventoryStockCorrectionSchema = /* @__PURE__ */ (() => z26.strictObject({
3324
+ var inventoryStockCorrectionSchema = /* @__PURE__ */ (() => z25.strictObject({
3356
3325
  ...correction,
3357
- delta: z26.number().int().safe()
3326
+ delta: z25.number().int().safe()
3358
3327
  }))();
3359
- var inventoryItemPageSchema = /* @__PURE__ */ (() => z26.object({
3360
- items: z26.array(inventoryItemStateSchema),
3328
+ var inventoryItemPageSchema = /* @__PURE__ */ (() => z25.object({
3329
+ items: z25.array(inventoryItemStateSchema),
3361
3330
  nextCursor: pageCursorSchema.nullable()
3362
3331
  }))();
3363
- var inventorySchema = /* @__PURE__ */ (() => z26.object({
3364
- item: z26.string(),
3365
- name: z26.string().nullable().default(null),
3366
- available: z26.number(),
3367
- reserved: z26.number(),
3368
- allocated: z26.number().default(0)
3332
+ var inventorySchema = /* @__PURE__ */ (() => z25.object({
3333
+ item: z25.string(),
3334
+ name: z25.string().nullable().default(null),
3335
+ available: z25.number(),
3336
+ reserved: z25.number(),
3337
+ allocated: z25.number().default(0)
3369
3338
  }))();
3370
- var stockAdditionSchema = /* @__PURE__ */ (() => z26.object({
3339
+ var stockAdditionSchema = /* @__PURE__ */ (() => z25.object({
3371
3340
  item: identifier,
3372
- quantity: z26.number().int(),
3341
+ quantity: z25.number().int(),
3373
3342
  actionId: identifier
3374
3343
  }))();
3375
- var stockInputSchema = /* @__PURE__ */ (() => z26.object({
3344
+ var stockInputSchema = /* @__PURE__ */ (() => z25.object({
3376
3345
  item: identifier,
3377
- quantity: z26.number().int().positive().max(1e6),
3346
+ quantity: z25.number().int().positive().max(1e6),
3378
3347
  actionId: identifier
3379
3348
  }).strict())();
3380
3349
  var managedStockItemSchema = /* @__PURE__ */ (() => inventorySchema.extend({
3381
- offers: z26.array(identifier)
3350
+ offers: z25.array(identifier)
3382
3351
  }))();
3383
3352
 
3384
3353
  // src/server/endpoints/inventory.ts
3385
- import * as z27 from "zod";
3354
+ import * as z26 from "zod";
3386
3355
  var item = { item: ID_PATTERN };
3387
3356
  var inventoryEndpoints = /* @__PURE__ */ (() => ({
3388
3357
  list: managementEndpoint({
@@ -3391,7 +3360,7 @@ var inventoryEndpoints = /* @__PURE__ */ (() => ({
3391
3360
  parameters: {},
3392
3361
  permission: "read",
3393
3362
  ledger: "stock.list",
3394
- result: () => z27.array(managedStockItemSchema)
3363
+ result: () => z26.array(managedStockItemSchema)
3395
3364
  }),
3396
3365
  items: managementEndpoint({
3397
3366
  method: "GET",
@@ -3456,7 +3425,7 @@ var inventoryEndpoints = /* @__PURE__ */ (() => ({
3456
3425
  parameters: {},
3457
3426
  permission: "read",
3458
3427
  ledger: "pickup.list",
3459
- result: () => z27.array(pickupCatalogSchema)
3428
+ result: () => z26.array(pickupCatalogSchema)
3460
3429
  }),
3461
3430
  configure: managementEndpoint({
3462
3431
  method: "POST",
@@ -3477,38 +3446,38 @@ var inventoryEndpoints = /* @__PURE__ */ (() => ({
3477
3446
  }))();
3478
3447
 
3479
3448
  // src/server/leaderboard-standing.ts
3480
- import * as z28 from "zod";
3481
- var leaderboardMemberStandingSchema = /* @__PURE__ */ (() => z28.object({
3449
+ import * as z27 from "zod";
3450
+ var leaderboardMemberStandingSchema = /* @__PURE__ */ (() => z27.object({
3482
3451
  leaderboard: identifier,
3483
3452
  member: identifier,
3484
- status: z28.string(),
3485
- rank: z28.number().int().positive().nullable(),
3486
- score: z28.number().int().nullable(),
3453
+ status: z27.string(),
3454
+ rank: z27.number().int().positive().nullable(),
3455
+ score: z27.number().int().nullable(),
3487
3456
  /** Ranked participants on the board. */
3488
- total: z28.number().int().nonnegative()
3457
+ total: z27.number().int().nonnegative()
3489
3458
  }))();
3490
3459
 
3491
3460
  // src/server/settlement-payouts.ts
3492
- import * as z29 from "zod";
3493
- var timestamp = /* @__PURE__ */ (() => z29.number().int().safe().nonnegative())();
3494
- var index = /* @__PURE__ */ (() => z29.number().int().safe().nonnegative())();
3495
- var actionId2 = /* @__PURE__ */ (() => z29.string().uuid().default(() => crypto.randomUUID()))();
3496
- var solanaPayoutMintSchema = /* @__PURE__ */ (() => z29.union([
3497
- z29.literal("SOL"),
3461
+ import * as z28 from "zod";
3462
+ var timestamp = /* @__PURE__ */ (() => z28.number().int().safe().nonnegative())();
3463
+ var index = /* @__PURE__ */ (() => z28.number().int().safe().nonnegative())();
3464
+ var actionId2 = /* @__PURE__ */ (() => z28.string().uuid().default(() => crypto.randomUUID()))();
3465
+ var solanaPayoutMintSchema = /* @__PURE__ */ (() => z28.union([
3466
+ z28.literal("SOL"),
3498
3467
  solanaAddressSchema
3499
3468
  ]))();
3500
- var solanaPayoutSquadsSchema = /* @__PURE__ */ (() => z29.strictObject({
3469
+ var solanaPayoutSquadsSchema = /* @__PURE__ */ (() => z28.strictObject({
3501
3470
  /** The multisig account (not its vault). */
3502
3471
  multisig: solanaAddressSchema,
3503
3472
  /** The vault the payout pays from; Squads' default vault is 0. */
3504
- vaultIndex: z29.number().int().min(0).max(255).default(0),
3473
+ vaultIndex: z28.number().int().min(0).max(255).default(0),
3505
3474
  /** The member that signs each batch's proposal transaction and pays its fees and rent. */
3506
3475
  proposer: solanaAddressSchema
3507
3476
  }))();
3508
- var solanaPayoutInputSchema = /* @__PURE__ */ (() => z29.strictObject({
3477
+ var solanaPayoutInputSchema = /* @__PURE__ */ (() => z28.strictObject({
3509
3478
  actionId: actionId2,
3510
3479
  /** The cluster, by CAIP-2 ID. */
3511
- network: z29.enum([solanaMainnet, solanaDevnet]),
3480
+ network: z28.enum([solanaMainnet, solanaDevnet]),
3512
3481
  mint: solanaPayoutMintSchema,
3513
3482
  /** The wallet that signs every batch, pays its fees and rent, and holds the tokens. */
3514
3483
  payer: solanaAddressSchema.optional(),
@@ -3518,57 +3487,57 @@ var solanaPayoutInputSchema = /* @__PURE__ */ (() => z29.strictObject({
3518
3487
  message: "Pass payer to pay from a wallet, or squads to pay from a multisig",
3519
3488
  path: ["payer"]
3520
3489
  }))();
3521
- var solanaPayoutConfirmationSchema = /* @__PURE__ */ (() => z29.strictObject({
3490
+ var solanaPayoutConfirmationSchema = /* @__PURE__ */ (() => z28.strictObject({
3522
3491
  actionId: actionId2,
3523
3492
  /** Signatures of transactions the team sent, which Relay reads first. */
3524
- signatures: z29.array(solanaSignatureSchema).max(100).default([])
3493
+ signatures: z28.array(solanaSignatureSchema).max(100).default([])
3525
3494
  }))();
3526
- var batchSchema = /* @__PURE__ */ (() => z29.object({
3495
+ var batchSchema = /* @__PURE__ */ (() => z28.object({
3527
3496
  index,
3528
3497
  /** The SPL Memo text the batch carries, which Relay finds it by. */
3529
- memo: z29.string(),
3498
+ memo: z28.string(),
3530
3499
  /**
3531
3500
  * The unsigned v0 transaction, base64. Its fee payer and only signer signs it: the payer, or for
3532
3501
  * a Squads payout the proposer.
3533
3502
  */
3534
- transaction: z29.string(),
3535
- status: z29.string(),
3503
+ transaction: z28.string(),
3504
+ status: z28.string(),
3536
3505
  /** The transaction Relay found for the batch; null while pending or expired. */
3537
- signature: z29.string().nullable(),
3506
+ signature: z28.string().nullable(),
3538
3507
  /** Base units the batch pays. */
3539
3508
  amount: baseUnitsSchema,
3540
3509
  /** Lamports for the token accounts the batch creates. */
3541
3510
  rent: baseUnitsSchema,
3542
3511
  /** The Squads vault transaction's index in its multisig; null for a wallet payout. */
3543
- transactionIndex: z29.string().nullable().default(null),
3512
+ transactionIndex: z28.string().nullable().default(null),
3544
3513
  /** The address of the batch's Squads proposal account; null for a wallet payout. */
3545
- proposal: z29.string().nullable().default(null),
3546
- payments: z29.array(
3547
- z29.object({
3514
+ proposal: z28.string().nullable().default(null),
3515
+ payments: z28.array(
3516
+ z28.object({
3548
3517
  member: identifier,
3549
3518
  /** The member's proven Solana wallet the share goes to. */
3550
- wallet: z29.string(),
3519
+ wallet: z28.string(),
3551
3520
  amount: baseUnitsSchema
3552
3521
  })
3553
3522
  )
3554
3523
  }))();
3555
- var solanaPayoutSchema = /* @__PURE__ */ (() => z29.object({
3524
+ var solanaPayoutSchema = /* @__PURE__ */ (() => z28.object({
3556
3525
  id: identifier,
3557
3526
  settlement: identifier,
3558
- network: z29.string(),
3527
+ network: z28.string(),
3559
3528
  /** `"SOL"` or the mint address. */
3560
- mint: z29.string(),
3529
+ mint: z28.string(),
3561
3530
  /** The mint's token program; null for SOL. */
3562
- tokenProgram: z29.string().nullable(),
3531
+ tokenProgram: z28.string().nullable(),
3563
3532
  /** What pays: `wallet`, or `squads`, whose vault is `payer`. */
3564
- source: z29.string().default("wallet"),
3533
+ source: z28.string().default("wallet"),
3565
3534
  /** The account that holds the tokens and pays: the wallet, or the multisig's vault. */
3566
- payer: z29.string(),
3535
+ payer: z28.string(),
3567
3536
  /** The Squads multisig, for a payout from its vault; null for a wallet payout. */
3568
- squads: z29.object({
3569
- multisig: z29.string(),
3570
- vaultIndex: z29.number().int().min(0).max(255),
3571
- proposer: z29.string(),
3537
+ squads: z28.object({
3538
+ multisig: z28.string(),
3539
+ vaultIndex: z28.number().int().min(0).max(255),
3540
+ proposer: z28.string(),
3572
3541
  /**
3573
3542
  * Lamports the proposer puts into each batch's vault transaction and proposal accounts,
3574
3543
  * together. Squads returns them to the multisig's rent collector when the accounts close.
@@ -3589,35 +3558,35 @@ var solanaPayoutSchema = /* @__PURE__ */ (() => z29.object({
3589
3558
  * The last block height at which the batches can land; after it, they expire. For a Squads
3590
3559
  * payout, the height by which the proposals must be created.
3591
3560
  */
3592
- lastValidBlockHeight: z29.string(),
3561
+ lastValidBlockHeight: z28.string(),
3593
3562
  createdAt: timestamp,
3594
- createdBy: z29.string(),
3595
- batches: z29.array(batchSchema),
3563
+ createdBy: z28.string(),
3564
+ batches: z28.array(batchSchema),
3596
3565
  /** Winners with a non-zero, unpaid share this payout leaves out. */
3597
- skipped: z29.array(
3598
- z29.object({
3566
+ skipped: z28.array(
3567
+ z28.object({
3599
3568
  member: identifier,
3600
3569
  share: baseUnitsSchema,
3601
- reason: z29.string()
3570
+ reason: z28.string()
3602
3571
  })
3603
3572
  )
3604
3573
  }))();
3605
- var solanaPayoutQuerySchema = /* @__PURE__ */ (() => z29.strictObject({
3574
+ var solanaPayoutQuerySchema = /* @__PURE__ */ (() => z28.strictObject({
3606
3575
  cursor: pageCursorSchema.optional(),
3607
- limit: z29.coerce.number().int().min(1).max(25).default(10)
3576
+ limit: z28.coerce.number().int().min(1).max(25).default(10)
3608
3577
  }))();
3609
- var solanaPayoutPageSchema = /* @__PURE__ */ (() => z29.object({
3610
- items: z29.array(solanaPayoutSchema),
3578
+ var solanaPayoutPageSchema = /* @__PURE__ */ (() => z28.object({
3579
+ items: z28.array(solanaPayoutSchema),
3611
3580
  nextCursor: pageCursorSchema.nullable()
3612
3581
  }))();
3613
- var solanaPayoutConfirmationResultSchema = /* @__PURE__ */ (() => z29.object({
3582
+ var solanaPayoutConfirmationResultSchema = /* @__PURE__ */ (() => z28.object({
3614
3583
  settlement: identifier,
3615
- batches: z29.array(
3616
- z29.object({
3584
+ batches: z28.array(
3585
+ z28.object({
3617
3586
  payout: identifier,
3618
3587
  index,
3619
- status: z29.string(),
3620
- signature: z29.string().nullable()
3588
+ status: z28.string(),
3589
+ signature: z28.string().nullable()
3621
3590
  })
3622
3591
  ),
3623
3592
  paid: index,
@@ -3632,61 +3601,61 @@ function squadsProposalUrl(payout, batch) {
3632
3601
  }
3633
3602
 
3634
3603
  // src/server/settlement-reviews.ts
3635
- import * as z30 from "zod";
3636
- var timestamp2 = /* @__PURE__ */ (() => z30.number().int().safe().nonnegative())();
3604
+ import * as z29 from "zod";
3605
+ var timestamp2 = /* @__PURE__ */ (() => z29.number().int().safe().nonnegative())();
3637
3606
  var decision = /* @__PURE__ */ (() => ({
3638
- status: z30.enum(["pending", "approved", "rejected"]),
3607
+ status: z29.enum(["pending", "approved", "rejected"]),
3639
3608
  /**
3640
3609
  * Present while the window has ended but Relay is still taking closing measurements of the
3641
3610
  * content its engagement points pay for. The settlement reads as `pending` with no rows, cannot
3642
3611
  * be approved yet, and freezes when the measurements arrive or their wait ends after `deadline`.
3643
3612
  */
3644
- closing: z30.object({ startedAt: timestamp2, deadline: timestamp2 }).optional(),
3645
- rejectedAt: z30.number().int().safe().nonnegative().nullable(),
3646
- rejectedBy: z30.string().nullable(),
3647
- rejectionReason: z30.string().nullable()
3613
+ closing: z29.object({ startedAt: timestamp2, deadline: timestamp2 }).optional(),
3614
+ rejectedAt: z29.number().int().safe().nonnegative().nullable(),
3615
+ rejectedBy: z29.string().nullable(),
3616
+ rejectionReason: z29.string().nullable()
3648
3617
  }))();
3649
3618
  var leaderboardSettlementReviewSummarySchema = /* @__PURE__ */ (() => leaderboardSettlementSummarySchema.extend(decision))();
3650
3619
  var leaderboardSettlementReviewSchema = /* @__PURE__ */ (() => leaderboardSettlementSchema.extend(decision))();
3651
- var leaderboardSettlementReviewQuerySchema = /* @__PURE__ */ (() => z30.strictObject({
3620
+ var leaderboardSettlementReviewQuerySchema = /* @__PURE__ */ (() => z29.strictObject({
3652
3621
  cursor: pageCursorSchema.optional(),
3653
- limit: z30.coerce.number().int().min(1).max(100).default(25)
3622
+ limit: z29.coerce.number().int().min(1).max(100).default(25)
3654
3623
  }))();
3655
- var leaderboardSettlementReviewPageSchema = /* @__PURE__ */ (() => z30.object({
3656
- items: z30.array(leaderboardSettlementReviewSummarySchema),
3624
+ var leaderboardSettlementReviewPageSchema = /* @__PURE__ */ (() => z29.object({
3625
+ items: z29.array(leaderboardSettlementReviewSummarySchema),
3657
3626
  nextCursor: pageCursorSchema.nullable()
3658
3627
  }))();
3659
- var leaderboardSettlementRejectionSchema = /* @__PURE__ */ (() => z30.strictObject({
3660
- actionId: z30.string().uuid().default(() => crypto.randomUUID()),
3661
- expectedCreatedAt: z30.number().int().safe().nonnegative(),
3662
- reason: z30.string().trim().min(1).max(500)
3628
+ var leaderboardSettlementRejectionSchema = /* @__PURE__ */ (() => z29.strictObject({
3629
+ actionId: z29.string().uuid().default(() => crypto.randomUUID()),
3630
+ expectedCreatedAt: z29.number().int().safe().nonnegative(),
3631
+ reason: z29.string().trim().min(1).max(500)
3663
3632
  }))();
3664
- var leaderboardSettlementMeasurementRetrySchema = /* @__PURE__ */ (() => z30.strictObject({
3665
- actionId: z30.string().uuid().default(() => crypto.randomUUID())
3633
+ var leaderboardSettlementMeasurementRetrySchema = /* @__PURE__ */ (() => z29.strictObject({
3634
+ actionId: z29.string().uuid().default(() => crypto.randomUUID())
3666
3635
  }))();
3667
- var leaderboardSettlementExportSchema = /* @__PURE__ */ (() => z30.object({
3636
+ var leaderboardSettlementExportSchema = /* @__PURE__ */ (() => z29.object({
3668
3637
  settlement: identifier,
3669
3638
  leaderboard: identifier,
3670
- title: z30.string(),
3671
- period: z30.object({ start: timestamp2, end: timestamp2 }),
3672
- status: z30.enum(["pending", "approved", "rejected"]),
3639
+ title: z29.string(),
3640
+ period: z29.object({ start: timestamp2, end: timestamp2 }),
3641
+ status: z29.enum(["pending", "approved", "rejected"]),
3673
3642
  pool: leaderboardSettlementPoolSchema.nullable(),
3674
- rows: z30.array(
3675
- z30.object({
3643
+ rows: z29.array(
3644
+ z29.object({
3676
3645
  member: identifier,
3677
- score: z30.number().int().safe(),
3678
- rank: z30.number().int().safe().positive(),
3646
+ score: z29.number().int().safe(),
3647
+ rank: z29.number().int().safe().positive(),
3679
3648
  /** The pool share in base units; null without a pool. */
3680
3649
  share: baseUnitsSchema.nullable(),
3681
3650
  /** The pool share in whole units: `"600.5"` for 600500000 USDC base units. */
3682
- amount: z30.string().nullable(),
3651
+ amount: z29.string().nullable(),
3683
3652
  /** Linked wallets the member proved, newest first per chain family; a smart wallet names its `provedOn` chain. */
3684
- wallets: z30.array(
3685
- z30.object({
3653
+ wallets: z29.array(
3654
+ z29.object({
3686
3655
  chain: walletChainSchema,
3687
3656
  /** The CAIP-2 network, for Cosmos wallets only. */
3688
- network: z30.string().nullable(),
3689
- address: z30.string(),
3657
+ network: z29.string().nullable(),
3658
+ address: z29.string(),
3690
3659
  /** EVM smart-contract wallets only: the CAIP-2 network that proved it, the one chain to pay it on. */
3691
3660
  provedOn: evmChainIdSchema.optional()
3692
3661
  })
@@ -3715,7 +3684,7 @@ function settlementPayoutCsv(exported) {
3715
3684
  }
3716
3685
 
3717
3686
  // src/server/endpoints/leaderboards.ts
3718
- import * as z31 from "zod";
3687
+ import * as z30 from "zod";
3719
3688
  var leaderboard = { leaderboard: ID_PATTERN };
3720
3689
  var settlement = { settlement: ID_PATTERN };
3721
3690
  var resource2 = { resource: ID_PATTERN };
@@ -3726,7 +3695,7 @@ var leaderboardEndpoints = /* @__PURE__ */ (() => ({
3726
3695
  parameters: {},
3727
3696
  permission: "read",
3728
3697
  ledger: "leaderboards.listManaged",
3729
- result: () => z31.array(publishedLeaderboardSchema)
3698
+ result: () => z30.array(publishedLeaderboardSchema)
3730
3699
  }),
3731
3700
  standings: managementEndpoint({
3732
3701
  method: "GET",
@@ -3758,7 +3727,7 @@ var leaderboardEndpoints = /* @__PURE__ */ (() => ({
3758
3727
  parameters: leaderboard,
3759
3728
  permission: "read",
3760
3729
  ledger: "leaderboards.history",
3761
- result: () => z31.array(publishedLeaderboardSchema)
3730
+ result: () => z30.array(publishedLeaderboardSchema)
3762
3731
  }),
3763
3732
  exclusions: managementEndpoint({
3764
3733
  method: "GET",
@@ -3766,7 +3735,7 @@ var leaderboardEndpoints = /* @__PURE__ */ (() => ({
3766
3735
  parameters: leaderboard,
3767
3736
  permission: "read",
3768
3737
  ledger: "leaderboards.exclusions",
3769
- result: () => z31.array(z31.object({ member: identifier }))
3738
+ result: () => z30.array(z30.object({ member: identifier }))
3770
3739
  }),
3771
3740
  exclude: managementEndpoint({
3772
3741
  method: "POST",
@@ -3831,7 +3800,7 @@ var leaderboardEndpoints = /* @__PURE__ */ (() => ({
3831
3800
  parameters: leaderboard,
3832
3801
  permission: "read",
3833
3802
  ledger: "leaderboards.settlements",
3834
- result: () => z31.array(leaderboardSettlementSummarySchema)
3803
+ result: () => z30.array(leaderboardSettlementSummarySchema)
3835
3804
  }),
3836
3805
  settlement: managementEndpoint({
3837
3806
  method: "GET",
@@ -3994,61 +3963,61 @@ var memberImportEndpoints = /* @__PURE__ */ (() => ({
3994
3963
  }))();
3995
3964
 
3996
3965
  // src/server/creator-accounts.ts
3997
- import * as z32 from "zod";
3998
- var managedCreatorAccountSchema = /* @__PURE__ */ (() => z32.object({
3966
+ import * as z31 from "zod";
3967
+ var managedCreatorAccountSchema = /* @__PURE__ */ (() => z31.object({
3999
3968
  provider: creatorAccountProviderSchema,
4000
3969
  /** The platform's account ID, such as a YouTube channel ID (`UC…`) or a TikTok `open_id`. */
4001
- subject: z32.string().min(1),
4002
- revision: z32.number().int().nonnegative(),
3970
+ subject: z31.string().min(1),
3971
+ revision: z31.number().int().nonnegative(),
4003
3972
  /** When the member linked it, epoch milliseconds. */
4004
- linkedAt: z32.number().int().nonnegative().nullable(),
4005
- status: z32.enum(["connected", "needs-reconnect"]),
3973
+ linkedAt: z31.number().int().nonnegative().nullable(),
3974
+ status: z31.enum(["connected", "needs-reconnect"]),
4006
3975
  /** Why the member must link it again: `revoked`, `expired` or `missing-scope`. */
4007
- reason: z32.string().optional(),
3976
+ reason: z31.string().optional(),
4008
3977
  /** The public name, handle and picture the platform reported at link time. */
4009
- profile: z32.object({
4010
- name: z32.string().optional(),
4011
- username: z32.string().optional(),
4012
- imageUrl: z32.string().optional()
3978
+ profile: z31.object({
3979
+ name: z31.string().optional(),
3980
+ username: z31.string().optional(),
3981
+ imageUrl: z31.string().optional()
4013
3982
  }).nullable()
4014
3983
  }))();
4015
- var managedCreatorAccountsSchema = /* @__PURE__ */ (() => z32.object({
4016
- accounts: z32.array(managedCreatorAccountSchema)
3984
+ var managedCreatorAccountsSchema = /* @__PURE__ */ (() => z31.object({
3985
+ accounts: z31.array(managedCreatorAccountSchema)
4017
3986
  }))();
4018
- var memberCreatorAccountUnlinkInputSchema = /* @__PURE__ */ (() => z32.strictObject({
3987
+ var memberCreatorAccountUnlinkInputSchema = /* @__PURE__ */ (() => z31.strictObject({
4019
3988
  provider: creatorAccountProviderSchema,
4020
- subject: z32.string().min(1).max(4096),
4021
- revision: z32.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
4022
- reason: z32.string().trim().min(1).max(500),
3989
+ subject: z31.string().min(1).max(4096),
3990
+ revision: z31.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
3991
+ reason: z31.string().trim().min(1).max(500),
4023
3992
  actionId: identifier.optional()
4024
3993
  }))();
4025
3994
 
4026
3995
  // src/server/identity-links.ts
4027
- import * as z33 from "zod";
3996
+ import * as z32 from "zod";
4028
3997
  var walletIdentitySelectorSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({
4029
- kind: z33.literal("wallet")
3998
+ kind: z32.literal("wallet")
4030
3999
  }))();
4031
- var oauthIdentitySelectorSchema = /* @__PURE__ */ (() => z33.strictObject({
4032
- kind: z33.literal("oauth"),
4033
- provider: z33.enum(["x", "discord"]),
4034
- issuer: z33.string().min(1).max(4096),
4035
- subject: z33.string().min(1).max(4096)
4000
+ var oauthIdentitySelectorSchema = /* @__PURE__ */ (() => z32.strictObject({
4001
+ kind: z32.literal("oauth"),
4002
+ provider: z32.enum(["x", "discord"]),
4003
+ issuer: z32.string().min(1).max(4096),
4004
+ subject: z32.string().min(1).max(4096)
4036
4005
  }))();
4037
- var identityLinkSelectorSchema = /* @__PURE__ */ (() => z33.discriminatedUnion("kind", [
4006
+ var identityLinkSelectorSchema = /* @__PURE__ */ (() => z32.discriminatedUnion("kind", [
4038
4007
  walletIdentitySelectorSchema,
4039
4008
  oauthIdentitySelectorSchema
4040
4009
  ]))();
4041
4010
  var state = /* @__PURE__ */ (() => ({
4042
- revision: z33.number().int().safe().nonnegative(),
4043
- linked: z33.boolean(),
4044
- canRelink: z33.boolean(),
4045
- linkedAt: z33.number().int().safe().nonnegative().nullable()
4011
+ revision: z32.number().int().safe().nonnegative(),
4012
+ linked: z32.boolean(),
4013
+ canRelink: z32.boolean(),
4014
+ linkedAt: z32.number().int().safe().nonnegative().nullable()
4046
4015
  }))();
4047
- var memberIdentityLinkSchema = /* @__PURE__ */ (() => z33.discriminatedUnion("kind", [
4016
+ var memberIdentityLinkSchema = /* @__PURE__ */ (() => z32.discriminatedUnion("kind", [
4048
4017
  walletIdentitySelectorSchema.strip().extend({
4049
4018
  ...state,
4050
- scope: z33.literal("project"),
4051
- project: z33.string()
4019
+ scope: z32.literal("project"),
4020
+ project: z32.string()
4052
4021
  }),
4053
4022
  oauthIdentitySelectorSchema.strip().extend({
4054
4023
  ...state,
@@ -4056,26 +4025,26 @@ var memberIdentityLinkSchema = /* @__PURE__ */ (() => z33.discriminatedUnion("ki
4056
4025
  * Legacy name. An OAuth link belongs to the member's project and environment, like a wallet
4057
4026
  * link; the value stays for 1.x compatibility.
4058
4027
  */
4059
- scope: z33.literal("organization-environment")
4028
+ scope: z32.literal("organization-environment")
4060
4029
  })
4061
4030
  ]))();
4062
- var identityLinkRelinkInputSchema = /* @__PURE__ */ (() => z33.strictObject({
4063
- actionId: z33.string().uuid().default(() => crypto.randomUUID()),
4031
+ var identityLinkRelinkInputSchema = /* @__PURE__ */ (() => z32.strictObject({
4032
+ actionId: z32.string().uuid().default(() => crypto.randomUUID()),
4064
4033
  identity: identityLinkSelectorSchema,
4065
- expectedRevision: z33.number().int().safe().nonnegative(),
4066
- reason: z33.string().trim().min(1).max(500)
4034
+ expectedRevision: z32.number().int().safe().nonnegative(),
4035
+ reason: z32.string().trim().min(1).max(500)
4067
4036
  }))();
4068
- var memberIdentityLinkPageSchema = /* @__PURE__ */ (() => z33.object({
4069
- items: z33.array(memberIdentityLinkSchema),
4037
+ var memberIdentityLinkPageSchema = /* @__PURE__ */ (() => z32.object({
4038
+ items: z32.array(memberIdentityLinkSchema),
4070
4039
  nextCursor: pageCursorSchema.nullable()
4071
4040
  }))();
4072
4041
 
4073
4042
  // src/server/identity-states.ts
4074
- import * as z35 from "zod";
4043
+ import * as z34 from "zod";
4075
4044
 
4076
4045
  // src/server/identity-source.ts
4077
- import * as z34 from "zod";
4078
- var identitySourceSchema = /* @__PURE__ */ (() => z34.string())();
4046
+ import * as z33 from "zod";
4047
+ var identitySourceSchema = /* @__PURE__ */ (() => z33.string())();
4079
4048
  var identitySourceFields = /* @__PURE__ */ (() => ({
4080
4049
  /** Where Relay got the identity. Absent from Relay versions without it. */
4081
4050
  source: identitySourceSchema.optional(),
@@ -4083,58 +4052,58 @@ var identitySourceFields = /* @__PURE__ */ (() => ({
4083
4052
  * The ID of the member import that attached it, while `source` is `import`. Absent for an
4084
4053
  * account an import attached before Relay recorded which import did.
4085
4054
  */
4086
- import: z34.string().optional()
4055
+ import: z33.string().optional()
4087
4056
  }))();
4088
4057
 
4089
4058
  // src/server/identity-states.ts
4090
- var telegramIdentitySelectorSchema = /* @__PURE__ */ (() => z35.strictObject({
4091
- kind: z35.literal("telegram"),
4092
- subject: z35.string().min(1).max(4096)
4059
+ var telegramIdentitySelectorSchema = /* @__PURE__ */ (() => z34.strictObject({
4060
+ kind: z34.literal("telegram"),
4061
+ subject: z34.string().min(1).max(4096)
4093
4062
  }))();
4094
- var appIdentitySelectorSchema = /* @__PURE__ */ (() => z35.strictObject({
4095
- kind: z35.literal("app"),
4063
+ var appIdentitySelectorSchema = /* @__PURE__ */ (() => z34.strictObject({
4064
+ kind: z34.literal("app"),
4096
4065
  appKind: appIdentityKindSchema,
4097
- subject: z35.string().min(1).max(256)
4066
+ subject: z34.string().min(1).max(256)
4098
4067
  }))();
4099
- var memberIdentitySelectorSchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4068
+ var memberIdentitySelectorSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4100
4069
  walletIdentitySelectorSchema,
4101
4070
  oauthIdentitySelectorSchema,
4102
4071
  telegramIdentitySelectorSchema,
4103
4072
  appIdentitySelectorSchema
4104
4073
  ]))();
4105
- var memberIdentityReferenceSchema = /* @__PURE__ */ (() => z35.union([
4074
+ var memberIdentityReferenceSchema = /* @__PURE__ */ (() => z34.union([
4106
4075
  memberIdentitySelectorSchema,
4107
4076
  identityReferenceSchema
4108
4077
  ]))();
4109
4078
  var state2 = /* @__PURE__ */ (() => ({
4110
4079
  /** Every identity state belongs to the member's project and environment. */
4111
- scope: z35.literal("project"),
4080
+ scope: z34.literal("project"),
4112
4081
  /**
4113
4082
  * What `expectedRevision` names. A wallet and an app identity count their own changes; an X,
4114
4083
  * Discord or Telegram account shares its provider's selection revision with the member's other
4115
4084
  * accounts of that provider, because the member selects one of them at a time.
4116
4085
  */
4117
- revision: z35.number().int().safe().nonnegative(),
4086
+ revision: z34.number().int().safe().nonnegative(),
4118
4087
  /** Whether trackers attribute records to the member through this identity. */
4119
- linked: z35.boolean(),
4088
+ linked: z34.boolean(),
4120
4089
  /** When the current link began; null while unlinked, or for a link older than link times. */
4121
- linkedAt: z35.number().int().safe().nonnegative().nullable(),
4090
+ linkedAt: z34.number().int().safe().nonnegative().nullable(),
4122
4091
  /** When an operator or the member unlinked a wallet or app identity; null otherwise. */
4123
- unlinkedAt: z35.number().int().safe().nonnegative().nullable(),
4092
+ unlinkedAt: z34.number().int().safe().nonnegative().nullable(),
4124
4093
  /** "member", or the operator or key that unlinked it. */
4125
- unlinkedBy: z35.string().nullable(),
4126
- canUnlink: z35.boolean(),
4094
+ unlinkedBy: z34.string().nullable(),
4095
+ canUnlink: z34.boolean(),
4127
4096
  /**
4128
4097
  * False while linked, and for an X, Discord or Telegram account while the member has selected
4129
4098
  * another account of that provider: unlink that one first.
4130
4099
  */
4131
- canRelink: z35.boolean(),
4100
+ canRelink: z34.boolean(),
4132
4101
  /**
4133
4102
  * For a wallet: whether it signs the member in, which `setSignIn` changes on its own. Null for
4134
4103
  * the other kinds: an app identity signs in exactly while it is linked, and an X, Discord or
4135
4104
  * Telegram account signs in as its provider allows, whatever its link.
4136
4105
  */
4137
- signIn: z35.boolean().nullable()
4106
+ signIn: z34.boolean().nullable()
4138
4107
  }))();
4139
4108
  var account = /* @__PURE__ */ (() => ({
4140
4109
  /**
@@ -4142,7 +4111,7 @@ var account = /* @__PURE__ */ (() => ({
4142
4111
  * app login's server at sign-in), until the member links that provider's account through Domino.
4143
4112
  * Absent from Relay versions without it.
4144
4113
  */
4145
- imported: z35.boolean().optional(),
4114
+ imported: z34.boolean().optional(),
4146
4115
  /**
4147
4116
  * The app login that vouched for the account at sign-in, for an `imported` account no member
4148
4117
  * import attached. Absent from Relay versions without it.
@@ -4150,145 +4119,145 @@ var account = /* @__PURE__ */ (() => ({
4150
4119
  vouchedBy: accountVouchedBySchema.optional(),
4151
4120
  ...identitySourceFields
4152
4121
  }))();
4153
- var memberIdentityStateSchema = /* @__PURE__ */ (() => z35.discriminatedUnion("kind", [
4122
+ var memberIdentityStateSchema = /* @__PURE__ */ (() => z34.discriminatedUnion("kind", [
4154
4123
  walletIdentitySelectorSchema.strip().extend({ ...state2, ...identitySourceFields }),
4155
4124
  oauthIdentitySelectorSchema.strip().extend({ ...state2, ...account }),
4156
4125
  telegramIdentitySelectorSchema.strip().extend({ ...state2, ...account }),
4157
4126
  appIdentitySelectorSchema.strip().extend({ ...state2, ...identitySourceFields })
4158
4127
  ]))();
4159
- var memberIdentityStatePageSchema = /* @__PURE__ */ (() => z35.object({
4160
- items: z35.array(memberIdentityStateSchema),
4128
+ var memberIdentityStatePageSchema = /* @__PURE__ */ (() => z34.object({
4129
+ items: z34.array(memberIdentityStateSchema),
4161
4130
  nextCursor: pageCursorSchema.nullable()
4162
4131
  }))();
4163
4132
  var command = /* @__PURE__ */ (() => ({
4164
- actionId: z35.string().uuid().default(() => crypto.randomUUID()),
4165
- reason: z35.string().trim().min(1).max(500)
4133
+ actionId: z34.string().uuid().default(() => crypto.randomUUID()),
4134
+ reason: z34.string().trim().min(1).max(500)
4166
4135
  }))();
4167
- var memberIdentityStateChangeInputSchema = /* @__PURE__ */ (() => z35.strictObject({
4136
+ var memberIdentityStateChangeInputSchema = /* @__PURE__ */ (() => z34.strictObject({
4168
4137
  ...command,
4169
4138
  identity: memberIdentityReferenceSchema,
4170
- expectedRevision: z35.number().int().safe().nonnegative()
4139
+ expectedRevision: z34.number().int().safe().nonnegative()
4171
4140
  }))();
4172
- var memberIdentityLinkChangeInputSchema = /* @__PURE__ */ (() => z35.strictObject({
4141
+ var memberIdentityLinkChangeInputSchema = /* @__PURE__ */ (() => z34.strictObject({
4173
4142
  ...command,
4174
4143
  identity: memberIdentitySelectorSchema,
4175
- expectedRevision: z35.number().int().safe().nonnegative()
4144
+ expectedRevision: z34.number().int().safe().nonnegative()
4176
4145
  }))();
4177
- var memberIdentitySignInInputSchema = /* @__PURE__ */ (() => z35.strictObject({
4146
+ var memberIdentitySignInInputSchema = /* @__PURE__ */ (() => z34.strictObject({
4178
4147
  ...command,
4179
- identity: z35.union([
4148
+ identity: z34.union([
4180
4149
  walletIdentitySelectorSchema,
4181
4150
  // An import row's Cosmos wallet names its network too; the address alone names the wallet.
4182
4151
  walletIdentitySelectorSchema.extend({ network: cosmosNetworkSchema }).transform(({ network: _, ...wallet }) => wallet)
4183
4152
  ]),
4184
- enabled: z35.boolean()
4153
+ enabled: z34.boolean()
4185
4154
  }))();
4186
4155
 
4187
4156
  // src/server/member-accounts.ts
4188
- import * as z36 from "zod";
4157
+ import * as z35 from "zod";
4189
4158
  var ManagedAccountStatus = {
4190
4159
  Connected: "connected",
4191
4160
  Disconnected: "disconnected"
4192
4161
  };
4193
- var managedAccountStatusSchema = /* @__PURE__ */ (() => z36.string())();
4194
- var managedAccountSchema = /* @__PURE__ */ (() => z36.object({
4162
+ var managedAccountStatusSchema = /* @__PURE__ */ (() => z35.string())();
4163
+ var managedAccountSchema = /* @__PURE__ */ (() => z35.object({
4195
4164
  provider: signInProviderSchema,
4196
- revision: z36.number().int().nonnegative(),
4165
+ revision: z35.number().int().nonnegative(),
4197
4166
  status: managedAccountStatusSchema,
4198
4167
  /** The provider's stable user ID, such as the numeric Telegram user ID; null while disconnected. */
4199
- subject: z36.string().nullable(),
4168
+ subject: z35.string().nullable(),
4200
4169
  /** When the selection was linked, epoch milliseconds; null while disconnected. */
4201
- linkedAt: z36.number().nullable(),
4170
+ linkedAt: z35.number().nullable(),
4202
4171
  /**
4203
4172
  * True when the organization vouched for the account, not the member's proof: a member import
4204
4173
  * attached it, or an app login's server did at sign-in (`vouchedBy`).
4205
4174
  */
4206
- imported: z36.boolean().optional(),
4175
+ imported: z35.boolean().optional(),
4207
4176
  /** The app login that vouched for the account at sign-in, for an `imported` account no import attached. */
4208
4177
  vouchedBy: accountVouchedBySchema.optional(),
4209
4178
  /** True for a real account an operator linked to a test member without OAuth (`testMembers.linkAccount`). */
4210
- testLinked: z36.boolean().optional(),
4179
+ testLinked: z35.boolean().optional(),
4211
4180
  ...identitySourceFields
4212
4181
  }))();
4213
- var managedAccountsSchema = /* @__PURE__ */ (() => z36.object({
4214
- accounts: z36.array(managedAccountSchema)
4182
+ var managedAccountsSchema = /* @__PURE__ */ (() => z35.object({
4183
+ accounts: z35.array(managedAccountSchema)
4215
4184
  }))();
4216
- var memberAccountUnlinkInputSchema = /* @__PURE__ */ (() => z36.strictObject({
4185
+ var memberAccountUnlinkInputSchema = /* @__PURE__ */ (() => z35.strictObject({
4217
4186
  provider: signInProviderInputSchema,
4218
- subject: z36.string().min(1).max(4096),
4219
- expectedRevision: z36.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
4220
- reason: z36.string().trim().min(1).max(500),
4221
- actionId: z36.string().uuid()
4187
+ subject: z35.string().min(1).max(4096),
4188
+ expectedRevision: z35.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
4189
+ reason: z35.string().trim().min(1).max(500),
4190
+ actionId: z35.string().uuid()
4222
4191
  }))();
4223
4192
 
4224
4193
  // src/server/member-bans.ts
4225
- import * as z37 from "zod";
4226
- var memberBanRollbackSchema = /* @__PURE__ */ (() => z37.object({
4227
- completions: z37.boolean().default(false),
4228
- referralPayouts: z37.boolean().default(false),
4229
- pointAwards: z37.boolean().default(false)
4194
+ import * as z36 from "zod";
4195
+ var memberBanRollbackSchema = /* @__PURE__ */ (() => z36.object({
4196
+ completions: z36.boolean().default(false),
4197
+ referralPayouts: z36.boolean().default(false),
4198
+ pointAwards: z36.boolean().default(false)
4230
4199
  }).strict())();
4231
- var banReason = /* @__PURE__ */ (() => z37.string().trim().min(1).max(500))();
4232
- var memberBanInputSchema = /* @__PURE__ */ (() => z37.object({
4200
+ var banReason = /* @__PURE__ */ (() => z36.string().trim().min(1).max(500))();
4201
+ var memberBanInputSchema = /* @__PURE__ */ (() => z36.object({
4233
4202
  actionId: identifier,
4234
4203
  reason: banReason,
4235
4204
  rollback: memberBanRollbackSchema.optional()
4236
4205
  }).strict())();
4237
- var memberBanPreviewInputSchema = /* @__PURE__ */ (() => z37.object({ rollback: memberBanRollbackSchema.optional() }).strict())();
4238
- var memberUnbanInputSchema = /* @__PURE__ */ (() => z37.object({
4206
+ var memberBanPreviewInputSchema = /* @__PURE__ */ (() => z36.object({ rollback: memberBanRollbackSchema.optional() }).strict())();
4207
+ var memberUnbanInputSchema = /* @__PURE__ */ (() => z36.object({
4239
4208
  actionId: identifier,
4240
4209
  reason: banReason,
4241
- restoreCompletions: z37.boolean().default(false)
4210
+ restoreCompletions: z36.boolean().default(false)
4242
4211
  }).strict())();
4243
- var points = /* @__PURE__ */ (() => z37.number().int().nonnegative())();
4244
- var memberBanOutcomeSchema = /* @__PURE__ */ (() => z37.object({
4212
+ var points = /* @__PURE__ */ (() => z36.number().int().nonnegative())();
4213
+ var memberBanOutcomeSchema = /* @__PURE__ */ (() => z36.object({
4245
4214
  attemptsRejected: points,
4246
4215
  completionsRevoked: points,
4247
4216
  completionsRestored: points,
4248
- completionsKept: z37.array(
4249
- z37.object({ completion: identifier, code: z37.string() })
4217
+ completionsKept: z36.array(
4218
+ z36.object({ completion: identifier, code: z36.string() })
4250
4219
  ),
4251
4220
  entriesReversed: points,
4252
4221
  referralAccounts: points,
4253
- points: z37.array(
4254
- z37.object({ ledger: identifier, reversed: points, unreversed: points })
4222
+ points: z36.array(
4223
+ z36.object({ ledger: identifier, reversed: points, unreversed: points })
4255
4224
  ),
4256
- referralDebt: z37.array(z37.object({ ledger: identifier, amount: points }))
4225
+ referralDebt: z36.array(z36.object({ ledger: identifier, amount: points }))
4257
4226
  }))();
4258
- var runStatusSchema = /* @__PURE__ */ (() => z37.string())();
4259
- var runSchema = /* @__PURE__ */ (() => z37.object({
4227
+ var runStatusSchema = /* @__PURE__ */ (() => z36.string())();
4228
+ var runSchema = /* @__PURE__ */ (() => z36.object({
4260
4229
  status: runStatusSchema,
4261
- finishedAt: z37.number().int().nullable(),
4230
+ finishedAt: z36.number().int().nullable(),
4262
4231
  outcome: memberBanOutcomeSchema.nullable()
4263
4232
  }))();
4264
- var memberBanSchema = /* @__PURE__ */ (() => z37.object({
4233
+ var memberBanSchema = /* @__PURE__ */ (() => z36.object({
4265
4234
  id: identifier,
4266
4235
  member: identifier,
4267
- reason: z37.string(),
4268
- bannedAt: z37.number().int(),
4269
- bannedBy: z37.string().nullable(),
4236
+ reason: z36.string(),
4237
+ bannedAt: z36.number().int(),
4238
+ bannedBy: z36.string().nullable(),
4270
4239
  rollback: runSchema.extend({
4271
- completions: z37.boolean(),
4272
- referralPayouts: z37.boolean(),
4273
- pointAwards: z37.boolean()
4274
- }),
4275
- unban: z37.object({
4276
- reason: z37.string(),
4277
- unbannedAt: z37.number().int(),
4278
- by: z37.string().nullable(),
4279
- restoreCompletions: z37.boolean(),
4240
+ completions: z36.boolean(),
4241
+ referralPayouts: z36.boolean(),
4242
+ pointAwards: z36.boolean()
4243
+ }),
4244
+ unban: z36.object({
4245
+ reason: z36.string(),
4246
+ unbannedAt: z36.number().int(),
4247
+ by: z36.string().nullable(),
4248
+ restoreCompletions: z36.boolean(),
4280
4249
  restore: runSchema.nullable()
4281
4250
  }).nullable()
4282
4251
  }))();
4283
- var memberBanPreviewSchema = /* @__PURE__ */ (() => z37.object({
4252
+ var memberBanPreviewSchema = /* @__PURE__ */ (() => z36.object({
4284
4253
  member: identifier,
4285
- banned: z37.boolean(),
4254
+ banned: z36.boolean(),
4286
4255
  attempts: points,
4287
4256
  completions: points,
4288
4257
  entries: points,
4289
4258
  referralAccounts: points,
4290
- points: z37.array(
4291
- z37.object({
4259
+ points: z36.array(
4260
+ z36.object({
4292
4261
  ledger: identifier,
4293
4262
  completions: points,
4294
4263
  pointAwards: points,
@@ -4299,11 +4268,11 @@ var memberBanPreviewSchema = /* @__PURE__ */ (() => z37.object({
4299
4268
  referralDebt: points
4300
4269
  })
4301
4270
  ),
4302
- inviters: z37.array(
4303
- z37.object({
4271
+ inviters: z36.array(
4272
+ z36.object({
4304
4273
  member: identifier,
4305
- ledgers: z37.array(
4306
- z37.object({
4274
+ ledgers: z36.array(
4275
+ z36.object({
4307
4276
  ledger: identifier,
4308
4277
  bonus: points,
4309
4278
  reversed: points,
@@ -4315,44 +4284,44 @@ var memberBanPreviewSchema = /* @__PURE__ */ (() => z37.object({
4315
4284
  }))();
4316
4285
 
4317
4286
  // src/server/member-erasure.ts
4318
- import * as z38 from "zod";
4287
+ import * as z37 from "zod";
4319
4288
  var memberErasureInputSchema = evidenceRedactionInputSchema;
4320
- var memberErasureDeletedSchema = /* @__PURE__ */ (() => z38.object({
4289
+ var memberErasureDeletedSchema = /* @__PURE__ */ (() => z37.object({
4321
4290
  /** The profile: display name and avatar. 0 or 1. */
4322
- profiles: z38.number().int().nonnegative(),
4291
+ profiles: z37.number().int().nonnegative(),
4323
4292
  /** Sign-in identities. */
4324
- identities: z38.number().int().nonnegative(),
4293
+ identities: z37.number().int().nonnegative(),
4325
4294
  /** Linked X, Discord, Telegram, Google, Apple and email accounts. */
4326
- accounts: z38.number().int().nonnegative(),
4295
+ accounts: z37.number().int().nonnegative(),
4327
4296
  /** `app:<name>` identities your app's integration or an import gave. */
4328
- appIdentities: z38.number().int().nonnegative(),
4297
+ appIdentities: z37.number().int().nonnegative(),
4329
4298
  /** Linked wallet addresses. */
4330
- wallets: z38.number().int().nonnegative(),
4299
+ wallets: z37.number().int().nonnegative(),
4331
4300
  /** Signed-in sessions, ended at once. */
4332
- sessions: z38.number().int().nonnegative(),
4301
+ sessions: z37.number().int().nonnegative(),
4333
4302
  /** Marketing consent records. */
4334
- consents: z38.number().int().nonnegative(),
4303
+ consents: z37.number().int().nonnegative(),
4335
4304
  /** Leaderboard aliases. */
4336
- aliases: z38.number().int().nonnegative(),
4305
+ aliases: z37.number().int().nonnegative(),
4337
4306
  /** Attempts whose submitted evidence (photo, text, URL or answers) was deleted. */
4338
- evidence: z38.number().int().nonnegative(),
4307
+ evidence: z37.number().int().nonnegative(),
4339
4308
  /** Tracker records the member's accounts authored, whose stored content was forgotten. */
4340
- records: z38.number().int().nonnegative()
4309
+ records: z37.number().int().nonnegative()
4341
4310
  }))();
4342
- var memberErasureResultSchema = /* @__PURE__ */ (() => z38.object({
4311
+ var memberErasureResultSchema = /* @__PURE__ */ (() => z37.object({
4343
4312
  member: identifier,
4344
- erasedAt: z38.number().int(),
4313
+ erasedAt: z37.number().int(),
4345
4314
  deleted: memberErasureDeletedSchema
4346
4315
  }))();
4347
4316
 
4348
4317
  // src/server/wallets.ts
4349
- import * as z39 from "zod";
4318
+ import * as z38 from "zod";
4350
4319
  var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
4351
4320
  /**
4352
4321
  * True when the organization vouched for the wallet (a member import, or an app login's server at
4353
4322
  * sign-in), and the member has not proved it since. Absent from Relay versions without imports.
4354
4323
  */
4355
- imported: z39.boolean().optional(),
4324
+ imported: z38.boolean().optional(),
4356
4325
  /**
4357
4326
  * The app login that vouched for the wallet at sign-in, while `imported` is true and no member
4358
4327
  * import attached it. Absent from Relay versions without it.
@@ -4366,11 +4335,11 @@ var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
4366
4335
  *
4367
4336
  * @experimental A minor release can change `.sol` names.
4368
4337
  */
4369
- name: z39.string().optional(),
4370
- status: z39.enum(["linked", "unlinked"]),
4371
- unlinkedAt: z39.number().int().nullable(),
4338
+ name: z38.string().optional(),
4339
+ status: z38.enum(["linked", "unlinked"]),
4340
+ unlinkedAt: z38.number().int().nullable(),
4372
4341
  /** "member", or the operator or key that unlinked it. */
4373
- unlinkedBy: z39.string().nullable()
4342
+ unlinkedBy: z38.string().nullable()
4374
4343
  }))();
4375
4344
  var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
4376
4345
  chain: true,
@@ -4380,67 +4349,67 @@ var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
4380
4349
  wallets: true,
4381
4350
  observedAt: true
4382
4351
  }).extend({ attempt: identifier }))();
4383
- var walletBalanceChainsSchema = /* @__PURE__ */ (() => z39.object({
4384
- chains: z39.array(
4385
- z39.object({
4386
- chain: z39.union([
4387
- z39.literal(solanaMainnet),
4388
- z39.literal(solanaDevnet),
4352
+ var walletBalanceChainsSchema = /* @__PURE__ */ (() => z38.object({
4353
+ chains: z38.array(
4354
+ z38.object({
4355
+ chain: z38.union([
4356
+ z38.literal(solanaMainnet),
4357
+ z38.literal(solanaDevnet),
4389
4358
  cosmosNetworkSchema,
4390
4359
  evmChainIdSchema
4391
4360
  ]),
4392
- name: z39.string(),
4393
- testnet: z39.boolean()
4361
+ name: z38.string(),
4362
+ testnet: z38.boolean()
4394
4363
  })
4395
4364
  )
4396
4365
  }))();
4397
- var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason: z39.string().trim().min(1).max(500) }).strict())();
4366
+ var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason: z38.string().trim().min(1).max(500) }).strict())();
4398
4367
  var memberWalletSignInInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({
4399
- enabled: z39.boolean(),
4400
- reason: z39.string().trim().min(1).max(500)
4368
+ enabled: z38.boolean(),
4369
+ reason: z38.string().trim().min(1).max(500)
4401
4370
  }).strict())();
4402
4371
 
4403
4372
  // src/server/members.ts
4404
- import * as z40 from "zod";
4405
- var memberSchema = /* @__PURE__ */ (() => z40.object({
4406
- id: z40.string(),
4407
- test: z40.boolean().optional(),
4408
- name: z40.string().nullable().optional(),
4409
- accounts: z40.array(memberAccountSchema).default([]),
4373
+ import * as z39 from "zod";
4374
+ var memberSchema = /* @__PURE__ */ (() => z39.object({
4375
+ id: z39.string(),
4376
+ test: z39.boolean().optional(),
4377
+ name: z39.string().nullable().optional(),
4378
+ accounts: z39.array(memberAccountSchema).default([]),
4410
4379
  /** The member's linked app identities, by kind. Absent from Relay versions without it. */
4411
- appIdentities: z40.array(memberAppIdentitySchema).optional(),
4412
- attempts: z40.number(),
4413
- completions: z40.number(),
4414
- rewards: z40.number(),
4415
- lastActivity: z40.number().nullable(),
4380
+ appIdentities: z39.array(memberAppIdentitySchema).optional(),
4381
+ attempts: z39.number(),
4382
+ completions: z39.number(),
4383
+ rewards: z39.number(),
4384
+ lastActivity: z39.number().nullable(),
4416
4385
  /**
4417
4386
  * When the customer erased the member (`members.erase`), in Unix milliseconds: it keeps its ID
4418
4387
  * and accounting, with no profile, accounts or identities. Absent on a member that was not erased.
4419
4388
  */
4420
- erasedAt: z40.number().optional(),
4389
+ erasedAt: z39.number().optional(),
4421
4390
  /**
4422
4391
  * When an operator banned the member (`members.ban`), in Unix milliseconds. Absent on a member
4423
4392
  * who is not banned now.
4424
4393
  *
4425
4394
  * @experimental A minor release can change member bans.
4426
4395
  */
4427
- bannedAt: z40.number().optional()
4396
+ bannedAt: z39.number().optional()
4428
4397
  }))();
4429
- var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() => z40.object({
4430
- provider: z40.enum(["x", "discord"]),
4431
- revision: z40.number().int().nonnegative()
4398
+ var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() => z39.object({
4399
+ provider: z39.enum(["x", "discord"]),
4400
+ revision: z39.number().int().nonnegative()
4432
4401
  }))();
4433
- var managedOAuthAccountSchema = /* @__PURE__ */ (() => z40.discriminatedUnion("status", [
4402
+ var managedOAuthAccountSchema = /* @__PURE__ */ (() => z39.discriminatedUnion("status", [
4434
4403
  managedOAuthAccountBaseSchema.extend({
4435
- status: z40.literal("connected"),
4436
- subject: z40.string().min(1),
4437
- linkedAt: z40.number(),
4404
+ status: z39.literal("connected"),
4405
+ subject: z39.string().min(1),
4406
+ linkedAt: z39.number(),
4438
4407
  /**
4439
4408
  * True when the organization vouched for the account, not the member's proof: a member import
4440
4409
  * attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
4441
4410
  * versions without imports.
4442
4411
  */
4443
- imported: z40.boolean().optional(),
4412
+ imported: z39.boolean().optional(),
4444
4413
  /**
4445
4414
  * The app login that vouched for the account at sign-in, for an account with `imported` set
4446
4415
  * that no member import attached. Absent from Relay versions without it.
@@ -4450,26 +4419,26 @@ var managedOAuthAccountSchema = /* @__PURE__ */ (() => z40.discriminatedUnion("s
4450
4419
  * True for a real account an operator linked to a test member without OAuth
4451
4420
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
4452
4421
  */
4453
- testLinked: z40.boolean().optional(),
4422
+ testLinked: z39.boolean().optional(),
4454
4423
  ...identitySourceFields
4455
4424
  }),
4456
- managedOAuthAccountBaseSchema.extend({ status: z40.literal("disconnected") })
4425
+ managedOAuthAccountBaseSchema.extend({ status: z39.literal("disconnected") })
4457
4426
  ]))();
4458
4427
  var managedTelegramAccountBaseSchema = /* @__PURE__ */ (() => managedOAuthAccountBaseSchema.extend({
4459
- provider: z40.literal("telegram")
4428
+ provider: z39.literal("telegram")
4460
4429
  }))();
4461
- var managedTelegramAccountSchema = /* @__PURE__ */ (() => z40.discriminatedUnion("status", [
4430
+ var managedTelegramAccountSchema = /* @__PURE__ */ (() => z39.discriminatedUnion("status", [
4462
4431
  managedTelegramAccountBaseSchema.extend({
4463
- status: z40.literal("connected"),
4432
+ status: z39.literal("connected"),
4464
4433
  /** The numeric Telegram user ID. */
4465
- subject: z40.string().min(1),
4466
- linkedAt: z40.number(),
4434
+ subject: z39.string().min(1),
4435
+ linkedAt: z39.number(),
4467
4436
  /**
4468
4437
  * True when the organization vouched for the account, not the member's proof: a member import
4469
4438
  * attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
4470
4439
  * versions without it.
4471
4440
  */
4472
- imported: z40.boolean().optional(),
4441
+ imported: z39.boolean().optional(),
4473
4442
  /**
4474
4443
  * The app login that vouched for the account at sign-in, for an account with `imported` set
4475
4444
  * that no member import attached. Absent from Relay versions without it.
@@ -4478,14 +4447,14 @@ var managedTelegramAccountSchema = /* @__PURE__ */ (() => z40.discriminatedUnion
4478
4447
  ...identitySourceFields
4479
4448
  }),
4480
4449
  managedTelegramAccountBaseSchema.extend({
4481
- status: z40.literal("disconnected")
4450
+ status: z39.literal("disconnected")
4482
4451
  })
4483
4452
  ]))();
4484
- var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() => z40.object({
4485
- provider: z40.enum(["x", "discord"]),
4486
- subject: z40.string().min(1).max(4096),
4487
- revision: z40.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
4488
- reason: z40.string().trim().min(1).max(500)
4453
+ var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() => z39.object({
4454
+ provider: z39.enum(["x", "discord"]),
4455
+ subject: z39.string().min(1).max(4096),
4456
+ revision: z39.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
4457
+ reason: z39.string().trim().min(1).max(500)
4489
4458
  }).strict())();
4490
4459
  var memberTelegramUnlinkInputSchema = /* @__PURE__ */ (() => memberOAuthUnlinkInputSchema.omit({ provider: true }).strict())();
4491
4460
  var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.extend({
@@ -4494,7 +4463,7 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
4494
4463
  * login's server at sign-in), until the member links that provider's account, or signs in with
4495
4464
  * the X account, through Domino. Absent from Relay versions without imports.
4496
4465
  */
4497
- imported: z40.boolean().optional(),
4466
+ imported: z39.boolean().optional(),
4498
4467
  /**
4499
4468
  * The app login that vouched for the account at sign-in, for an `imported` account no member
4500
4469
  * import attached. Absent from Relay versions without it.
@@ -4504,40 +4473,40 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
4504
4473
  * True for a real X or Discord account an operator linked to a test member without OAuth
4505
4474
  * (`testMembers.linkAccount`). Absent from Relay versions without it.
4506
4475
  */
4507
- testLinked: z40.boolean().optional(),
4476
+ testLinked: z39.boolean().optional(),
4508
4477
  ...identitySourceFields,
4509
- status: z40.enum(["linked", "unlinked"]),
4510
- unlinkedAt: z40.number().int().nullable(),
4478
+ status: z39.enum(["linked", "unlinked"]),
4479
+ unlinkedAt: z39.number().int().nullable(),
4511
4480
  /** The operator or key that unlinked it. */
4512
- unlinkedBy: z40.string().nullable()
4481
+ unlinkedBy: z39.string().nullable()
4513
4482
  }))();
4514
- var memberIdentityChangeInputSchema = /* @__PURE__ */ (() => z40.object({
4483
+ var memberIdentityChangeInputSchema = /* @__PURE__ */ (() => z39.object({
4515
4484
  kind: appIdentityKindSchema,
4516
- subject: z40.string().min(1).max(256),
4517
- reason: z40.string().trim().min(1).max(500)
4485
+ subject: z39.string().min(1).max(256),
4486
+ reason: z39.string().trim().min(1).max(500)
4518
4487
  }).strict())();
4519
- var memberDetailSchema = /* @__PURE__ */ (() => z40.object({
4488
+ var memberDetailSchema = /* @__PURE__ */ (() => z39.object({
4520
4489
  snapshot: snapshotSchema,
4521
4490
  member: memberSchema,
4522
4491
  progress: memberProgressSchema,
4523
4492
  /** Up to 25 revoked completions with an unreversed point remainder, newest first. */
4524
- revocationShortfalls: z40.array(completionRevocationShortfallSchema).default([]),
4493
+ revocationShortfalls: z39.array(completionRevocationShortfallSchema).default([]),
4525
4494
  /** Up to 25 revoked completions, newest first. Relay older than restore leaves it out. */
4526
- revokedCompletions: z40.array(revokedCompletionSchema).optional(),
4495
+ revokedCompletions: z39.array(revokedCompletionSchema).optional(),
4527
4496
  /** Current and historical campaign enrollment state, including inactive enrollments. */
4528
- campaignEnrollments: z40.array(campaignEnrollmentSchema).default([]),
4529
- passes: z40.array(
4530
- z40.object({
4531
- provider: z40.string(),
4532
- event: z40.string(),
4533
- subject: z40.string(),
4497
+ campaignEnrollments: z39.array(campaignEnrollmentSchema).default([]),
4498
+ passes: z39.array(
4499
+ z39.object({
4500
+ provider: z39.string(),
4501
+ event: z39.string(),
4502
+ subject: z39.string(),
4534
4503
  attempt: identifier.nullable()
4535
4504
  })
4536
4505
  ).default([]),
4537
4506
  /** Linked and unlinked wallets. */
4538
- wallets: z40.array(managedWalletSchema),
4507
+ wallets: z39.array(managedWalletSchema),
4539
4508
  /** The member's 10 most recent recorded balance reads, newest first. */
4540
- balanceChecks: z40.array(balanceCheckSchema),
4509
+ balanceChecks: z39.array(balanceCheckSchema),
4541
4510
  /** The member's participant profile in this project. */
4542
4511
  profile: managedProfileSchema.nullable(),
4543
4512
  /**
@@ -4545,20 +4514,20 @@ var memberDetailSchema = /* @__PURE__ */ (() => z40.object({
4545
4514
  * member ID: their selected X and Discord accounts and their `app:<name>` identities in this
4546
4515
  * project, including app identities an operator unlinked, by kind.
4547
4516
  */
4548
- identities: z40.array(managedMemberIdentitySchema),
4517
+ identities: z39.array(managedMemberIdentitySchema),
4549
4518
  /**
4550
4519
  * The creator accounts the member linked (a YouTube channel), whose content managed tracker
4551
4520
  * sources attribute to them. Absent from Relay versions without creator accounts.
4552
4521
  */
4553
- creatorAccounts: z40.array(managedCreatorAccountSchema).optional(),
4522
+ creatorAccounts: z39.array(managedCreatorAccountSchema).optional(),
4554
4523
  /**
4555
4524
  * Who invited the member, when they accepted, and the member import that recorded it, or null
4556
4525
  * when nobody invited them. Absent from Relay versions before imported referrals.
4557
4526
  */
4558
- referral: z40.object({
4527
+ referral: z39.object({
4559
4528
  inviter: identifier,
4560
- acceptedAt: z40.number().int().nonnegative(),
4561
- suspended: z40.boolean(),
4529
+ acceptedAt: z39.number().int().nonnegative(),
4530
+ suspended: z39.boolean(),
4562
4531
  import: identifier.nullable()
4563
4532
  }).nullable().optional(),
4564
4533
  /**
@@ -4569,9 +4538,9 @@ var memberDetailSchema = /* @__PURE__ */ (() => z40.object({
4569
4538
  */
4570
4539
  ban: memberBanSchema.nullable().optional()
4571
4540
  }))();
4572
- var managedMemberProgressSchema = /* @__PURE__ */ (() => z40.object({
4541
+ var managedMemberProgressSchema = /* @__PURE__ */ (() => z39.object({
4573
4542
  member: identifier,
4574
- quests: z40.array(
4543
+ quests: z39.array(
4575
4544
  memberProgressSchema.shape.quests.element.extend({
4576
4545
  /** The streak as `members.get` reports it, without the list of qualifying days. */
4577
4546
  streak: streakProgressSchema.omit({ days: true }).nullable().optional()
@@ -4582,10 +4551,10 @@ var managedMemberProgressSchema = /* @__PURE__ */ (() => z40.object({
4582
4551
  /** Each point balance the member has, by balance ID. */
4583
4552
  balances: snapshotSchema.shape.balances
4584
4553
  }))();
4585
- var memberLookupSchema = /* @__PURE__ */ (() => z40.union([
4586
- z40.object({
4587
- provider: z40.string().min(1).max(200),
4588
- subject: z40.string().min(1).max(2048)
4554
+ var memberLookupSchema = /* @__PURE__ */ (() => z39.union([
4555
+ z39.object({
4556
+ provider: z39.string().min(1).max(200),
4557
+ subject: z39.string().min(1).max(2048)
4589
4558
  }).strict(),
4590
4559
  identityReferenceSchema.transform(
4591
4560
  (reference) => reference.kind === "wallet" ? { provider: reference.chain, subject: reference.address } : { provider: reference.kind, subject: reference.subject }
@@ -4596,20 +4565,20 @@ var memberLookupSchema = /* @__PURE__ */ (() => z40.union([
4596
4565
  subject: address
4597
4566
  }))
4598
4567
  ]))();
4599
- var managedMemberQuerySchema = /* @__PURE__ */ (() => z40.strictObject({
4600
- q: z40.string().max(200).optional(),
4568
+ var managedMemberQuerySchema = /* @__PURE__ */ (() => z39.strictObject({
4569
+ q: z39.string().max(200).optional(),
4601
4570
  needsReview: booleanQuery.optional(),
4602
- limit: z40.coerce.number().int().min(1).max(100).optional(),
4571
+ limit: z39.coerce.number().int().min(1).max(100).optional(),
4603
4572
  cursor: pageCursorSchema.optional()
4604
4573
  }))();
4605
- var managedMemberPageSchema = /* @__PURE__ */ (() => z40.object({
4606
- items: z40.array(memberSchema),
4607
- total: z40.number().int().nonnegative(),
4608
- nextCursor: z40.string().nullable()
4574
+ var managedMemberPageSchema = /* @__PURE__ */ (() => z39.object({
4575
+ items: z39.array(memberSchema),
4576
+ total: z39.number().int().nonnegative(),
4577
+ nextCursor: z39.string().nullable()
4609
4578
  }))();
4610
4579
 
4611
4580
  // src/server/endpoints/members.ts
4612
- import * as z41 from "zod";
4581
+ import * as z40 from "zod";
4613
4582
  var member = { member: ID_PATTERN };
4614
4583
  var anyMember = { member: SEGMENT_PATTERN };
4615
4584
  var memberEndpoints = /* @__PURE__ */ (() => ({
@@ -4636,7 +4605,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4636
4605
  parameters: {},
4637
4606
  permission: "read",
4638
4607
  ledger: null,
4639
- result: () => z41.array(personSchema)
4608
+ result: () => z40.array(personSchema)
4640
4609
  }),
4641
4610
  get: managementEndpoint({
4642
4611
  method: "GET",
@@ -4708,7 +4677,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4708
4677
  parameters: member,
4709
4678
  permission: "read",
4710
4679
  ledger: null,
4711
- result: () => z41.array(managedOAuthAccountSchema)
4680
+ result: () => z40.array(managedOAuthAccountSchema)
4712
4681
  }),
4713
4682
  unlinkOAuthAccount: managementEndpoint({
4714
4683
  method: "POST",
@@ -4716,7 +4685,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4716
4685
  parameters: member,
4717
4686
  permission: "review",
4718
4687
  ledger: null,
4719
- result: () => z41.array(managedOAuthAccountSchema)
4688
+ result: () => z40.array(managedOAuthAccountSchema)
4720
4689
  }),
4721
4690
  telegramAccount: managementEndpoint({
4722
4691
  method: "GET",
@@ -4772,7 +4741,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4772
4741
  parameters: member,
4773
4742
  permission: "review",
4774
4743
  ledger: null,
4775
- result: () => z41.array(managedWalletSchema)
4744
+ result: () => z40.array(managedWalletSchema)
4776
4745
  }),
4777
4746
  setWalletSignIn: managementEndpoint({
4778
4747
  method: "POST",
@@ -4780,7 +4749,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4780
4749
  parameters: member,
4781
4750
  permission: "review",
4782
4751
  ledger: null,
4783
- result: () => z41.array(managedWalletSchema)
4752
+ result: () => z40.array(managedWalletSchema)
4784
4753
  }),
4785
4754
  unlinkIdentity: managementEndpoint({
4786
4755
  method: "POST",
@@ -4788,7 +4757,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4788
4757
  parameters: member,
4789
4758
  permission: "review",
4790
4759
  ledger: null,
4791
- result: () => z41.array(managedMemberIdentitySchema)
4760
+ result: () => z40.array(managedMemberIdentitySchema)
4792
4761
  }),
4793
4762
  relinkIdentity: managementEndpoint({
4794
4763
  method: "POST",
@@ -4796,7 +4765,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4796
4765
  parameters: member,
4797
4766
  permission: "review",
4798
4767
  ledger: null,
4799
- result: () => z41.array(managedMemberIdentitySchema)
4768
+ result: () => z40.array(managedMemberIdentitySchema)
4800
4769
  }),
4801
4770
  // A rollback that reverses referral payouts or point awards takes publish too, which the
4802
4771
  // route checks after reading the body.
@@ -4871,7 +4840,7 @@ var memberEndpoints = /* @__PURE__ */ (() => ({
4871
4840
  }))();
4872
4841
 
4873
4842
  // src/server/endpoints/offers.ts
4874
- import * as z42 from "zod";
4843
+ import * as z41 from "zod";
4875
4844
  var offer = { offer: ID_PATTERN };
4876
4845
  var reward = { reward: ID_PATTERN };
4877
4846
  var offerEndpoints = /* @__PURE__ */ (() => ({
@@ -4881,7 +4850,7 @@ var offerEndpoints = /* @__PURE__ */ (() => ({
4881
4850
  parameters: {},
4882
4851
  permission: "read",
4883
4852
  ledger: "offers.listManaged",
4884
- result: () => z42.array(offerSchema)
4853
+ result: () => z41.array(offerSchema)
4885
4854
  }),
4886
4855
  pause: managementEndpoint({
4887
4856
  method: "POST",
@@ -4930,7 +4899,7 @@ var offerEndpoints = /* @__PURE__ */ (() => ({
4930
4899
  parameters: {},
4931
4900
  permission: "read",
4932
4901
  ledger: "redemptions.list",
4933
- result: () => z42.array(redemptionSchema)
4902
+ result: () => z41.array(redemptionSchema)
4934
4903
  }),
4935
4904
  redemptionHistory: managementEndpoint({
4936
4905
  method: "GET",
@@ -4969,28 +4938,28 @@ var tieredRewardEndpoints = /* @__PURE__ */ (() => ({
4969
4938
  }))();
4970
4939
 
4971
4940
  // src/server/operations.ts
4972
- import * as z43 from "zod";
4973
- var operationSchema = /* @__PURE__ */ (() => z43.object({
4974
- target: z43.string(),
4975
- paused: z43.boolean(),
4976
- revision: z43.number().int(),
4977
- reason: z43.string(),
4978
- actor: z43.string().nullable(),
4979
- changedAt: z43.number()
4980
- }))();
4981
- var operationInputSchema = /* @__PURE__ */ (() => z43.object({
4982
- target: z43.union([
4983
- z43.literal("redemptions"),
4984
- z43.string().regex(/^quest:[\w-]+$/)
4941
+ import * as z42 from "zod";
4942
+ var operationSchema = /* @__PURE__ */ (() => z42.object({
4943
+ target: z42.string(),
4944
+ paused: z42.boolean(),
4945
+ revision: z42.number().int(),
4946
+ reason: z42.string(),
4947
+ actor: z42.string().nullable(),
4948
+ changedAt: z42.number()
4949
+ }))();
4950
+ var operationInputSchema = /* @__PURE__ */ (() => z42.object({
4951
+ target: z42.union([
4952
+ z42.literal("redemptions"),
4953
+ z42.string().regex(/^quest:[\w-]+$/)
4985
4954
  ]),
4986
- paused: z43.boolean(),
4987
- revision: z43.number().int().nonnegative(),
4988
- reason: z43.string().trim().min(1).max(500),
4955
+ paused: z42.boolean(),
4956
+ revision: z42.number().int().nonnegative(),
4957
+ reason: z42.string().trim().min(1).max(500),
4989
4958
  actionId: identifier
4990
4959
  }).strict())();
4991
4960
 
4992
4961
  // src/server/endpoints/operations.ts
4993
- import * as z44 from "zod";
4962
+ import * as z43 from "zod";
4994
4963
  var operationEndpoints = /* @__PURE__ */ (() => ({
4995
4964
  list: managementEndpoint({
4996
4965
  method: "GET",
@@ -4998,7 +4967,7 @@ var operationEndpoints = /* @__PURE__ */ (() => ({
4998
4967
  parameters: {},
4999
4968
  permission: "read",
5000
4969
  ledger: "operations.list",
5001
- result: () => z44.array(operationSchema)
4970
+ result: () => z43.array(operationSchema)
5002
4971
  }),
5003
4972
  configure: managementEndpoint({
5004
4973
  method: "POST",
@@ -5027,25 +4996,25 @@ var operationEndpoints = /* @__PURE__ */ (() => ({
5027
4996
  }))();
5028
4997
 
5029
4998
  // src/server/page.ts
5030
- import * as z45 from "zod";
5031
- var querySchema = /* @__PURE__ */ (() => z45.object({
5032
- q: z45.string().max(200).default(""),
5033
- filter: z45.string().max(50).default("all"),
5034
- offset: z45.coerce.number().int().min(0).max(1e6).default(0),
5035
- limit: z45.coerce.number().int().min(1).max(100).default(25)
4999
+ import * as z44 from "zod";
5000
+ var querySchema = /* @__PURE__ */ (() => z44.object({
5001
+ q: z44.string().max(200).default(""),
5002
+ filter: z44.string().max(50).default("all"),
5003
+ offset: z44.coerce.number().int().min(0).max(1e6).default(0),
5004
+ limit: z44.coerce.number().int().min(1).max(100).default(25)
5036
5005
  }))();
5037
- var pageSchema = /* @__PURE__ */ (() => z45.object({
5006
+ var pageSchema = /* @__PURE__ */ (() => z44.object({
5038
5007
  snapshot: snapshotSchema,
5039
- members: z45.array(memberSchema),
5040
- people: z45.array(personSchema).default([]),
5008
+ members: z44.array(memberSchema),
5009
+ people: z44.array(personSchema).default([]),
5041
5010
  metrics: metricsSchema,
5042
- total: z45.number(),
5043
- offset: z45.number(),
5044
- limit: z45.number(),
5045
- inventory: z45.array(inventorySchema),
5046
- operations: z45.array(operationSchema).default([]),
5047
- audit: z45.array(auditRecordSchema).default([]),
5048
- questCounts: z45.record(z45.string(), z45.number())
5011
+ total: z44.number(),
5012
+ offset: z44.number(),
5013
+ limit: z44.number(),
5014
+ inventory: z44.array(inventorySchema),
5015
+ operations: z44.array(operationSchema).default([]),
5016
+ audit: z44.array(auditRecordSchema).default([]),
5017
+ questCounts: z44.record(z44.string(), z44.number())
5049
5018
  }))();
5050
5019
 
5051
5020
  // src/server/endpoints/pages.ts
@@ -5117,21 +5086,21 @@ var pageEndpoints = /* @__PURE__ */ (() => ({
5117
5086
  }))();
5118
5087
 
5119
5088
  // src/server/participant-sign-in.ts
5120
- import * as z46 from "zod";
5121
- var telegramBotIdSchema = /* @__PURE__ */ (() => z46.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789"))();
5122
- var participantSignInTelegramSchema = /* @__PURE__ */ (() => z46.object({
5123
- login: z46.boolean(),
5089
+ import * as z45 from "zod";
5090
+ var telegramBotIdSchema = /* @__PURE__ */ (() => z45.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789"))();
5091
+ var participantSignInTelegramSchema = /* @__PURE__ */ (() => z45.object({
5092
+ login: z45.boolean(),
5124
5093
  miniAppBotId: telegramBotIdSchema.nullable()
5125
5094
  }))();
5126
- var participantSignInSchema = /* @__PURE__ */ (() => z46.object({
5127
- providers: z46.array(
5128
- z46.object({ provider: authProviderSchema, configured: z46.boolean() })
5095
+ var participantSignInSchema = /* @__PURE__ */ (() => z45.object({
5096
+ providers: z45.array(
5097
+ z45.object({ provider: authProviderSchema, configured: z45.boolean() })
5129
5098
  ),
5130
- email: z46.boolean(),
5099
+ email: z45.boolean(),
5131
5100
  /** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
5132
5101
  wallets: walletSignInNetworksSchema,
5133
5102
  /** Why participants cannot sign in to this project, or null. */
5134
- issue: z46.string().nullable(),
5103
+ issue: z45.string().nullable(),
5135
5104
  /**
5136
5105
  * Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
5137
5106
  * bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
@@ -5143,10 +5112,10 @@ var participantSignInSchema = /* @__PURE__ */ (() => z46.object({
5143
5112
  * members can link accounts that trackers like `youtube.shorts()` read. Absent from older Relay
5144
5113
  * versions.
5145
5114
  */
5146
- creatorAccounts: z46.array(
5147
- z46.object({
5115
+ creatorAccounts: z45.array(
5116
+ z45.object({
5148
5117
  provider: creatorAccountProviderSchema,
5149
- configured: z46.boolean()
5118
+ configured: z45.boolean()
5150
5119
  })
5151
5120
  ).optional(),
5152
5121
  /**
@@ -5154,13 +5123,13 @@ var participantSignInSchema = /* @__PURE__ */ (() => z46.object({
5154
5123
  * the open sibling of `providers`, which SDK 1.x keeps to `AuthProvider`. A newer Relay may list
5155
5124
  * providers this SDK does not know. Absent from older Relay versions.
5156
5125
  */
5157
- signInProviders: z46.array(signInProviderOptionSchema).optional(),
5158
- updatedAt: z46.number().nullable(),
5159
- updatedBy: z46.string().nullable()
5126
+ signInProviders: z45.array(signInProviderOptionSchema).optional(),
5127
+ updatedAt: z45.number().nullable(),
5128
+ updatedBy: z45.string().nullable()
5160
5129
  }))();
5161
- var participantSignInInputSchema = /* @__PURE__ */ (() => z46.object({
5130
+ var participantSignInInputSchema = /* @__PURE__ */ (() => z45.object({
5162
5131
  wallets: walletSignInNetworksSchema,
5163
- telegram: z46.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
5132
+ telegram: z45.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
5164
5133
  }).strict())();
5165
5134
 
5166
5135
  // src/server/endpoints/participants.ts
@@ -5192,7 +5161,7 @@ var participantEndpoints = /* @__PURE__ */ (() => ({
5192
5161
  }))();
5193
5162
 
5194
5163
  // src/server/endpoints/points.ts
5195
- import * as z47 from "zod";
5164
+ import * as z46 from "zod";
5196
5165
  var account2 = { member: ID_PATTERN, ledger: ID_PATTERN };
5197
5166
  var pointEndpoints = /* @__PURE__ */ (() => ({
5198
5167
  balance: managementEndpoint({
@@ -5228,7 +5197,7 @@ var pointLedgerEndpoints = /* @__PURE__ */ (() => ({
5228
5197
  parameters: {},
5229
5198
  permission: "read",
5230
5199
  ledger: "pointLedgers.list",
5231
- result: () => z47.array(managedPointLedgerSchema)
5200
+ result: () => z46.array(managedPointLedgerSchema)
5232
5201
  }),
5233
5202
  // Answers 201.
5234
5203
  create: managementEndpoint({
@@ -5305,31 +5274,31 @@ var profileEndpoints = /* @__PURE__ */ (() => ({
5305
5274
  }))();
5306
5275
 
5307
5276
  // src/server/projects.ts
5308
- import * as z48 from "zod";
5309
- var projectSetupSchema = /* @__PURE__ */ (() => z48.object({
5310
- mode: z48.enum(["new", "existing"]),
5311
- brief: z48.string().trim().min(1).max(4e3)
5277
+ import * as z47 from "zod";
5278
+ var projectSetupSchema = /* @__PURE__ */ (() => z47.object({
5279
+ mode: z47.enum(["new", "existing"]),
5280
+ brief: z47.string().trim().min(1).max(4e3)
5312
5281
  }).strict())();
5313
- var projectSchema = /* @__PURE__ */ (() => z48.object({
5282
+ var projectSchema = /* @__PURE__ */ (() => z47.object({
5314
5283
  /**
5315
5284
  * Names the project's hosted addresses. The server gives a new project, and accepts in a
5316
5285
  * slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
5317
5286
  * checks only the format, so it parses every slug that exists.
5318
5287
  */
5319
- slug: z48.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
5320
- createdBy: z48.string().nullable().optional(),
5288
+ slug: z47.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
5289
+ createdBy: z47.string().nullable().optional(),
5321
5290
  creator: operatorUserSchema.nullable().optional(),
5322
5291
  /** A response, so fields a newer server adds to the setup are dropped, not rejected. */
5323
- setup: z48.object(projectSetupSchema.shape).optional(),
5292
+ setup: z47.object(projectSetupSchema.shape).optional(),
5324
5293
  /** The starter chosen at setup. A plain string, so later starters still parse. */
5325
- starter: z48.string().optional(),
5326
- id: z48.string().min(1),
5294
+ starter: z47.string().optional(),
5295
+ id: z47.string().min(1),
5327
5296
  organization: identifier,
5328
5297
  project: identifier,
5329
- name: z48.string(),
5330
- subtitle: z48.string(),
5331
- initials: z48.string(),
5332
- color: z48.string(),
5298
+ name: z47.string(),
5299
+ subtitle: z47.string(),
5300
+ initials: z47.string(),
5301
+ color: z47.string(),
5333
5302
  permissions: permissionListSchema,
5334
5303
  /**
5335
5304
  * Every permission the caller holds here, `dashboards` included, which `permissions` leaves
@@ -5337,8 +5306,8 @@ var projectSchema = /* @__PURE__ */ (() => z48.object({
5337
5306
  *
5338
5307
  * @experimental
5339
5308
  */
5340
- projectPermissions: z48.array(z48.string()).optional(),
5341
- environments: z48.array(environmentSchema)
5309
+ projectPermissions: z47.array(z47.string()).optional(),
5310
+ environments: z47.array(environmentSchema)
5342
5311
  }).refine(
5343
5312
  (project) => !project.creator || project.creator.id === project.createdBy,
5344
5313
  {
@@ -5346,69 +5315,69 @@ var projectSchema = /* @__PURE__ */ (() => z48.object({
5346
5315
  path: ["creator"]
5347
5316
  }
5348
5317
  ))();
5349
- var projectCreateInputSchema = /* @__PURE__ */ (() => z48.object({
5318
+ var projectCreateInputSchema = /* @__PURE__ */ (() => z47.object({
5350
5319
  actionId: identifier,
5351
- name: z48.string().trim().min(1).max(80),
5320
+ name: z47.string().trim().min(1).max(80),
5352
5321
  setup: projectSetupSchema.optional(),
5353
5322
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
5354
5323
  starter: offeredStarterSchema.optional()
5355
5324
  }).strict())();
5356
- var projectInputSchema = /* @__PURE__ */ (() => z48.object({
5325
+ var projectInputSchema = /* @__PURE__ */ (() => z47.object({
5357
5326
  actionId: identifier,
5358
- name: z48.string().trim().min(1).max(80),
5327
+ name: z47.string().trim().min(1).max(80),
5359
5328
  setup: projectSetupSchema.optional(),
5360
5329
  /** The starter a new hosted app begins from, with `setup.mode` "new". */
5361
5330
  starter: starterIdSchema.optional()
5362
5331
  }).strict())();
5363
- var projectUpdateInputSchema = /* @__PURE__ */ (() => z48.union([
5364
- z48.object({ name: projectCreateInputSchema.shape.name }).strict(),
5365
- z48.object({
5332
+ var projectUpdateInputSchema = /* @__PURE__ */ (() => z47.union([
5333
+ z47.object({ name: projectCreateInputSchema.shape.name }).strict(),
5334
+ z47.object({
5366
5335
  slug: projectSchema.shape.slug,
5367
- confirm: z48.string().min(1).max(80)
5336
+ confirm: z47.string().min(1).max(80)
5368
5337
  }).strict()
5369
5338
  ]))();
5370
- var projectDeletionInputSchema = /* @__PURE__ */ (() => z48.object({ confirm: z48.string().min(1).max(80) }).strict())();
5371
- var projectDeletionSchema = /* @__PURE__ */ (() => z48.object({
5339
+ var projectDeletionInputSchema = /* @__PURE__ */ (() => z47.object({ confirm: z47.string().min(1).max(80) }).strict())();
5340
+ var projectDeletionSchema = /* @__PURE__ */ (() => z47.object({
5372
5341
  project: identifier,
5373
- purgeAfter: z48.number().int()
5342
+ purgeAfter: z47.number().int()
5374
5343
  }))();
5375
- var projectTransferInputSchema = /* @__PURE__ */ (() => z48.object({ organization: identifier, confirm: z48.string().min(1).max(80) }).strict())();
5376
- var projectTransferSchema = /* @__PURE__ */ (() => z48.object({
5344
+ var projectTransferInputSchema = /* @__PURE__ */ (() => z47.object({ organization: identifier, confirm: z47.string().min(1).max(80) }).strict())();
5345
+ var projectTransferSchema = /* @__PURE__ */ (() => z47.object({
5377
5346
  organization: identifier,
5378
5347
  project: identifier
5379
5348
  }))();
5380
- var accessSchema = /* @__PURE__ */ (() => z48.object({
5381
- actor: z48.string(),
5382
- organization: z48.string(),
5383
- admin: z48.boolean(),
5384
- local: z48.boolean(),
5385
- projects: z48.array(projectSchema),
5349
+ var accessSchema = /* @__PURE__ */ (() => z47.object({
5350
+ actor: z47.string(),
5351
+ organization: z47.string(),
5352
+ admin: z47.boolean(),
5353
+ local: z47.boolean(),
5354
+ projects: z47.array(projectSchema),
5386
5355
  /** When the caller's CLI sign-in (`domino login`) stops working, in epoch milliseconds; absent for every other credential. */
5387
- expiresAt: z48.number().optional(),
5356
+ expiresAt: z47.number().optional(),
5388
5357
  /** The credential's own kind and scope, when it is an organization automation key. */
5389
- credential: z48.object({
5390
- kind: z48.string(),
5391
- id: z48.string(),
5392
- name: z48.string(),
5358
+ credential: z47.object({
5359
+ kind: z47.string(),
5360
+ id: z47.string(),
5361
+ name: z47.string(),
5393
5362
  /** The projects it reaches; null for every project of the organization. */
5394
- projects: z48.array(z48.string()).nullable(),
5395
- createProjects: z48.boolean(),
5363
+ projects: z47.array(z47.string()).nullable(),
5364
+ createProjects: z47.boolean(),
5396
5365
  permissions: permissionListSchema
5397
5366
  }).optional()
5398
5367
  }))();
5399
- var readinessSchema = /* @__PURE__ */ (() => z48.object({
5400
- checks: z48.array(
5401
- z48.object({
5402
- id: z48.string(),
5403
- status: z48.enum(["ready", "blocked"]),
5404
- title: z48.string(),
5405
- detail: z48.string()
5368
+ var readinessSchema = /* @__PURE__ */ (() => z47.object({
5369
+ checks: z47.array(
5370
+ z47.object({
5371
+ id: z47.string(),
5372
+ status: z47.enum(["ready", "blocked"]),
5373
+ title: z47.string(),
5374
+ detail: z47.string()
5406
5375
  })
5407
5376
  )
5408
5377
  }))();
5409
5378
 
5410
5379
  // src/server/endpoints/projects.ts
5411
- import * as z49 from "zod";
5380
+ import * as z48 from "zod";
5412
5381
  var projectEndpoints = /* @__PURE__ */ (() => ({
5413
5382
  readiness: managementEndpoint({
5414
5383
  method: "GET",
@@ -5426,7 +5395,7 @@ var projectEndpoints = /* @__PURE__ */ (() => ({
5426
5395
  parameters: {},
5427
5396
  permission: { handler: "read" },
5428
5397
  ledger: null,
5429
- result: () => z49.unknown()
5398
+ result: () => z48.unknown()
5430
5399
  }),
5431
5400
  // Any caller the management gate admits: the answer is filtered to what the caller may see.
5432
5401
  access: managementEndpoint({
@@ -5475,8 +5444,8 @@ var projectEndpoints = /* @__PURE__ */ (() => ({
5475
5444
  }))();
5476
5445
 
5477
5446
  // src/server/promotions.ts
5478
- import * as z50 from "zod";
5479
- var promotionResourceKindSchema = /* @__PURE__ */ (() => z50.enum([
5447
+ import * as z49 from "zod";
5448
+ var promotionResourceKindSchema = /* @__PURE__ */ (() => z49.enum([
5480
5449
  "quest",
5481
5450
  "quest-type",
5482
5451
  "collection",
@@ -5495,71 +5464,71 @@ var promotionResourceKindSchema = /* @__PURE__ */ (() => z50.enum([
5495
5464
  "profile-settings",
5496
5465
  "app-build"
5497
5466
  ]))();
5498
- var promotionChangeSchema = /* @__PURE__ */ (() => z50.object({
5499
- kind: z50.union([promotionResourceKindSchema, z50.string()]),
5500
- key: z50.string(),
5501
- title: z50.string(),
5467
+ var promotionChangeSchema = /* @__PURE__ */ (() => z49.object({
5468
+ kind: z49.union([promotionResourceKindSchema, z49.string()]),
5469
+ key: z49.string(),
5470
+ title: z49.string(),
5502
5471
  /** `added`: new in live. `changed`: live's differs. `archived` and `unarchived` change only its lifecycle. */
5503
- change: z50.union([
5504
- z50.enum(["added", "changed", "archived", "unarchived"]),
5505
- z50.string()
5472
+ change: z49.union([
5473
+ z49.enum(["added", "changed", "archived", "unarchived"]),
5474
+ z49.string()
5506
5475
  ])
5507
5476
  }))();
5508
- var promotionWarningSchema = /* @__PURE__ */ (() => z50.object({
5509
- code: z50.string(),
5510
- message: z50.string(),
5511
- kind: z50.string().optional(),
5512
- key: z50.string().optional()
5477
+ var promotionWarningSchema = /* @__PURE__ */ (() => z49.object({
5478
+ code: z49.string(),
5479
+ message: z49.string(),
5480
+ kind: z49.string().optional(),
5481
+ key: z49.string().optional()
5513
5482
  }))();
5514
- var promotionBuildSchema = /* @__PURE__ */ (() => z50.object({
5483
+ var promotionBuildSchema = /* @__PURE__ */ (() => z49.object({
5515
5484
  repository: identifier,
5516
5485
  build: identifier
5517
5486
  }))();
5518
- var promotionSourceSchema = /* @__PURE__ */ (() => z50.discriminatedUnion("kind", [
5519
- z50.object({ kind: z50.literal("test") }),
5520
- z50.object({ kind: z50.literal("rollback"), promotion: identifier }),
5521
- z50.object({ kind: z50.literal("deployment"), deployment: identifier })
5487
+ var promotionSourceSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("kind", [
5488
+ z49.object({ kind: z49.literal("test") }),
5489
+ z49.object({ kind: z49.literal("rollback"), promotion: identifier }),
5490
+ z49.object({ kind: z49.literal("deployment"), deployment: identifier })
5522
5491
  ]))();
5523
5492
  var promotionMetadata = /* @__PURE__ */ (() => ({
5524
5493
  id: identifier,
5525
5494
  source: promotionSourceSchema,
5526
- changes: z50.array(promotionChangeSchema),
5527
- warnings: z50.array(promotionWarningSchema),
5495
+ changes: z49.array(promotionChangeSchema),
5496
+ warnings: z49.array(promotionWarningSchema),
5528
5497
  build: promotionBuildSchema.nullable(),
5529
- createdAt: z50.number().int().nonnegative(),
5530
- createdBy: z50.string().nullable()
5498
+ createdAt: z49.number().int().nonnegative(),
5499
+ createdBy: z49.string().nullable()
5531
5500
  }))();
5532
5501
  var decided = /* @__PURE__ */ (() => ({
5533
- decidedAt: z50.number().int().nonnegative(),
5534
- decidedBy: z50.string().nullable()
5502
+ decidedAt: z49.number().int().nonnegative(),
5503
+ decidedBy: z49.string().nullable()
5535
5504
  }))();
5536
- var promotionRecordSchema = /* @__PURE__ */ (() => z50.discriminatedUnion("status", [
5537
- z50.object({ ...promotionMetadata, status: z50.literal("pending") }),
5538
- z50.object({ ...promotionMetadata, ...decided, status: z50.literal("applied") }),
5539
- z50.object({
5505
+ var promotionRecordSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
5506
+ z49.object({ ...promotionMetadata, status: z49.literal("pending") }),
5507
+ z49.object({ ...promotionMetadata, ...decided, status: z49.literal("applied") }),
5508
+ z49.object({
5540
5509
  ...promotionMetadata,
5541
5510
  ...decided,
5542
- status: z50.literal("rejected"),
5543
- reason: z50.string()
5511
+ status: z49.literal("rejected"),
5512
+ reason: z49.string()
5544
5513
  }),
5545
- z50.object({
5514
+ z49.object({
5546
5515
  ...promotionMetadata,
5547
5516
  ...decided,
5548
- status: z50.literal("superseded")
5517
+ status: z49.literal("superseded")
5549
5518
  })
5550
5519
  ]))();
5551
- var promotionActionSchema = /* @__PURE__ */ (() => z50.object({ actionId: z50.string().uuid() }).strict())();
5552
- var promotionDecisionSchema = /* @__PURE__ */ (() => z50.object({ actionId: z50.string().uuid().optional() }).strict())();
5553
- var promotionRejectionSchema = /* @__PURE__ */ (() => z50.object({
5554
- reason: z50.string().trim().min(1).max(1e3),
5555
- actionId: z50.string().uuid().optional()
5520
+ var promotionActionSchema = /* @__PURE__ */ (() => z49.object({ actionId: z49.string().uuid() }).strict())();
5521
+ var promotionDecisionSchema = /* @__PURE__ */ (() => z49.object({ actionId: z49.string().uuid().optional() }).strict())();
5522
+ var promotionRejectionSchema = /* @__PURE__ */ (() => z49.object({
5523
+ reason: z49.string().trim().min(1).max(1e3),
5524
+ actionId: z49.string().uuid().optional()
5556
5525
  }).strict())();
5557
- var promotionHistoryQuerySchema = /* @__PURE__ */ (() => z50.strictObject({
5526
+ var promotionHistoryQuerySchema = /* @__PURE__ */ (() => z49.strictObject({
5558
5527
  cursor: pageCursorSchema.optional(),
5559
- limit: z50.coerce.number().int().min(1).max(100).optional()
5528
+ limit: z49.coerce.number().int().min(1).max(100).optional()
5560
5529
  }))();
5561
- var promotionHistoryPageSchema = /* @__PURE__ */ (() => z50.object({
5562
- items: z50.array(promotionRecordSchema),
5530
+ var promotionHistoryPageSchema = /* @__PURE__ */ (() => z49.object({
5531
+ items: z49.array(promotionRecordSchema),
5563
5532
  nextCursor: pageCursorSchema.nullable()
5564
5533
  }))();
5565
5534
 
@@ -5637,99 +5606,99 @@ var providerEndpoints = /* @__PURE__ */ (() => ({
5637
5606
  }))();
5638
5607
 
5639
5608
  // src/server/quest-enrollments.ts
5640
- import * as z51 from "zod";
5609
+ import * as z50 from "zod";
5641
5610
  var questEnrollmentStateSchema = /* @__PURE__ */ (() => questEnrollmentSchema.extend({
5642
- revision: z51.number().int().nonnegative(),
5643
- withdrawnAt: z51.number().int().safe().nonnegative().nullable(),
5644
- withdrawalReason: z51.string().nullable()
5611
+ revision: z50.number().int().nonnegative(),
5612
+ withdrawnAt: z50.number().int().safe().nonnegative().nullable(),
5613
+ withdrawalReason: z50.string().nullable()
5645
5614
  }))();
5646
5615
  var managedQuestEnrollmentSchema = /* @__PURE__ */ (() => questEnrollmentStateSchema.extend({
5647
- title: z51.string(),
5648
- key: z51.string().nullable()
5616
+ title: z50.string(),
5617
+ key: z50.string().nullable()
5649
5618
  }))();
5650
- var questEnrollmentWithdrawalInputSchema = /* @__PURE__ */ (() => z51.object({
5651
- actionId: z51.string().uuid().default(() => crypto.randomUUID()),
5652
- expectedRevision: z51.number().int().nonnegative(),
5653
- reason: z51.string().trim().min(1).max(500)
5619
+ var questEnrollmentWithdrawalInputSchema = /* @__PURE__ */ (() => z50.object({
5620
+ actionId: z50.string().uuid().default(() => crypto.randomUUID()),
5621
+ expectedRevision: z50.number().int().nonnegative(),
5622
+ reason: z50.string().trim().min(1).max(500)
5654
5623
  }).strict())();
5655
- var managedQuestEnrollmentPageSchema = /* @__PURE__ */ (() => z51.object({
5656
- items: z51.array(managedQuestEnrollmentSchema),
5624
+ var managedQuestEnrollmentPageSchema = /* @__PURE__ */ (() => z50.object({
5625
+ items: z50.array(managedQuestEnrollmentSchema),
5657
5626
  nextCursor: pageCursorSchema.nullable()
5658
5627
  }))();
5659
5628
 
5660
5629
  // src/server/quest-stations.ts
5661
- import * as z52 from "zod";
5630
+ import * as z51 from "zod";
5662
5631
  var stationOperationTarget = (quest2, station2) => `station:${quest2}:${station2}`;
5663
- var stationRevocationInputSchema = /* @__PURE__ */ (() => z52.object({
5664
- reason: z52.string().trim().min(1).max(500),
5632
+ var stationRevocationInputSchema = /* @__PURE__ */ (() => z51.object({
5633
+ reason: z51.string().trim().min(1).max(500),
5665
5634
  actionId: identifier
5666
5635
  }).strict())();
5667
- var stationRevocationSchema = /* @__PURE__ */ (() => z52.object({
5636
+ var stationRevocationSchema = /* @__PURE__ */ (() => z51.object({
5668
5637
  quest: identifier,
5669
- station: z52.string(),
5670
- revoked: z52.boolean(),
5671
- reason: z52.string().nullable(),
5672
- actor: z52.string().nullable(),
5638
+ station: z51.string(),
5639
+ revoked: z51.boolean(),
5640
+ reason: z51.string().nullable(),
5641
+ actor: z51.string().nullable(),
5673
5642
  /** When it was last revoked or restored, epoch milliseconds. */
5674
- changedAt: z52.number().nullable(),
5675
- changed: z52.boolean()
5676
- }))();
5677
- var questStationStateSchema = /* @__PURE__ */ (() => z52.object({
5678
- key: z52.string(),
5679
- label: z52.string(),
5680
- opensAt: z52.number().optional(),
5681
- closesAt: z52.number().optional(),
5682
- proof: z52.string().optional(),
5683
- codeSet: z52.boolean().optional(),
5684
- status: z52.string(),
5685
- revocation: z52.object({
5686
- revoked: z52.boolean(),
5687
- reason: z52.string(),
5688
- actor: z52.string().nullable(),
5689
- changedAt: z52.number()
5643
+ changedAt: z51.number().nullable(),
5644
+ changed: z51.boolean()
5645
+ }))();
5646
+ var questStationStateSchema = /* @__PURE__ */ (() => z51.object({
5647
+ key: z51.string(),
5648
+ label: z51.string(),
5649
+ opensAt: z51.number().optional(),
5650
+ closesAt: z51.number().optional(),
5651
+ proof: z51.string().optional(),
5652
+ codeSet: z51.boolean().optional(),
5653
+ status: z51.string(),
5654
+ revocation: z51.object({
5655
+ revoked: z51.boolean(),
5656
+ reason: z51.string(),
5657
+ actor: z51.string().nullable(),
5658
+ changedAt: z51.number()
5690
5659
  }).nullable(),
5691
- completions: z52.number().int().nonnegative()
5660
+ completions: z51.number().int().nonnegative()
5692
5661
  }))();
5693
- var stationCodeSchema = /* @__PURE__ */ (() => z52.string().min(6).max(64).regex(/^[A-Za-z0-9_-]+$/, "use letters, digits, - or _"))();
5694
- var stationCodeInputSchema = /* @__PURE__ */ (() => z52.object({ code: stationCodeSchema, actionId: identifier }).strict())();
5695
- var stationCodeGenerateInputSchema = /* @__PURE__ */ (() => z52.object({ actionId: identifier }).strict())();
5696
- var stationScanPageSchema = /* @__PURE__ */ (() => z52.string().max(2048).refine((value) => {
5662
+ var stationCodeSchema = /* @__PURE__ */ (() => z51.string().min(6).max(64).regex(/^[A-Za-z0-9_-]+$/, "use letters, digits, - or _"))();
5663
+ var stationCodeInputSchema = /* @__PURE__ */ (() => z51.object({ code: stationCodeSchema, actionId: identifier }).strict())();
5664
+ var stationCodeGenerateInputSchema = /* @__PURE__ */ (() => z51.object({ actionId: identifier }).strict())();
5665
+ var stationScanPageSchema = /* @__PURE__ */ (() => z51.string().max(2048).refine((value) => {
5697
5666
  try {
5698
5667
  return new URL(value).protocol === "https:";
5699
5668
  } catch {
5700
5669
  return false;
5701
5670
  }
5702
5671
  }, "Use the https URL of your app's scan page"))();
5703
- var stationCodeStateSchema = /* @__PURE__ */ (() => z52.object({
5704
- quest: z52.string(),
5705
- station: z52.string(),
5706
- codeSet: z52.boolean(),
5707
- replaced: z52.boolean()
5672
+ var stationCodeStateSchema = /* @__PURE__ */ (() => z51.object({
5673
+ quest: z51.string(),
5674
+ station: z51.string(),
5675
+ codeSet: z51.boolean(),
5676
+ replaced: z51.boolean()
5708
5677
  }))();
5709
5678
  var generatedStationCodeSchema = /* @__PURE__ */ (() => stationCodeStateSchema.extend({
5710
- code: z52.string()
5679
+ code: z51.string()
5711
5680
  }))();
5712
5681
 
5713
5682
  // src/server/quests.ts
5714
- import * as z53 from "zod";
5715
- var questLifecycleInputSchema = /* @__PURE__ */ (() => z53.object({
5683
+ import * as z52 from "zod";
5684
+ var questLifecycleInputSchema = /* @__PURE__ */ (() => z52.object({
5716
5685
  quest: identifier,
5717
5686
  expectedRelease: identifier.optional(),
5718
- archived: z53.boolean(),
5719
- reason: z53.string().trim().min(1).max(500),
5687
+ archived: z52.boolean(),
5688
+ reason: z52.string().trim().min(1).max(500),
5720
5689
  actionId: identifier
5721
5690
  }).strict())();
5722
- var questLifecycleSchema = /* @__PURE__ */ (() => z53.object({
5691
+ var questLifecycleSchema = /* @__PURE__ */ (() => z52.object({
5723
5692
  quest: identifier,
5724
5693
  key: identifier.nullable(),
5725
- title: z53.string(),
5694
+ title: z52.string(),
5726
5695
  release: identifier,
5727
- lifecycle: z53.enum(["active", "paused", "archived"]),
5728
- changed: z53.boolean()
5696
+ lifecycle: z52.enum(["active", "paused", "archived"]),
5697
+ changed: z52.boolean()
5729
5698
  }))();
5730
5699
 
5731
5700
  // src/server/endpoints/quests.ts
5732
- import * as z54 from "zod";
5701
+ import * as z53 from "zod";
5733
5702
  var quest = { quest: ID_PATTERN };
5734
5703
  var station = { quest: ID_PATTERN, station: ID_PATTERN };
5735
5704
  var questEndpoints = /* @__PURE__ */ (() => ({
@@ -5755,7 +5724,7 @@ var questEndpoints = /* @__PURE__ */ (() => ({
5755
5724
  parameters: quest,
5756
5725
  permission: "read",
5757
5726
  ledger: "quests.stations",
5758
- result: () => z54.array(questStationStateSchema)
5727
+ result: () => z53.array(questStationStateSchema)
5759
5728
  }),
5760
5729
  revokeStation: managementEndpoint({
5761
5730
  method: "POST",
@@ -5813,7 +5782,7 @@ var questEndpoints = /* @__PURE__ */ (() => ({
5813
5782
  parameters: {},
5814
5783
  permission: "read",
5815
5784
  ledger: "quests.list",
5816
- result: () => z54.array(publishedReleaseSchema)
5785
+ result: () => z53.array(publishedReleaseSchema)
5817
5786
  }),
5818
5787
  listWithoutCode: managementEndpoint({
5819
5788
  method: "GET",
@@ -5821,7 +5790,7 @@ var questEndpoints = /* @__PURE__ */ (() => ({
5821
5790
  parameters: {},
5822
5791
  permission: "read",
5823
5792
  ledger: "quests.listWithoutCode",
5824
- result: () => z54.array(publishedReleaseSchema.omit({ code: true }))
5793
+ result: () => z53.array(publishedReleaseSchema.omit({ code: true }))
5825
5794
  }),
5826
5795
  automaticScheduling: managementEndpoint({
5827
5796
  method: "GET",
@@ -5894,7 +5863,7 @@ var questEndpoints = /* @__PURE__ */ (() => ({
5894
5863
  parameters: { member: ID_PATTERN },
5895
5864
  permission: "read",
5896
5865
  ledger: "submissions.list",
5897
- result: () => z54.object({ items: z54.array(questSubmissionSchema) })
5866
+ result: () => z53.object({ items: z53.array(questSubmissionSchema) })
5898
5867
  }),
5899
5868
  discardSubmission: managementEndpoint({
5900
5869
  method: "POST",
@@ -5924,9 +5893,9 @@ var questEndpoints = /* @__PURE__ */ (() => ({
5924
5893
  }))();
5925
5894
 
5926
5895
  // src/server/referral-history.ts
5927
- import * as z55 from "zod";
5896
+ import * as z54 from "zod";
5928
5897
  var managedReferralHistorySchema = /* @__PURE__ */ (() => referralHistorySchema.extend({
5929
- items: z55.array(
5898
+ items: z54.array(
5930
5899
  referralHistorySchema.shape.items.element.extend({
5931
5900
  /**
5932
5901
  * The referral account the entry paid or corrected, as in `referrals.participants()`'s
@@ -5943,13 +5912,13 @@ var managedReferralHistorySchema = /* @__PURE__ */ (() => referralHistorySchema.
5943
5912
  * What the entry pays: a `fixed` reward for the friend's qualification, a `milestone`, or a
5944
5913
  * percentage `bonus` of the friend's earnings. Null when `account` is.
5945
5914
  */
5946
- kind: z55.string().nullish()
5915
+ kind: z54.string().nullish()
5947
5916
  })
5948
5917
  )
5949
5918
  }))();
5950
5919
 
5951
5920
  // src/server/endpoints/referrals.ts
5952
- import * as z56 from "zod";
5921
+ import * as z55 from "zod";
5953
5922
  var member2 = { member: ID_PATTERN };
5954
5923
  var resource3 = { resource: ID_PATTERN };
5955
5924
  var referralEndpoints = /* @__PURE__ */ (() => ({
@@ -5959,7 +5928,7 @@ var referralEndpoints = /* @__PURE__ */ (() => ({
5959
5928
  parameters: {},
5960
5929
  permission: "read",
5961
5930
  ledger: "referrals.listManaged",
5962
- result: () => z56.array(publishedReferralSchema)
5931
+ result: () => z55.array(publishedReferralSchema)
5963
5932
  }),
5964
5933
  participants: managementEndpoint({
5965
5934
  method: "GET",
@@ -6045,19 +6014,19 @@ var referralEndpoints = /* @__PURE__ */ (() => ({
6045
6014
  }))();
6046
6015
 
6047
6016
  // src/server/releases.ts
6048
- import * as z57 from "zod";
6049
- var managedReleaseQuerySchema = /* @__PURE__ */ (() => z57.strictObject({
6017
+ import * as z56 from "zod";
6018
+ var managedReleaseQuerySchema = /* @__PURE__ */ (() => z56.strictObject({
6050
6019
  quest: identifier.optional(),
6051
6020
  limit: pageLimit,
6052
6021
  cursor: pageCursorSchema.optional()
6053
6022
  }))();
6054
- var managedReleasePageSchema = /* @__PURE__ */ (() => z57.object({
6055
- items: z57.array(publishedReleaseSchema),
6056
- nextCursor: z57.string().nullable()
6023
+ var managedReleasePageSchema = /* @__PURE__ */ (() => z56.object({
6024
+ items: z56.array(publishedReleaseSchema),
6025
+ nextCursor: z56.string().nullable()
6057
6026
  }))();
6058
6027
 
6059
6028
  // src/server/endpoints/releases.ts
6060
- import * as z58 from "zod";
6029
+ import * as z57 from "zod";
6061
6030
  var releaseEndpoints = /* @__PURE__ */ (() => ({
6062
6031
  // `GET /releases` is the releases page, so the list is `/releases/list`.
6063
6032
  list: managementEndpoint({
@@ -6090,7 +6059,7 @@ var releaseEndpoints = /* @__PURE__ */ (() => ({
6090
6059
  parameters: {},
6091
6060
  permission: "publish",
6092
6061
  ledger: "releases.publishBatch",
6093
- result: () => z58.array(publishedReleaseSchema)
6062
+ result: () => z57.array(publishedReleaseSchema)
6094
6063
  }),
6095
6064
  updateSettings: managementEndpoint({
6096
6065
  method: "POST",
@@ -6112,7 +6081,7 @@ var releaseEndpoints = /* @__PURE__ */ (() => ({
6112
6081
  }))();
6113
6082
 
6114
6083
  // src/server/endpoints/trackers.ts
6115
- import * as z59 from "zod";
6084
+ import * as z58 from "zod";
6116
6085
  var tracker = { tracker: ID_PATTERN };
6117
6086
  var resource4 = { resource: ID_PATTERN };
6118
6087
  var trackerEndpoints = /* @__PURE__ */ (() => ({
@@ -6122,7 +6091,7 @@ var trackerEndpoints = /* @__PURE__ */ (() => ({
6122
6091
  parameters: {},
6123
6092
  permission: "read",
6124
6093
  ledger: "trackers.list",
6125
- result: () => z59.array(trackerStatusSchema)
6094
+ result: () => z58.array(trackerStatusSchema)
6126
6095
  }),
6127
6096
  get: managementEndpoint({
6128
6097
  method: "GET",
@@ -6421,50 +6390,50 @@ var teamEndpoints = /* @__PURE__ */ (() => ({
6421
6390
  }))();
6422
6391
 
6423
6392
  // src/server/test-members.ts
6424
- import * as z60 from "zod";
6425
- var testMemberWalletSchema = /* @__PURE__ */ (() => z60.object({
6393
+ import * as z59 from "zod";
6394
+ var testMemberWalletSchema = /* @__PURE__ */ (() => z59.object({
6426
6395
  chain: walletChainSchema,
6427
6396
  /** CAIP-2 network, Cosmos only. */
6428
6397
  network: cosmosNetworkSchema.nullable(),
6429
- address: z60.string()
6398
+ address: z59.string()
6430
6399
  }))();
6431
- var testMemberAccountSchema = /* @__PURE__ */ (() => z60.object({
6432
- provider: z60.enum(["x", "discord"]),
6400
+ var testMemberAccountSchema = /* @__PURE__ */ (() => z59.object({
6401
+ provider: z59.enum(["x", "discord"]),
6433
6402
  /** The X user ID or Discord user ID. */
6434
- id: z60.string(),
6403
+ id: z59.string(),
6435
6404
  /** The X handle, when the account was linked by username; otherwise null. */
6436
- username: z60.string().nullable(),
6405
+ username: z59.string().nullable(),
6437
6406
  /**
6438
6407
  * `linked`: an operator linked a real account with `linkAccount`. `synthetic`: the account Relay
6439
6408
  * linked for synthetic records. `connected`: the member connected it through X or Discord while
6440
6409
  * a staging site acted as them.
6441
6410
  */
6442
- source: z60.enum(["linked", "synthetic", "connected"])
6411
+ source: z59.enum(["linked", "synthetic", "connected"])
6443
6412
  }))();
6444
- var testMemberSchema = /* @__PURE__ */ (() => z60.object({
6413
+ var testMemberSchema = /* @__PURE__ */ (() => z59.object({
6445
6414
  id: identifier,
6446
- name: z60.string(),
6447
- test: z60.literal(true),
6415
+ name: z59.string(),
6416
+ test: z59.literal(true),
6448
6417
  /** Current project-calendar date (YYYY-MM-DD), computed by the server. */
6449
- today: z60.iso.date().optional(),
6418
+ today: z59.iso.date().optional(),
6450
6419
  /**
6451
6420
  * Number of calendar days advanced with `days`; absent means zero for older servers. Hours,
6452
6421
  * minutes and `to` leave it unchanged, so read the member's date from `today`.
6453
6422
  */
6454
- offsetDays: z60.number().int().min(0).optional(),
6423
+ offsetDays: z59.number().int().min(0).optional(),
6455
6424
  /** Linked wallet addresses, by chain then newest first; absent from older servers. */
6456
- wallets: z60.array(testMemberWalletSchema).optional(),
6425
+ wallets: z59.array(testMemberWalletSchema).optional(),
6457
6426
  /** Its X and Discord accounts, X first; absent from older servers. */
6458
- accounts: z60.array(testMemberAccountSchema).optional()
6427
+ accounts: z59.array(testMemberAccountSchema).optional()
6459
6428
  }))();
6460
- var testMemberCreateSchema = /* @__PURE__ */ (() => z60.object({
6429
+ var testMemberCreateSchema = /* @__PURE__ */ (() => z59.object({
6461
6430
  actionId: identifier,
6462
- name: z60.string().trim().min(1).max(40)
6431
+ name: z59.string().trim().min(1).max(40)
6463
6432
  }).strict())();
6464
6433
  var testMemberActionSchema = /* @__PURE__ */ (() => submitSchema.omit({ member: true, faultAfterReview: true }).extend({
6465
- operation: z60.literal("attempts.submit")
6434
+ operation: z59.literal("attempts.submit")
6466
6435
  }).strict())();
6467
- var testMemberPassSchema = /* @__PURE__ */ (() => z60.object({
6436
+ var testMemberPassSchema = /* @__PURE__ */ (() => z59.object({
6468
6437
  actionId: identifier,
6469
6438
  /** A manual quest, by key or ID. Automatic quests start from their tracker or schedule. */
6470
6439
  quest: identifier,
@@ -6475,122 +6444,122 @@ var testMemberPassSchema = /* @__PURE__ */ (() => z60.object({
6475
6444
  */
6476
6445
  completionKey: completionKeySchema.optional()
6477
6446
  }).strict())();
6478
- var testMemberAcceptAnywaySchema = /* @__PURE__ */ (() => z60.object({
6447
+ var testMemberAcceptAnywaySchema = /* @__PURE__ */ (() => z59.object({
6479
6448
  actionId: identifier,
6480
6449
  attempt: identifier,
6481
6450
  /** `"test"` (the default) or `"live"`: whose refusals apply. */
6482
- rules: z60.enum(["test", "live"]).optional(),
6451
+ rules: z59.enum(["test", "live"]).optional(),
6483
6452
  /** Why the rejection is reversed, recorded with the decision. Required with `rules: "live"`. */
6484
- reason: z60.string().trim().min(1).max(2e3).optional()
6453
+ reason: z59.string().trim().min(1).max(2e3).optional()
6485
6454
  }).strict())();
6486
- var testMemberReferralAcceptSchema = /* @__PURE__ */ (() => z60.union([
6487
- z60.object({ actionId: identifier, code: identifier }).strict(),
6488
- z60.object({ actionId: identifier, inviter: identifier }).strict()
6455
+ var testMemberReferralAcceptSchema = /* @__PURE__ */ (() => z59.union([
6456
+ z59.object({ actionId: identifier, code: identifier }).strict(),
6457
+ z59.object({ actionId: identifier, inviter: identifier }).strict()
6489
6458
  ]))();
6490
- var testMemberRedeemSchema = /* @__PURE__ */ (() => z60.object({ actionId: identifier, offer: identifier }).strict())();
6491
- var testMemberResetSchema = /* @__PURE__ */ (() => z60.object({ actionId: identifier }).strict())();
6492
- var testMemberPurgeSchema = /* @__PURE__ */ (() => z60.object({
6459
+ var testMemberRedeemSchema = /* @__PURE__ */ (() => z59.object({ actionId: identifier, offer: identifier }).strict())();
6460
+ var testMemberResetSchema = /* @__PURE__ */ (() => z59.object({ actionId: identifier }).strict())();
6461
+ var testMemberPurgeSchema = /* @__PURE__ */ (() => z59.object({
6493
6462
  actionId: identifier,
6494
6463
  // A cap on one transaction's size, matching the campaign playground's member limit per run.
6495
- members: z60.array(identifier).min(1).max(500),
6496
- reason: z60.string().trim().min(1).max(2e3)
6464
+ members: z59.array(identifier).min(1).max(500),
6465
+ reason: z59.string().trim().min(1).max(2e3)
6497
6466
  }).strict())();
6498
- var testMemberAdvanceSchema = /* @__PURE__ */ (() => z60.object({
6467
+ var testMemberAdvanceSchema = /* @__PURE__ */ (() => z59.object({
6499
6468
  actionId: identifier,
6500
- days: z60.number().int().min(1).max(30)
6469
+ days: z59.number().int().min(1).max(30)
6501
6470
  }).strict())();
6502
- var testMemberClockAdvanceSchema = /* @__PURE__ */ (() => z60.union([
6471
+ var testMemberClockAdvanceSchema = /* @__PURE__ */ (() => z59.union([
6503
6472
  testMemberAdvanceSchema,
6504
- z60.object({ actionId: identifier, hours: z60.number().int().min(1).max(720) }).strict(),
6505
- z60.object({
6473
+ z59.object({ actionId: identifier, hours: z59.number().int().min(1).max(720) }).strict(),
6474
+ z59.object({
6506
6475
  actionId: identifier,
6507
- minutes: z60.number().int().min(1).max(43200)
6476
+ minutes: z59.number().int().min(1).max(43200)
6508
6477
  }).strict(),
6509
- z60.object({
6478
+ z59.object({
6510
6479
  actionId: identifier,
6511
6480
  /**
6512
6481
  * An ISO 8601 instant with an offset, such as `2026-10-10T00:00:00+02:00`, or epoch
6513
6482
  * milliseconds, which parse to that instant in UTC, so the parsed `to` is always an ISO
6514
6483
  * string.
6515
6484
  */
6516
- to: z60.union([
6517
- z60.iso.datetime({ offset: true }),
6518
- z60.number().int().nonnegative().max(864e13).transform((at) => new Date(at).toISOString())
6485
+ to: z59.union([
6486
+ z59.iso.datetime({ offset: true }),
6487
+ z59.number().int().nonnegative().max(864e13).transform((at) => new Date(at).toISOString())
6519
6488
  ])
6520
6489
  }).strict()
6521
6490
  ]))();
6522
- var testMemberResetResultSchema = /* @__PURE__ */ (() => z60.object({
6491
+ var testMemberResetResultSchema = /* @__PURE__ */ (() => z59.object({
6523
6492
  member: identifier,
6524
- deleted: z60.literal(true)
6493
+ deleted: z59.literal(true)
6525
6494
  }))();
6526
- var testMemberPurgeResultSchema = /* @__PURE__ */ (() => z60.object({
6527
- members: z60.array(identifier),
6528
- purged: z60.literal(true)
6495
+ var testMemberPurgeResultSchema = /* @__PURE__ */ (() => z59.object({
6496
+ members: z59.array(identifier),
6497
+ purged: z59.literal(true)
6529
6498
  }))();
6530
- var testMemberWalletLinkSchema = /* @__PURE__ */ (() => z60.discriminatedUnion("chain", [
6531
- z60.object({
6499
+ var testMemberWalletLinkSchema = /* @__PURE__ */ (() => z59.discriminatedUnion("chain", [
6500
+ z59.object({
6532
6501
  actionId: identifier,
6533
- chain: z60.literal("solana"),
6502
+ chain: z59.literal("solana"),
6534
6503
  address: solanaAddressSchema
6535
6504
  }).strict(),
6536
- z60.object({
6505
+ z59.object({
6537
6506
  actionId: identifier,
6538
- chain: z60.literal("eip155"),
6507
+ chain: z59.literal("eip155"),
6539
6508
  address: evmAddressSchema
6540
6509
  }).strict(),
6541
- z60.object({
6510
+ z59.object({
6542
6511
  actionId: identifier,
6543
- chain: z60.literal("cosmos"),
6512
+ chain: z59.literal("cosmos"),
6544
6513
  network: cosmosNetworkSchema,
6545
6514
  address: cosmosAddressSchema
6546
6515
  }).strict()
6547
6516
  ]))();
6548
- var testMemberWalletUnlinkSchema = /* @__PURE__ */ (() => z60.object({
6517
+ var testMemberWalletUnlinkSchema = /* @__PURE__ */ (() => z59.object({
6549
6518
  actionId: identifier,
6550
6519
  chain: walletChainSchema,
6551
- address: z60.string().min(1).max(100)
6520
+ address: z59.string().min(1).max(100)
6552
6521
  }).strict())();
6553
- var snowflake = /* @__PURE__ */ (() => z60.string().regex(/^[0-9]{1,20}$/))();
6554
- var accountId = /* @__PURE__ */ (() => z60.string().regex(/^[0-9]{1,20}$/, "Use the numeric user ID"))();
6555
- var accountReference = /* @__PURE__ */ (() => z60.object({
6522
+ var snowflake = /* @__PURE__ */ (() => z59.string().regex(/^[0-9]{1,20}$/))();
6523
+ var accountId = /* @__PURE__ */ (() => z59.string().regex(/^[0-9]{1,20}$/, "Use the numeric user ID"))();
6524
+ var accountReference = /* @__PURE__ */ (() => z59.object({
6556
6525
  actionId: identifier,
6557
- kind: z60.enum(["x", "discord"]),
6558
- subject: z60.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric user ID")
6526
+ kind: z59.enum(["x", "discord"]),
6527
+ subject: z59.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric user ID")
6559
6528
  }).strict().transform(({ actionId: actionId3, kind, subject }) => ({
6560
6529
  actionId: actionId3,
6561
6530
  provider: kind,
6562
6531
  id: subject
6563
6532
  })))();
6564
- var accountById = /* @__PURE__ */ (() => z60.object({
6533
+ var accountById = /* @__PURE__ */ (() => z59.object({
6565
6534
  actionId: identifier,
6566
- provider: z60.enum(["x", "discord"]),
6535
+ provider: z59.enum(["x", "discord"]),
6567
6536
  id: accountId
6568
6537
  }).strict())();
6569
- var testMemberAccountLinkSchema = /* @__PURE__ */ (() => z60.union([
6538
+ var testMemberAccountLinkSchema = /* @__PURE__ */ (() => z59.union([
6570
6539
  accountById,
6571
- z60.object({
6540
+ z59.object({
6572
6541
  actionId: identifier,
6573
- provider: z60.literal("x"),
6542
+ provider: z59.literal("x"),
6574
6543
  username: xUsernameSchema
6575
6544
  }).strict(),
6576
6545
  accountReference
6577
6546
  ]))();
6578
- var testMemberAccountUnlinkSchema = /* @__PURE__ */ (() => z60.union([
6547
+ var testMemberAccountUnlinkSchema = /* @__PURE__ */ (() => z59.union([
6579
6548
  accountById,
6580
6549
  accountReference
6581
6550
  ]))();
6582
- var metric = /* @__PURE__ */ (() => z60.number().int().nonnegative().safe())();
6583
- var testMemberXPostSchema = /* @__PURE__ */ (() => z60.strictObject({
6584
- content: z60.string().max(4e3).default(""),
6585
- author: z60.strictObject({
6551
+ var metric = /* @__PURE__ */ (() => z59.number().int().nonnegative().safe())();
6552
+ var testMemberXPostSchema = /* @__PURE__ */ (() => z59.strictObject({
6553
+ content: z59.string().max(4e3).default(""),
6554
+ author: z59.strictObject({
6586
6555
  /** Defaults to `test_` and the end of the synthetic account ID. */
6587
- username: z60.string().min(1).max(50).optional(),
6556
+ username: z59.string().min(1).max(50).optional(),
6588
6557
  /** Defaults to the test member's name. */
6589
- name: z60.string().min(1).max(100).optional()
6558
+ name: z59.string().min(1).max(100).optional()
6590
6559
  }).default({}),
6591
- isReply: z60.boolean().default(false),
6592
- isRetweet: z60.boolean().default(false),
6593
- isQuoteTweet: z60.boolean().default(false),
6560
+ isReply: z59.boolean().default(false),
6561
+ isRetweet: z59.boolean().default(false),
6562
+ isQuoteTweet: z59.boolean().default(false),
6594
6563
  likeCount: metric.default(0),
6595
6564
  replyCount: metric.default(0),
6596
6565
  retweetCount: metric.default(0),
@@ -6598,27 +6567,27 @@ var testMemberXPostSchema = /* @__PURE__ */ (() => z60.strictObject({
6598
6567
  viewCount: metric.default(0),
6599
6568
  bookmarkCount: metric.default(0)
6600
6569
  }))();
6601
- var testMemberDiscordMessageSchema = /* @__PURE__ */ (() => z60.strictObject({
6570
+ var testMemberDiscordMessageSchema = /* @__PURE__ */ (() => z59.strictObject({
6602
6571
  channelId: snowflake.optional(),
6603
6572
  /** The channel whose thread `channelId` is, or null outside a thread. */
6604
6573
  parentChannelId: snowflake.nullable().default(null),
6605
6574
  replyTo: snowflake.nullable().default(null),
6606
- text: z60.string().max(4e3).optional()
6575
+ text: z59.string().max(4e3).optional()
6607
6576
  }))();
6608
- var testMemberDiscordReactionSchema = /* @__PURE__ */ (() => z60.strictObject({
6577
+ var testMemberDiscordReactionSchema = /* @__PURE__ */ (() => z59.strictObject({
6609
6578
  channelId: snowflake.optional(),
6610
6579
  /** The channel whose thread `channelId` is, or null outside a thread. */
6611
6580
  parentChannelId: snowflake.nullable().default(null),
6612
6581
  messageId: snowflake.optional(),
6613
- emoji: z60.strictObject({
6582
+ emoji: z59.strictObject({
6614
6583
  /** A custom emoji's ID, or null for a Unicode emoji. */
6615
6584
  id: snowflake.nullable().default(null),
6616
- name: z60.string().min(1).max(100)
6585
+ name: z59.string().min(1).max(100)
6617
6586
  }).default({ id: null, name: "\u{1F44D}" }),
6618
- reactorRoles: z60.array(snowflake).max(50).default([]),
6619
- messagePublishedAt: z60.number().int().nonnegative().safe().optional()
6587
+ reactorRoles: z59.array(snowflake).max(50).default([]),
6588
+ messagePublishedAt: z59.number().int().nonnegative().safe().optional()
6620
6589
  }))();
6621
- var testMemberRecordSchema = /* @__PURE__ */ (() => z60.object({
6590
+ var testMemberRecordSchema = /* @__PURE__ */ (() => z59.object({
6622
6591
  actionId: identifier,
6623
6592
  /** A managed X or Discord tracker, by key or ID. */
6624
6593
  tracker: identifier,
@@ -6626,16 +6595,16 @@ var testMemberRecordSchema = /* @__PURE__ */ (() => z60.object({
6626
6595
  * The record account the test member holds. `messageAuthor` (Discord reactions only) makes the
6627
6596
  * member the reacted-to message's author, and the reactor a synthetic account no member holds.
6628
6597
  */
6629
- as: z60.enum(["author", "messageAuthor"]).default("author"),
6630
- data: z60.record(z60.string(), z60.json()).default({})
6598
+ as: z59.enum(["author", "messageAuthor"]).default("author"),
6599
+ data: z59.record(z59.string(), z59.json()).default({})
6631
6600
  }).strict())();
6632
6601
  var testMemberRecordResultSchema = /* @__PURE__ */ (() => trackerIngestResultSchema.extend({
6633
6602
  /** The tracker's stable ID. */
6634
6603
  tracker: identifier,
6635
6604
  /** The stored record's ID. */
6636
- record: z60.string(),
6605
+ record: z59.string(),
6637
6606
  /** The account the record names for the test member: its linked one, else its synthetic one. */
6638
- account: z60.object({ kind: z60.enum(["x", "discord"]), id: z60.string() })
6607
+ account: z59.object({ kind: z59.enum(["x", "discord"]), id: z59.string() })
6639
6608
  }))();
6640
6609
  var TestMemberDecisionKind = {
6641
6610
  /** `testMembers.pass`: the quest's check never ran. */
@@ -6643,51 +6612,51 @@ var TestMemberDecisionKind = {
6643
6612
  /** `testMembers.acceptAnyway`: the attempt was rejected, then accepted. */
6644
6613
  AcceptAnyway: "accept-anyway"
6645
6614
  };
6646
- var testMemberDecisionKindSchema = /* @__PURE__ */ (() => z60.string())();
6647
- var testMemberOperatorDecisionSchema = /* @__PURE__ */ (() => z60.object({
6615
+ var testMemberDecisionKindSchema = /* @__PURE__ */ (() => z59.string())();
6616
+ var testMemberOperatorDecisionSchema = /* @__PURE__ */ (() => z59.object({
6648
6617
  kind: testMemberDecisionKindSchema,
6649
6618
  /** The operator who decided, as audit history names them. */
6650
- actor: z60.string().nullable(),
6651
- at: z60.number().int().nonnegative().safe()
6619
+ actor: z59.string().nullable(),
6620
+ at: z59.number().int().nonnegative().safe()
6652
6621
  }))();
6653
- var testMemberHistoryQuerySchema = /* @__PURE__ */ (() => z60.object({
6622
+ var testMemberHistoryQuerySchema = /* @__PURE__ */ (() => z59.object({
6654
6623
  /** Inclusive lower bound on credited activity time, in epoch milliseconds. */
6655
- since: z60.coerce.number().int().nonnegative().safe().optional()
6624
+ since: z59.coerce.number().int().nonnegative().safe().optional()
6656
6625
  }))();
6657
- var testMemberHistorySchema = /* @__PURE__ */ (() => z60.object({
6626
+ var testMemberHistorySchema = /* @__PURE__ */ (() => z59.object({
6658
6627
  /** Newest credited activity first, up to 500 attempts. */
6659
- attempts: z60.array(
6628
+ attempts: z59.array(
6660
6629
  attemptSchema.extend({
6661
6630
  /** The quest's authoring key; absent when the quest has none. */
6662
- questKey: z60.string().optional(),
6663
- eligibleAt: z60.number().int().nonnegative().safe(),
6631
+ questKey: z59.string().optional(),
6632
+ eligibleAt: z59.number().int().nonnegative().safe(),
6664
6633
  /** Set when an operator decided the attempt in place of its evaluator; absent otherwise. */
6665
6634
  operatorDecision: testMemberOperatorDecisionSchema.optional(),
6666
6635
  /**
6667
6636
  * Rewards of this attempt's completion that Relay never sent, each with why: a role reward
6668
6637
  * for a test-linked Discord account. Absent when every reward was sent.
6669
6638
  */
6670
- rewardsNotSent: z60.array(z60.object({ reason: z60.string() })).optional()
6639
+ rewardsNotSent: z59.array(z59.object({ reason: z59.string() })).optional()
6671
6640
  })
6672
6641
  ),
6673
6642
  /** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
6674
- skipped: z60.array(
6675
- z60.object({
6643
+ skipped: z59.array(
6644
+ z59.object({
6676
6645
  quest: identifier,
6677
6646
  /** The quest's authoring key; absent when the quest has none. */
6678
- questKey: z60.string().optional(),
6647
+ questKey: z59.string().optional(),
6679
6648
  tracker: identifier,
6680
- record: z60.string(),
6681
- code: z60.string().min(1),
6682
- occurredAt: z60.number().int().nonnegative().safe()
6649
+ record: z59.string(),
6650
+ code: z59.string().min(1),
6651
+ occurredAt: z59.number().int().nonnegative().safe()
6683
6652
  })
6684
6653
  ),
6685
6654
  /** False when older entries were omitted from either list. */
6686
- complete: z60.boolean()
6655
+ complete: z59.boolean()
6687
6656
  }))();
6688
6657
 
6689
6658
  // src/server/endpoints/test-members.ts
6690
- import * as z61 from "zod";
6659
+ import * as z60 from "zod";
6691
6660
  var member3 = { member: SEGMENT_PATTERN };
6692
6661
  var testMemberEndpoints = /* @__PURE__ */ (() => ({
6693
6662
  list: managementEndpoint({
@@ -6696,7 +6665,7 @@ var testMemberEndpoints = /* @__PURE__ */ (() => ({
6696
6665
  parameters: {},
6697
6666
  permission: "publish",
6698
6667
  ledger: null,
6699
- result: () => z61.array(testMemberSchema)
6668
+ result: () => z60.array(testMemberSchema)
6700
6669
  }),
6701
6670
  create: managementEndpoint({
6702
6671
  method: "POST",
@@ -6830,7 +6799,7 @@ var testMemberEndpoints = /* @__PURE__ */ (() => ({
6830
6799
  }))();
6831
6800
 
6832
6801
  // src/server/endpoints/webhooks.ts
6833
- import * as z62 from "zod";
6802
+ import * as z61 from "zod";
6834
6803
  var webhookEndpoints = /* @__PURE__ */ (() => ({
6835
6804
  list: managementEndpoint({
6836
6805
  method: "GET",
@@ -6838,7 +6807,7 @@ var webhookEndpoints = /* @__PURE__ */ (() => ({
6838
6807
  parameters: {},
6839
6808
  permission: "read",
6840
6809
  ledger: null,
6841
- result: () => z62.array(webhookEndpointSchema)
6810
+ result: () => z61.array(webhookEndpointSchema)
6842
6811
  }),
6843
6812
  create: managementEndpoint({
6844
6813
  method: "POST",
@@ -7037,13 +7006,6 @@ export {
7037
7006
  connectionResyncInputSchema,
7038
7007
  pluginEndpoints,
7039
7008
  connectionEndpoints,
7040
- environmentSchema,
7041
- roleSchema,
7042
- permissionSchema,
7043
- rolePermissions,
7044
- projectRoleSchema,
7045
- projectPermissionSchema,
7046
- projectRolePermissions,
7047
7009
  ingestTrackerScopeSchema,
7048
7010
  tokenScopeInputSchema,
7049
7011
  tokenInputSchema,
@@ -7111,6 +7073,7 @@ export {
7111
7073
  scheduleEndpoints,
7112
7074
  repositoryEndpoints,
7113
7075
  buildEndpoints,
7076
+ runtimeLogEndpoints,
7114
7077
  stagingEndpoints,
7115
7078
  developmentEndpoints,
7116
7079
  identityIntegrationEndpoints,