@domino-sdk/relay 1.74.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.
- package/CHANGELOG.md +54 -0
- package/dist/authoring.d.ts +6 -6
- package/dist/authoring.js +4 -4
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +8 -8
- package/dist/{capability-error-Bn6cCqof.d.ts → capability-error-D56xxE2i.d.ts} +1 -1
- package/dist/{chunk-CW7FJ5PX.js → chunk-3KHVIUKK.js} +1 -1
- package/dist/{chunk-2LURSPDM.js → chunk-4WODSE6Y.js} +2 -2
- package/dist/{chunk-F66GGNKD.js → chunk-4YKOSNYI.js} +1 -1
- package/dist/{chunk-ELHMJODS.js → chunk-7B7MDHJ6.js} +1 -1
- package/dist/{chunk-6TDHRGBM.js → chunk-7QHROIML.js} +3 -0
- package/dist/{chunk-DNOLNMCW.js → chunk-E4ZQCG44.js} +9 -8
- package/dist/{chunk-SVZ3QWHT.js → chunk-FBS65R66.js} +2 -2
- package/dist/{chunk-KP55TMCC.js → chunk-HEQ7HLXG.js} +1 -1
- package/dist/{chunk-TGQNNMCY.js → chunk-IMX45NSW.js} +6 -6
- package/dist/{chunk-RALBAKKX.js → chunk-K3PEQXDV.js} +1 -1
- package/dist/{chunk-JZT2NLSG.js → chunk-LFFGW7GB.js} +449 -392
- package/dist/{chunk-NI6XRGEL.js → chunk-SPLXHFVX.js} +2 -2
- package/dist/{chunk-KGZ7SRKJ.js → chunk-TAZ5AEYF.js} +1 -1
- package/dist/{chunk-HCOLMJFX.js → chunk-X5REDFGV.js} +4 -3
- package/dist/{chunk-T4PTFCSB.js → chunk-XEXB3WZE.js} +1 -1
- package/dist/{chunk-724CKAC7.js → chunk-YB5BSKVU.js} +3 -3
- package/dist/{chunk-7I7P5UVC.js → chunk-ZXFRHGZC.js} +422 -291
- package/dist/{client-B2aVGf38.d.ts → client-336yROej.d.ts} +2 -2
- package/dist/{identity-integration-C03rUYc0.d.ts → identity-integration-B1f5oOdc.d.ts} +1169 -3
- package/dist/{transport-D77Rbf4D.d.ts → index-BM0DdDYy.d.ts} +614 -1274
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -7
- package/dist/internal.d.ts +46 -22
- package/dist/internal.js +24 -17
- package/dist/{limits-p-Mg0oSi.d.ts → limits-DICxln-i.d.ts} +6 -0
- package/dist/portal-proxy.d.ts +8 -1
- package/dist/portal-proxy.js +125 -50
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +8 -8
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/H6GH644T.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +4 -4
- package/dist/schema.js +7 -7
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +136 -29
- package/dist/{sign-in-providers-BG22ZZkl.d.ts → sign-in-providers-BMtk_NWY.d.ts} +1 -1
- package/dist/solana.d.ts +3 -3
- package/dist/solana.js +8 -8
- package/dist/{station-check-in-a1deSjbm.d.ts → station-check-in-vcDKQOet.d.ts} +2 -2
- package/dist/{submission-input-DBDLkTF8.d.ts → submission-input-D_NiBR0W.d.ts} +6 -1
- package/dist/telegram.d.ts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +15 -5
- package/package.json +2 -1
- package/dist/runtime/chunks/NYEWMPJH.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attemptCaptureSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FBS65R66.js";
|
|
4
4
|
import {
|
|
5
5
|
completionReceiptListSchema,
|
|
6
6
|
completionReceiptSchema,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
webhookEndpointStateSchema,
|
|
16
16
|
webhookSecretSchema,
|
|
17
17
|
webhookStatePageSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4WODSE6Y.js";
|
|
19
19
|
import {
|
|
20
20
|
accountVouchedBySchema,
|
|
21
21
|
appScheduleListSchema,
|
|
@@ -29,10 +29,12 @@ import {
|
|
|
29
29
|
appStorageRowsSchema,
|
|
30
30
|
appStorageSqlClearResultSchema,
|
|
31
31
|
appStorageTablesSchema,
|
|
32
|
+
appStorageValueBytesSchema,
|
|
32
33
|
appStorageValueSchema,
|
|
33
34
|
credentialSecretSchema,
|
|
34
35
|
customDomainListSchema,
|
|
35
36
|
customDomainSchema,
|
|
37
|
+
environmentSchema,
|
|
36
38
|
identityIntegrationSchema,
|
|
37
39
|
identityIntegrationSecretSchema,
|
|
38
40
|
identityKindClaimSchema,
|
|
@@ -42,8 +44,12 @@ import {
|
|
|
42
44
|
memberImportRowPageSchema,
|
|
43
45
|
memberImportSchema,
|
|
44
46
|
offeredStarterSchema,
|
|
47
|
+
permissionListSchema,
|
|
48
|
+
permissionSchema,
|
|
49
|
+
projectRoleSchema,
|
|
50
|
+
roleSchema,
|
|
45
51
|
starterIdSchema
|
|
46
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-ZXFRHGZC.js";
|
|
47
53
|
import {
|
|
48
54
|
automaticCatchUpPreviewSchema,
|
|
49
55
|
automaticCatchUpResultSchema,
|
|
@@ -54,28 +60,28 @@ import {
|
|
|
54
60
|
deploymentPreviewSchema,
|
|
55
61
|
deploymentRecordSchema,
|
|
56
62
|
deploymentResultSchema
|
|
57
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-IMX45NSW.js";
|
|
58
64
|
import {
|
|
59
65
|
xUserSchema,
|
|
60
66
|
xUsernameSchema
|
|
61
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-K3PEQXDV.js";
|
|
62
68
|
import {
|
|
63
69
|
analyticsCatalogSchema,
|
|
64
70
|
analyticsMetricResultSchema,
|
|
65
71
|
analyticsRanges,
|
|
66
72
|
analyticsReadSchema,
|
|
67
73
|
dashboardDefinitionSchema
|
|
68
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-XEXB3WZE.js";
|
|
69
75
|
import {
|
|
70
76
|
createHttpExchange,
|
|
71
77
|
uncertainStatuses
|
|
72
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-4YKOSNYI.js";
|
|
73
79
|
import {
|
|
74
80
|
MANAGEMENT_TIMEOUT,
|
|
75
81
|
lifetime,
|
|
76
82
|
retrying,
|
|
77
83
|
validTimeout
|
|
78
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-X5REDFGV.js";
|
|
79
85
|
import {
|
|
80
86
|
collectionPreviewSchema,
|
|
81
87
|
creatorAccountProviderSchema,
|
|
@@ -85,14 +91,14 @@ import {
|
|
|
85
91
|
questEnrollmentSchema,
|
|
86
92
|
rewardDeliveriesSchema,
|
|
87
93
|
rewardDeliverySchema
|
|
88
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-HEQ7HLXG.js";
|
|
89
95
|
import {
|
|
90
96
|
allocatedQuestSchema,
|
|
91
97
|
catalogDeploymentPreviewSchema,
|
|
92
98
|
questCatalogSchema,
|
|
93
99
|
questDraftSchema,
|
|
94
100
|
questPublicationPreviewSchema
|
|
95
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-3KHVIUKK.js";
|
|
96
102
|
import {
|
|
97
103
|
engagementBoundaryPageSchema,
|
|
98
104
|
engagementChangePreviewSchema,
|
|
@@ -106,7 +112,7 @@ import {
|
|
|
106
112
|
redemptionSchema,
|
|
107
113
|
referralHistorySchema,
|
|
108
114
|
referralManagementSchema
|
|
109
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-TAZ5AEYF.js";
|
|
110
116
|
import {
|
|
111
117
|
appIdentityKindSchema,
|
|
112
118
|
attemptSchema,
|
|
@@ -135,6 +141,7 @@ import {
|
|
|
135
141
|
identifier,
|
|
136
142
|
knownResponse,
|
|
137
143
|
leaderboardExclusionGroupSchema,
|
|
144
|
+
leaderboardHistoryPageSchema,
|
|
138
145
|
leaderboardPageSchema,
|
|
139
146
|
leaderboardSettlementPoolSchema,
|
|
140
147
|
leaderboardSettlementSchema,
|
|
@@ -193,7 +200,7 @@ import {
|
|
|
193
200
|
walletSignInNetworksSchema,
|
|
194
201
|
walletTransactionsSchema,
|
|
195
202
|
walletUnlinkInputSchema
|
|
196
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-7QHROIML.js";
|
|
197
204
|
import {
|
|
198
205
|
RequestError,
|
|
199
206
|
isRequestError
|
|
@@ -821,6 +828,8 @@ var managedAttemptQuerySchema = /* @__PURE__ */ (() => z8.strictObject({
|
|
|
821
828
|
q: z8.string().max(200).optional(),
|
|
822
829
|
quest: identifier.optional(),
|
|
823
830
|
status: z8.string().min(1).max(50).optional(),
|
|
831
|
+
from: z8.coerce.number().int().nonnegative().safe().optional(),
|
|
832
|
+
to: z8.coerce.number().int().nonnegative().safe().optional(),
|
|
824
833
|
limit: pageLimit,
|
|
825
834
|
cursor: pageCursorSchema.optional()
|
|
826
835
|
}))();
|
|
@@ -1777,103 +1786,57 @@ var connectionEndpoints = /* @__PURE__ */ (() => ({
|
|
|
1777
1786
|
})
|
|
1778
1787
|
}))();
|
|
1779
1788
|
|
|
1780
|
-
// src/server/permissions.ts
|
|
1781
|
-
import * as z14 from "zod";
|
|
1782
|
-
var environmentSchema = /* @__PURE__ */ (() => z14.enum(["test", "live"]))();
|
|
1783
|
-
var roleSchema = /* @__PURE__ */ (() => z14.enum(["editor", "reviewer", "staff"]))();
|
|
1784
|
-
var permissionSchema = /* @__PURE__ */ (() => z14.enum([
|
|
1785
|
-
"read",
|
|
1786
|
-
"publish",
|
|
1787
|
-
"review",
|
|
1788
|
-
"confirm",
|
|
1789
|
-
"handover",
|
|
1790
|
-
"inventory",
|
|
1791
|
-
"access",
|
|
1792
|
-
"points",
|
|
1793
|
-
/**
|
|
1794
|
-
* Custom tracker ingestion only (`trackers.ingest`), such as for an indexer's key. Editors and
|
|
1795
|
-
* hosted-app keys hold it.
|
|
1796
|
-
*/
|
|
1797
|
-
"ingest",
|
|
1798
|
-
/**
|
|
1799
|
-
* Enrolling members from a server (`quests.enroll`), which vouches for their consent. Editors
|
|
1800
|
-
* hold it; hosted-app keys do not.
|
|
1801
|
-
*/
|
|
1802
|
-
"enroll"
|
|
1803
|
-
]))();
|
|
1804
|
-
var permissionListSchema = /* @__PURE__ */ (() => z14.array(z14.string()).transform(
|
|
1805
|
-
(values) => values.filter(
|
|
1806
|
-
(value) => permissionSchema.safeParse(value).success
|
|
1807
|
-
)
|
|
1808
|
-
))();
|
|
1809
|
-
var rolePermissions = {
|
|
1810
|
-
editor: ["read", "publish", "inventory", "points", "ingest", "enroll"],
|
|
1811
|
-
reviewer: ["read", "review"],
|
|
1812
|
-
staff: ["read", "confirm", "handover"]
|
|
1813
|
-
};
|
|
1814
|
-
var projectRoleSchema = /* @__PURE__ */ (() => z14.enum([...roleSchema.options, "viewer"]))();
|
|
1815
|
-
var projectPermissionSchema = /* @__PURE__ */ (() => z14.enum([
|
|
1816
|
-
...permissionSchema.options,
|
|
1817
|
-
"dashboards"
|
|
1818
|
-
]))();
|
|
1819
|
-
var projectRolePermissions = {
|
|
1820
|
-
editor: [...rolePermissions.editor, "dashboards"],
|
|
1821
|
-
reviewer: [...rolePermissions.reviewer, "dashboards"],
|
|
1822
|
-
staff: [...rolePermissions.staff, "dashboards"],
|
|
1823
|
-
viewer: ["dashboards"]
|
|
1824
|
-
};
|
|
1825
|
-
|
|
1826
1789
|
// src/server/api-keys.ts
|
|
1827
|
-
import * as
|
|
1828
|
-
var ingestTrackerScopeSchema = /* @__PURE__ */ (() =>
|
|
1829
|
-
var tokenScopeInputSchema = /* @__PURE__ */ (() =>
|
|
1830
|
-
var tokenInputSchema = /* @__PURE__ */ (() =>
|
|
1831
|
-
name:
|
|
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),
|
|
1832
1795
|
project: identifier,
|
|
1833
1796
|
environment: environmentSchema,
|
|
1834
|
-
permissions:
|
|
1797
|
+
permissions: z14.array(permissionSchema).min(1),
|
|
1835
1798
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
1836
|
-
days:
|
|
1799
|
+
days: z14.number().int().min(1).max(90).default(30)
|
|
1837
1800
|
}).strict())();
|
|
1838
|
-
var tokenSchema = /* @__PURE__ */ (() =>
|
|
1839
|
-
id:
|
|
1840
|
-
name:
|
|
1841
|
-
project:
|
|
1801
|
+
var tokenSchema = /* @__PURE__ */ (() => z14.object({
|
|
1802
|
+
id: z14.string(),
|
|
1803
|
+
name: z14.string(),
|
|
1804
|
+
project: z14.string(),
|
|
1842
1805
|
environment: environmentSchema,
|
|
1843
1806
|
permissions: permissionListSchema,
|
|
1844
1807
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
1845
|
-
expiresAt:
|
|
1808
|
+
expiresAt: z14.number()
|
|
1846
1809
|
}))();
|
|
1847
|
-
var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token:
|
|
1848
|
-
var serviceKeyInputSchema = /* @__PURE__ */ (() =>
|
|
1849
|
-
name:
|
|
1850
|
-
permissions:
|
|
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(
|
|
1851
1814
|
(permissions) => !permissions.includes("access"),
|
|
1852
1815
|
"Service keys cannot hold the access permission"
|
|
1853
1816
|
),
|
|
1854
1817
|
/** Days until the first secret expires. Omit it for a key that never expires. */
|
|
1855
|
-
expiresInDays:
|
|
1818
|
+
expiresInDays: z14.number().int().min(1).max(3650).optional()
|
|
1856
1819
|
}).strict())();
|
|
1857
|
-
var serviceKeySchema = /* @__PURE__ */ (() =>
|
|
1858
|
-
id:
|
|
1859
|
-
organization:
|
|
1860
|
-
project:
|
|
1820
|
+
var serviceKeySchema = /* @__PURE__ */ (() => z14.object({
|
|
1821
|
+
id: z14.string().uuid(),
|
|
1822
|
+
organization: z14.string(),
|
|
1823
|
+
project: z14.string(),
|
|
1861
1824
|
environment: environmentSchema,
|
|
1862
|
-
name:
|
|
1825
|
+
name: z14.string(),
|
|
1863
1826
|
permissions: permissionListSchema,
|
|
1864
1827
|
/** The Clerk user ID of the administrator who created it. */
|
|
1865
|
-
createdBy:
|
|
1866
|
-
createdAt:
|
|
1828
|
+
createdBy: z14.string(),
|
|
1829
|
+
createdAt: z14.number(),
|
|
1867
1830
|
/** The latest use of any of its secrets, revoked ones included; null when none was used. */
|
|
1868
|
-
lastUsedAt:
|
|
1831
|
+
lastUsedAt: z14.number().nullable(),
|
|
1869
1832
|
/** Its working secrets, oldest first. Any of them authenticates the key. */
|
|
1870
|
-
secrets:
|
|
1833
|
+
secrets: z14.array(credentialSecretSchema)
|
|
1871
1834
|
}))();
|
|
1872
1835
|
var issuedServiceKeySchema = /* @__PURE__ */ (() => serviceKeySchema.extend({
|
|
1873
|
-
secret:
|
|
1874
|
-
token:
|
|
1836
|
+
secret: z14.string().uuid(),
|
|
1837
|
+
token: z14.string()
|
|
1875
1838
|
}))();
|
|
1876
|
-
var automationKeyPermissionSchema = /* @__PURE__ */ (() =>
|
|
1839
|
+
var automationKeyPermissionSchema = /* @__PURE__ */ (() => z14.enum([
|
|
1877
1840
|
"read",
|
|
1878
1841
|
"publish",
|
|
1879
1842
|
"inventory",
|
|
@@ -1881,61 +1844,61 @@ var automationKeyPermissionSchema = /* @__PURE__ */ (() => z15.enum([
|
|
|
1881
1844
|
"ingest",
|
|
1882
1845
|
"enroll"
|
|
1883
1846
|
]))();
|
|
1884
|
-
var automationKeyInputSchema = /* @__PURE__ */ (() =>
|
|
1885
|
-
name:
|
|
1886
|
-
permissions:
|
|
1847
|
+
var automationKeyInputSchema = /* @__PURE__ */ (() => z14.object({
|
|
1848
|
+
name: z14.string().trim().min(1).max(80),
|
|
1849
|
+
permissions: z14.array(automationKeyPermissionSchema).min(1),
|
|
1887
1850
|
/**
|
|
1888
1851
|
* The projects it reaches. Omit it for every project of the organization, current and future.
|
|
1889
1852
|
* An empty list, allowed only with `createProjects`, reaches only the projects it creates.
|
|
1890
1853
|
*/
|
|
1891
|
-
projects:
|
|
1854
|
+
projects: z14.array(identifier).max(100).optional(),
|
|
1892
1855
|
/** Whether it may create projects. A project it creates joins its `projects` list. */
|
|
1893
|
-
createProjects:
|
|
1856
|
+
createProjects: z14.boolean().default(false),
|
|
1894
1857
|
/** Days until the first secret expires. Omit it for a key that never expires. */
|
|
1895
|
-
expiresInDays:
|
|
1858
|
+
expiresInDays: z14.number().int().min(1).max(3650).optional()
|
|
1896
1859
|
}).strict().refine((key2) => key2.projects?.length !== 0 || key2.createProjects, {
|
|
1897
1860
|
message: "Choose a project, or let the key create projects",
|
|
1898
1861
|
path: ["projects"]
|
|
1899
1862
|
}))();
|
|
1900
|
-
var automationKeySchema = /* @__PURE__ */ (() =>
|
|
1901
|
-
id:
|
|
1902
|
-
organization:
|
|
1903
|
-
name:
|
|
1863
|
+
var automationKeySchema = /* @__PURE__ */ (() => z14.object({
|
|
1864
|
+
id: z14.string().uuid(),
|
|
1865
|
+
organization: z14.string(),
|
|
1866
|
+
name: z14.string(),
|
|
1904
1867
|
permissions: permissionListSchema,
|
|
1905
1868
|
/** The projects it reaches; null for every project of the organization. */
|
|
1906
|
-
projects:
|
|
1907
|
-
createProjects:
|
|
1869
|
+
projects: z14.array(z14.string()).nullable(),
|
|
1870
|
+
createProjects: z14.boolean(),
|
|
1908
1871
|
/** The Clerk user ID of the administrator who created it. */
|
|
1909
|
-
createdBy:
|
|
1910
|
-
createdAt:
|
|
1872
|
+
createdBy: z14.string(),
|
|
1873
|
+
createdAt: z14.number(),
|
|
1911
1874
|
/** The latest use of any of its secrets, revoked ones included; null when none was used. */
|
|
1912
|
-
lastUsedAt:
|
|
1875
|
+
lastUsedAt: z14.number().nullable(),
|
|
1913
1876
|
/** Its working secrets, oldest first. Any of them authenticates the key. */
|
|
1914
|
-
secrets:
|
|
1877
|
+
secrets: z14.array(credentialSecretSchema)
|
|
1915
1878
|
}))();
|
|
1916
1879
|
var issuedAutomationKeySchema = /* @__PURE__ */ (() => automationKeySchema.extend({
|
|
1917
|
-
secret:
|
|
1918
|
-
token:
|
|
1880
|
+
secret: z14.string().uuid(),
|
|
1881
|
+
token: z14.string()
|
|
1919
1882
|
}))();
|
|
1920
1883
|
|
|
1921
1884
|
// src/server/grants.ts
|
|
1922
|
-
import * as
|
|
1923
|
-
var grantSchema = /* @__PURE__ */ (() =>
|
|
1924
|
-
subject:
|
|
1925
|
-
roles:
|
|
1926
|
-
environments:
|
|
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)
|
|
1927
1890
|
}).strict())();
|
|
1928
|
-
var projectGrantSchema = /* @__PURE__ */ (() =>
|
|
1891
|
+
var projectGrantSchema = /* @__PURE__ */ (() => z15.object({
|
|
1929
1892
|
subject: grantSchema.shape.subject,
|
|
1930
|
-
roles:
|
|
1893
|
+
roles: z15.array(projectRoleSchema),
|
|
1931
1894
|
environments: grantSchema.shape.environments,
|
|
1932
1895
|
/**
|
|
1933
1896
|
* When the grant stops giving access (epoch ms). Omit it, or send null, for a grant without
|
|
1934
1897
|
* an end. An ended grant stays listed, so the project's access shows who had it and until when.
|
|
1935
1898
|
*/
|
|
1936
|
-
expiresAt:
|
|
1899
|
+
expiresAt: z15.number().int().positive().nullable().optional()
|
|
1937
1900
|
}).strict())();
|
|
1938
|
-
var grantRecordSchema = /* @__PURE__ */ (() =>
|
|
1901
|
+
var grantRecordSchema = /* @__PURE__ */ (() => z15.object({
|
|
1939
1902
|
...grantSchema.shape,
|
|
1940
1903
|
/**
|
|
1941
1904
|
* Every role the grant gives, `viewer` included, which `roles` leaves out. Absent from Relay
|
|
@@ -1943,21 +1906,21 @@ var grantRecordSchema = /* @__PURE__ */ (() => z16.object({
|
|
|
1943
1906
|
*
|
|
1944
1907
|
* @experimental
|
|
1945
1908
|
*/
|
|
1946
|
-
projectRoles:
|
|
1909
|
+
projectRoles: z15.array(z15.string()).optional(),
|
|
1947
1910
|
/**
|
|
1948
1911
|
* When the grant stops giving access (epoch ms), or null for no end. A grant past it is still
|
|
1949
1912
|
* listed and gives no permission.
|
|
1950
1913
|
*
|
|
1951
1914
|
* @experimental
|
|
1952
1915
|
*/
|
|
1953
|
-
expiresAt:
|
|
1916
|
+
expiresAt: z15.number().nullable().optional()
|
|
1954
1917
|
}))();
|
|
1955
|
-
var teamSchema = /* @__PURE__ */ (() =>
|
|
1956
|
-
|
|
1918
|
+
var teamSchema = /* @__PURE__ */ (() => z15.array(
|
|
1919
|
+
z15.object({ id: z15.string(), label: z15.string() })
|
|
1957
1920
|
))();
|
|
1958
1921
|
|
|
1959
1922
|
// src/server/endpoints/credentials.ts
|
|
1960
|
-
import * as
|
|
1923
|
+
import * as z16 from "zod";
|
|
1961
1924
|
var TOKEN_PATTERN = ".+";
|
|
1962
1925
|
var grantEndpoints = /* @__PURE__ */ (() => ({
|
|
1963
1926
|
list: managementEndpoint({
|
|
@@ -1966,7 +1929,7 @@ var grantEndpoints = /* @__PURE__ */ (() => ({
|
|
|
1966
1929
|
parameters: {},
|
|
1967
1930
|
permission: { organization: "admin" },
|
|
1968
1931
|
ledger: null,
|
|
1969
|
-
result: () =>
|
|
1932
|
+
result: () => z16.array(grantRecordSchema)
|
|
1970
1933
|
}),
|
|
1971
1934
|
set: managementEndpoint({
|
|
1972
1935
|
method: "PUT",
|
|
@@ -1984,7 +1947,7 @@ var tokenEndpoints = /* @__PURE__ */ (() => ({
|
|
|
1984
1947
|
parameters: {},
|
|
1985
1948
|
permission: { handler: "tokens" },
|
|
1986
1949
|
ledger: null,
|
|
1987
|
-
result: () =>
|
|
1950
|
+
result: () => z16.array(tokenSchema)
|
|
1988
1951
|
}),
|
|
1989
1952
|
create: managementEndpoint({
|
|
1990
1953
|
method: "POST",
|
|
@@ -2017,7 +1980,7 @@ var tokenEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2017
1980
|
parameters: {},
|
|
2018
1981
|
permission: { handler: "tokens" },
|
|
2019
1982
|
ledger: null,
|
|
2020
|
-
result: () =>
|
|
1983
|
+
result: () => z16.unknown()
|
|
2021
1984
|
})
|
|
2022
1985
|
}))();
|
|
2023
1986
|
var key = { key: ID_PATTERN };
|
|
@@ -2029,7 +1992,7 @@ var serviceKeyEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2029
1992
|
parameters: {},
|
|
2030
1993
|
permission: { organization: "service-keys" },
|
|
2031
1994
|
ledger: null,
|
|
2032
|
-
result: () =>
|
|
1995
|
+
result: () => z16.array(serviceKeySchema)
|
|
2033
1996
|
}),
|
|
2034
1997
|
create: managementEndpoint({
|
|
2035
1998
|
method: "POST",
|
|
@@ -2061,7 +2024,7 @@ var serviceKeyEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2061
2024
|
parameters: key,
|
|
2062
2025
|
permission: { organization: "service-keys" },
|
|
2063
2026
|
ledger: null,
|
|
2064
|
-
result: () =>
|
|
2027
|
+
result: () => z16.null()
|
|
2065
2028
|
})
|
|
2066
2029
|
}))();
|
|
2067
2030
|
var automationKeyEndpoints = /* @__PURE__ */ (() => ({
|
|
@@ -2071,7 +2034,7 @@ var automationKeyEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2071
2034
|
parameters: {},
|
|
2072
2035
|
permission: { organization: "automation-keys" },
|
|
2073
2036
|
ledger: null,
|
|
2074
|
-
result: () =>
|
|
2037
|
+
result: () => z16.array(automationKeySchema)
|
|
2075
2038
|
}),
|
|
2076
2039
|
create: managementEndpoint({
|
|
2077
2040
|
method: "POST",
|
|
@@ -2103,12 +2066,12 @@ var automationKeyEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2103
2066
|
parameters: key,
|
|
2104
2067
|
permission: { organization: "automation-keys" },
|
|
2105
2068
|
ledger: null,
|
|
2106
|
-
result: () =>
|
|
2069
|
+
result: () => z16.null()
|
|
2107
2070
|
})
|
|
2108
2071
|
}))();
|
|
2109
2072
|
|
|
2110
2073
|
// src/server/endpoints/deployments.ts
|
|
2111
|
-
import * as
|
|
2074
|
+
import * as z17 from "zod";
|
|
2112
2075
|
var deployment = { deployment: ID_PATTERN };
|
|
2113
2076
|
var deploymentEndpoints = /* @__PURE__ */ (() => ({
|
|
2114
2077
|
preview: managementEndpoint({
|
|
@@ -2126,7 +2089,7 @@ var deploymentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2126
2089
|
parameters: {},
|
|
2127
2090
|
permission: "read",
|
|
2128
2091
|
ledger: "deployments.list",
|
|
2129
|
-
result: () =>
|
|
2092
|
+
result: () => z17.array(deploymentRecordSchema)
|
|
2130
2093
|
}),
|
|
2131
2094
|
history: managementEndpoint({
|
|
2132
2095
|
method: "GET",
|
|
@@ -2227,8 +2190,8 @@ var deploymentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2227
2190
|
}))();
|
|
2228
2191
|
|
|
2229
2192
|
// src/server/resource-lifecycle.ts
|
|
2230
|
-
import * as
|
|
2231
|
-
var resourceLifecycleKindSchema = /* @__PURE__ */ (() =>
|
|
2193
|
+
import * as z18 from "zod";
|
|
2194
|
+
var resourceLifecycleKindSchema = /* @__PURE__ */ (() => z18.enum([
|
|
2232
2195
|
"tracker",
|
|
2233
2196
|
"referral",
|
|
2234
2197
|
"leaderboard",
|
|
@@ -2238,51 +2201,51 @@ var resourceLifecycleKindSchema = /* @__PURE__ */ (() => z19.enum([
|
|
|
2238
2201
|
"image",
|
|
2239
2202
|
"point-ledger"
|
|
2240
2203
|
]))();
|
|
2241
|
-
var managedResourceSchema = /* @__PURE__ */ (() =>
|
|
2204
|
+
var managedResourceSchema = /* @__PURE__ */ (() => z18.object({
|
|
2242
2205
|
kind: resourceLifecycleKindSchema,
|
|
2243
2206
|
id: identifier,
|
|
2244
2207
|
key: identifier.nullable(),
|
|
2245
|
-
title:
|
|
2246
|
-
archivedAt:
|
|
2208
|
+
title: z18.string(),
|
|
2209
|
+
archivedAt: z18.number().int().nonnegative().nullable()
|
|
2247
2210
|
}))();
|
|
2248
|
-
var resourceLifecycleInputSchema = /* @__PURE__ */ (() =>
|
|
2249
|
-
actionId:
|
|
2211
|
+
var resourceLifecycleInputSchema = /* @__PURE__ */ (() => z18.object({
|
|
2212
|
+
actionId: z18.string().uuid(),
|
|
2250
2213
|
kind: resourceLifecycleKindSchema,
|
|
2251
2214
|
resource: identifier,
|
|
2252
|
-
archived:
|
|
2215
|
+
archived: z18.boolean(),
|
|
2253
2216
|
reason: lifecycleReasonSchema,
|
|
2254
|
-
expectedArchivedAt:
|
|
2217
|
+
expectedArchivedAt: z18.number().int().nonnegative().nullable().optional()
|
|
2255
2218
|
}).strict())();
|
|
2256
|
-
var resourceLifecycleResultSchema = /* @__PURE__ */ (() =>
|
|
2219
|
+
var resourceLifecycleResultSchema = /* @__PURE__ */ (() => z18.object({
|
|
2257
2220
|
resource: managedResourceSchema,
|
|
2258
|
-
changed:
|
|
2221
|
+
changed: z18.boolean()
|
|
2259
2222
|
}))();
|
|
2260
2223
|
var managedOfferSchema = /* @__PURE__ */ (() => managedResourceSchema.extend({
|
|
2261
|
-
kind:
|
|
2224
|
+
kind: z18.literal("offer")
|
|
2262
2225
|
}))();
|
|
2263
2226
|
var managedTieredRewardSchema = /* @__PURE__ */ (() => managedResourceSchema.extend({
|
|
2264
|
-
kind:
|
|
2227
|
+
kind: z18.literal("tiered-reward")
|
|
2265
2228
|
}))();
|
|
2266
|
-
var managedResourceListSchema = /* @__PURE__ */ (() =>
|
|
2267
|
-
resources:
|
|
2268
|
-
offers:
|
|
2229
|
+
var managedResourceListSchema = /* @__PURE__ */ (() => z18.object({
|
|
2230
|
+
resources: z18.array(managedResourceSchema),
|
|
2231
|
+
offers: z18.array(managedOfferSchema).default([]),
|
|
2269
2232
|
/** Absent from a Relay older than tiered reward archiving; treat it as none. */
|
|
2270
|
-
tieredRewards:
|
|
2233
|
+
tieredRewards: z18.array(managedTieredRewardSchema).optional()
|
|
2271
2234
|
}))();
|
|
2272
|
-
var offerLifecycleResultSchema = /* @__PURE__ */ (() =>
|
|
2235
|
+
var offerLifecycleResultSchema = /* @__PURE__ */ (() => z18.object({
|
|
2273
2236
|
resource: managedOfferSchema,
|
|
2274
|
-
changed:
|
|
2237
|
+
changed: z18.boolean()
|
|
2275
2238
|
}))();
|
|
2276
|
-
var offerLifecycleInputSchema = /* @__PURE__ */ (() =>
|
|
2277
|
-
actionId:
|
|
2239
|
+
var offerLifecycleInputSchema = /* @__PURE__ */ (() => z18.strictObject({
|
|
2240
|
+
actionId: z18.string().uuid(),
|
|
2278
2241
|
offer: identifier,
|
|
2279
|
-
archived:
|
|
2280
|
-
reason:
|
|
2281
|
-
expectedArchivedAt:
|
|
2242
|
+
archived: z18.boolean(),
|
|
2243
|
+
reason: z18.string().trim().min(1).max(500),
|
|
2244
|
+
expectedArchivedAt: z18.number().int().nonnegative().nullable().optional()
|
|
2282
2245
|
}))();
|
|
2283
|
-
var tieredRewardLifecycleResultSchema = /* @__PURE__ */ (() =>
|
|
2246
|
+
var tieredRewardLifecycleResultSchema = /* @__PURE__ */ (() => z18.object({
|
|
2284
2247
|
resource: managedTieredRewardSchema,
|
|
2285
|
-
changed:
|
|
2248
|
+
changed: z18.boolean()
|
|
2286
2249
|
}))();
|
|
2287
2250
|
var tieredRewardLifecycleInputSchema = /* @__PURE__ */ (() => offerLifecycleInputSchema.omit({ offer: true }).extend({ reward: identifier }))();
|
|
2288
2251
|
var resourceLifecyclePaths = {
|
|
@@ -2302,7 +2265,7 @@ var resourceArchiveInputSchema = /* @__PURE__ */ (() => resourceLifecycleInputSc
|
|
|
2302
2265
|
}))();
|
|
2303
2266
|
|
|
2304
2267
|
// src/server/endpoints/engagement.ts
|
|
2305
|
-
import * as
|
|
2268
|
+
import * as z19 from "zod";
|
|
2306
2269
|
var resource = { resource: ID_PATTERN };
|
|
2307
2270
|
var engagementEndpoints = /* @__PURE__ */ (() => ({
|
|
2308
2271
|
list: managementEndpoint({
|
|
@@ -2311,7 +2274,7 @@ var engagementEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2311
2274
|
parameters: {},
|
|
2312
2275
|
permission: "read",
|
|
2313
2276
|
ledger: "engagement.list",
|
|
2314
|
-
result: () =>
|
|
2277
|
+
result: () => z19.array(engagementRuleSchema)
|
|
2315
2278
|
}),
|
|
2316
2279
|
page: managementEndpoint({
|
|
2317
2280
|
method: "GET",
|
|
@@ -2410,20 +2373,42 @@ var contentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2410
2373
|
}))();
|
|
2411
2374
|
|
|
2412
2375
|
// src/server/entitlements.ts
|
|
2413
|
-
import * as
|
|
2414
|
-
var managedEntitlementQuerySchema = /* @__PURE__ */ (() =>
|
|
2415
|
-
q:
|
|
2416
|
-
status:
|
|
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(),
|
|
2417
2380
|
limit: pageLimit,
|
|
2418
2381
|
cursor: pageCursorSchema.optional()
|
|
2419
2382
|
}))();
|
|
2420
|
-
var
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2383
|
+
var EntitlementSourceKind = {
|
|
2384
|
+
/** A quest completion: `id` is the quest. */
|
|
2385
|
+
Quest: "quest",
|
|
2386
|
+
/** A leaderboard settlement's prize: `id` is the board. */
|
|
2387
|
+
Leaderboard: "leaderboard",
|
|
2388
|
+
/** A referral program's reward: `id` is the program, `invitee` the friend. */
|
|
2389
|
+
Referral: "referral",
|
|
2390
|
+
/** An offer redemption: `id` is the offer. */
|
|
2391
|
+
Offer: "offer"
|
|
2392
|
+
};
|
|
2393
|
+
var entitlementSourceSchema = /* @__PURE__ */ (() => z20.object({
|
|
2394
|
+
kind: z20.string(),
|
|
2395
|
+
id: identifier,
|
|
2396
|
+
completion: identifier.nullish(),
|
|
2397
|
+
attempt: identifier.nullish(),
|
|
2398
|
+
invitee: identifier.nullish(),
|
|
2399
|
+
redemption: identifier.nullish()
|
|
2400
|
+
}).loose())();
|
|
2401
|
+
var entitlementProvenanceSchema = /* @__PURE__ */ (() => z20.object({
|
|
2402
|
+
earnedAt: z20.number().nullish(),
|
|
2403
|
+
source: entitlementSourceSchema.nullish()
|
|
2404
|
+
}))();
|
|
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()
|
|
2410
|
+
}))();
|
|
2411
|
+
var managedEntitlementSchema = /* @__PURE__ */ (() => z20.object({
|
|
2427
2412
|
entitlement: entitlementSchema,
|
|
2428
2413
|
person: personSchema
|
|
2429
2414
|
}))();
|
|
@@ -2514,69 +2499,69 @@ var entitlementEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2514
2499
|
}))();
|
|
2515
2500
|
|
|
2516
2501
|
// src/server/galleries.ts
|
|
2517
|
-
import * as
|
|
2518
|
-
var gallerySchema = /* @__PURE__ */ (() =>
|
|
2502
|
+
import * as z21 from "zod";
|
|
2503
|
+
var gallerySchema = /* @__PURE__ */ (() => z21.object({
|
|
2519
2504
|
/** The quest's ID. */
|
|
2520
2505
|
quest: identifier,
|
|
2521
2506
|
/** The key the quest is written under in code. */
|
|
2522
|
-
key:
|
|
2523
|
-
title:
|
|
2524
|
-
kind:
|
|
2525
|
-
photos:
|
|
2526
|
-
hiddenPhotos:
|
|
2527
|
-
}))();
|
|
2528
|
-
var galleryListSchema = /* @__PURE__ */ (() =>
|
|
2529
|
-
var galleryHiddenFilterSchema = /* @__PURE__ */ (() =>
|
|
2530
|
-
var galleryPhotoQuerySchema = /* @__PURE__ */ (() =>
|
|
2531
|
-
quest:
|
|
2532
|
-
day:
|
|
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(),
|
|
2533
2518
|
hidden: galleryHiddenFilterSchema.optional(),
|
|
2534
2519
|
winners: booleanQuery.optional(),
|
|
2535
2520
|
cursor: pageCursorSchema.optional(),
|
|
2536
2521
|
limit: pageLimit
|
|
2537
2522
|
}))();
|
|
2538
|
-
var galleryExportQuerySchema = /* @__PURE__ */ (() =>
|
|
2539
|
-
quest:
|
|
2540
|
-
day:
|
|
2523
|
+
var galleryExportQuerySchema = /* @__PURE__ */ (() => z21.strictObject({
|
|
2524
|
+
quest: z21.string().min(1).max(200).optional(),
|
|
2525
|
+
day: z21.iso.date().optional(),
|
|
2541
2526
|
includeHidden: booleanQuery.optional(),
|
|
2542
2527
|
cursor: pageCursorSchema.optional()
|
|
2543
2528
|
}))();
|
|
2544
2529
|
var galleryPhotoHiddenSchema = evidenceRedactionSchema;
|
|
2545
|
-
var galleryWinnerRewardSchema = /* @__PURE__ */ (() =>
|
|
2530
|
+
var galleryWinnerRewardSchema = /* @__PURE__ */ (() => z21.object({
|
|
2546
2531
|
quest: identifier,
|
|
2547
2532
|
attempt: identifier
|
|
2548
2533
|
}))();
|
|
2549
|
-
var galleryWinnerSchema = /* @__PURE__ */ (() =>
|
|
2550
|
-
at:
|
|
2551
|
-
actor:
|
|
2534
|
+
var galleryWinnerSchema = /* @__PURE__ */ (() => z21.object({
|
|
2535
|
+
at: z21.number(),
|
|
2536
|
+
actor: z21.string().nullable(),
|
|
2552
2537
|
reward: galleryWinnerRewardSchema.nullable()
|
|
2553
2538
|
}))();
|
|
2554
|
-
var galleryPhotoSchema = /* @__PURE__ */ (() =>
|
|
2539
|
+
var galleryPhotoSchema = /* @__PURE__ */ (() => z21.object({
|
|
2555
2540
|
attempt: identifier,
|
|
2556
2541
|
quest: identifier,
|
|
2557
2542
|
member: identifier,
|
|
2558
|
-
name:
|
|
2543
|
+
name: z21.string().nullable(),
|
|
2559
2544
|
evidence: identifier,
|
|
2560
|
-
submittedAt:
|
|
2561
|
-
decidedAt:
|
|
2545
|
+
submittedAt: z21.number().int().nonnegative(),
|
|
2546
|
+
decidedAt: z21.number().int().nonnegative().nullable(),
|
|
2562
2547
|
hidden: galleryPhotoHiddenSchema.nullable(),
|
|
2563
2548
|
winner: galleryWinnerSchema.nullable()
|
|
2564
2549
|
}))();
|
|
2565
|
-
var galleryPhotoPageSchema = /* @__PURE__ */ (() =>
|
|
2566
|
-
items:
|
|
2550
|
+
var galleryPhotoPageSchema = /* @__PURE__ */ (() => z21.object({
|
|
2551
|
+
items: z21.array(galleryPhotoSchema),
|
|
2567
2552
|
nextCursor: pageCursorSchema.nullable()
|
|
2568
2553
|
}))();
|
|
2569
2554
|
var galleryPhotoHideInputSchema = staffReasonInputSchema;
|
|
2570
|
-
var galleryPhotoHideResultSchema = /* @__PURE__ */ (() =>
|
|
2555
|
+
var galleryPhotoHideResultSchema = /* @__PURE__ */ (() => z21.object({
|
|
2571
2556
|
attempt: identifier,
|
|
2572
2557
|
hidden: galleryPhotoHiddenSchema.nullable()
|
|
2573
2558
|
}))();
|
|
2574
|
-
var galleryWinnerMarkInputSchema = /* @__PURE__ */ (() =>
|
|
2559
|
+
var galleryWinnerMarkInputSchema = /* @__PURE__ */ (() => z21.object({
|
|
2575
2560
|
actionId: identifier,
|
|
2576
|
-
reward:
|
|
2561
|
+
reward: z21.object({ quest: identifier }).strict().optional()
|
|
2577
2562
|
}).strict())();
|
|
2578
|
-
var galleryWinnerUnmarkInputSchema = /* @__PURE__ */ (() =>
|
|
2579
|
-
var galleryWinnerResultSchema = /* @__PURE__ */ (() =>
|
|
2563
|
+
var galleryWinnerUnmarkInputSchema = /* @__PURE__ */ (() => z21.object({ actionId: identifier }).strict())();
|
|
2564
|
+
var galleryWinnerResultSchema = /* @__PURE__ */ (() => z21.object({
|
|
2580
2565
|
attempt: identifier,
|
|
2581
2566
|
winner: galleryWinnerSchema.nullable()
|
|
2582
2567
|
}))();
|
|
@@ -2730,7 +2715,7 @@ var groupEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2730
2715
|
}))();
|
|
2731
2716
|
|
|
2732
2717
|
// src/server/endpoints/hosting.ts
|
|
2733
|
-
import * as
|
|
2718
|
+
import * as z22 from "zod";
|
|
2734
2719
|
var liveAppEndpoints = /* @__PURE__ */ (() => ({
|
|
2735
2720
|
get: managementEndpoint({
|
|
2736
2721
|
method: "GET",
|
|
@@ -2860,6 +2845,14 @@ var storageEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2860
2845
|
ledger: null,
|
|
2861
2846
|
result: () => appStorageValueSchema
|
|
2862
2847
|
}),
|
|
2848
|
+
bytes: managementEndpoint({
|
|
2849
|
+
method: "GET",
|
|
2850
|
+
path: "/storage/kv/{name}/bytes",
|
|
2851
|
+
parameters: { name: HOSTING_NAME_PATTERN },
|
|
2852
|
+
permission: "publish",
|
|
2853
|
+
ledger: null,
|
|
2854
|
+
result: () => appStorageValueBytesSchema
|
|
2855
|
+
}),
|
|
2863
2856
|
// A SQL or KV clear's result, told apart by its `kind`.
|
|
2864
2857
|
clear: managementEndpoint({
|
|
2865
2858
|
method: "POST",
|
|
@@ -2867,7 +2860,7 @@ var storageEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2867
2860
|
parameters: { kind: "kv|sql", name: HOSTING_NAME_PATTERN },
|
|
2868
2861
|
permission: "publish",
|
|
2869
2862
|
ledger: null,
|
|
2870
|
-
result: () =>
|
|
2863
|
+
result: () => z22.discriminatedUnion("kind", [
|
|
2871
2864
|
appStorageSqlClearResultSchema,
|
|
2872
2865
|
appStorageKvClearResultSchema
|
|
2873
2866
|
])
|
|
@@ -2932,7 +2925,7 @@ var repositoryEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2932
2925
|
parameters: {},
|
|
2933
2926
|
permission: { handler: "read" },
|
|
2934
2927
|
ledger: null,
|
|
2935
|
-
result: () =>
|
|
2928
|
+
result: () => z22.unknown()
|
|
2936
2929
|
}),
|
|
2937
2930
|
create: managementEndpoint({
|
|
2938
2931
|
method: "POST",
|
|
@@ -2940,7 +2933,7 @@ var repositoryEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2940
2933
|
parameters: {},
|
|
2941
2934
|
permission: { handler: "publish" },
|
|
2942
2935
|
ledger: null,
|
|
2943
|
-
result: () =>
|
|
2936
|
+
result: () => z22.unknown()
|
|
2944
2937
|
}),
|
|
2945
2938
|
starter: managementEndpoint({
|
|
2946
2939
|
method: "GET",
|
|
@@ -2948,7 +2941,7 @@ var repositoryEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2948
2941
|
parameters: { starter: SEGMENT_PATTERN },
|
|
2949
2942
|
permission: { handler: "read" },
|
|
2950
2943
|
ledger: null,
|
|
2951
|
-
result: () =>
|
|
2944
|
+
result: () => z22.unknown()
|
|
2952
2945
|
})
|
|
2953
2946
|
}))();
|
|
2954
2947
|
var buildEndpoints = /* @__PURE__ */ (() => ({
|
|
@@ -2958,7 +2951,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2958
2951
|
parameters: {},
|
|
2959
2952
|
permission: { handler: "read" },
|
|
2960
2953
|
ledger: null,
|
|
2961
|
-
result: () =>
|
|
2954
|
+
result: () => z22.unknown()
|
|
2962
2955
|
}),
|
|
2963
2956
|
start: managementEndpoint({
|
|
2964
2957
|
method: "POST",
|
|
@@ -2966,7 +2959,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2966
2959
|
parameters: {},
|
|
2967
2960
|
permission: { handler: "publish" },
|
|
2968
2961
|
ledger: null,
|
|
2969
|
-
result: () =>
|
|
2962
|
+
result: () => z22.unknown()
|
|
2970
2963
|
}),
|
|
2971
2964
|
// A server-sent event stream of the repository's builds.
|
|
2972
2965
|
events: managementEndpoint({
|
|
@@ -2983,7 +2976,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2983
2976
|
parameters: { build: UUID_PATTERN },
|
|
2984
2977
|
permission: { handler: "read" },
|
|
2985
2978
|
ledger: null,
|
|
2986
|
-
result: () =>
|
|
2979
|
+
result: () => z22.unknown()
|
|
2987
2980
|
}),
|
|
2988
2981
|
logs: managementEndpoint({
|
|
2989
2982
|
method: "GET",
|
|
@@ -2991,7 +2984,7 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
|
|
|
2991
2984
|
parameters: { build: UUID_PATTERN },
|
|
2992
2985
|
permission: { handler: "read" },
|
|
2993
2986
|
ledger: null,
|
|
2994
|
-
result: () =>
|
|
2987
|
+
result: () => z22.unknown()
|
|
2995
2988
|
}),
|
|
2996
2989
|
// A WebP image.
|
|
2997
2990
|
screenshot: managementEndpoint({
|
|
@@ -3003,6 +2996,16 @@ var buildEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3003
2996
|
result: "raw"
|
|
3004
2997
|
})
|
|
3005
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
|
+
}))();
|
|
3006
3009
|
var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
3007
3010
|
access: managementEndpoint({
|
|
3008
3011
|
method: "GET",
|
|
@@ -3010,7 +3013,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3010
3013
|
parameters: {},
|
|
3011
3014
|
permission: { handler: "read" },
|
|
3012
3015
|
ledger: null,
|
|
3013
|
-
result: () =>
|
|
3016
|
+
result: () => z22.unknown()
|
|
3014
3017
|
}),
|
|
3015
3018
|
setAccess: managementEndpoint({
|
|
3016
3019
|
method: "PUT",
|
|
@@ -3018,7 +3021,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3018
3021
|
parameters: {},
|
|
3019
3022
|
permission: { handler: "publish" },
|
|
3020
3023
|
ledger: null,
|
|
3021
|
-
result: () =>
|
|
3024
|
+
result: () => z22.unknown()
|
|
3022
3025
|
}),
|
|
3023
3026
|
// A one-time link that opens the staging app with the caller's Console session.
|
|
3024
3027
|
link: managementEndpoint({
|
|
@@ -3027,7 +3030,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3027
3030
|
parameters: {},
|
|
3028
3031
|
permission: { handler: "read" },
|
|
3029
3032
|
ledger: null,
|
|
3030
|
-
result: () =>
|
|
3033
|
+
result: () => z22.unknown()
|
|
3031
3034
|
}),
|
|
3032
3035
|
serverKeys: managementEndpoint({
|
|
3033
3036
|
method: "GET",
|
|
@@ -3035,7 +3038,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3035
3038
|
parameters: {},
|
|
3036
3039
|
permission: { handler: "read" },
|
|
3037
3040
|
ledger: null,
|
|
3038
|
-
result: () =>
|
|
3041
|
+
result: () => z22.unknown()
|
|
3039
3042
|
}),
|
|
3040
3043
|
createServerKey: managementEndpoint({
|
|
3041
3044
|
method: "POST",
|
|
@@ -3043,7 +3046,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3043
3046
|
parameters: {},
|
|
3044
3047
|
permission: { handler: "publish" },
|
|
3045
3048
|
ledger: null,
|
|
3046
|
-
result: () =>
|
|
3049
|
+
result: () => z22.unknown()
|
|
3047
3050
|
}),
|
|
3048
3051
|
revokeServerKey: managementEndpoint({
|
|
3049
3052
|
method: "DELETE",
|
|
@@ -3051,7 +3054,7 @@ var stagingEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3051
3054
|
parameters: { key: UUID_PATTERN },
|
|
3052
3055
|
permission: { handler: "publish" },
|
|
3053
3056
|
ledger: null,
|
|
3054
|
-
result: () =>
|
|
3057
|
+
result: () => z22.unknown()
|
|
3055
3058
|
})
|
|
3056
3059
|
}))();
|
|
3057
3060
|
var developmentEndpoints = /* @__PURE__ */ (() => ({
|
|
@@ -3061,7 +3064,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3061
3064
|
parameters: {},
|
|
3062
3065
|
permission: { handler: "session" },
|
|
3063
3066
|
ledger: null,
|
|
3064
|
-
result: () =>
|
|
3067
|
+
result: () => z22.unknown()
|
|
3065
3068
|
}),
|
|
3066
3069
|
revokeKey: managementEndpoint({
|
|
3067
3070
|
method: "DELETE",
|
|
@@ -3069,7 +3072,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3069
3072
|
parameters: { key: UUID_PATTERN },
|
|
3070
3073
|
permission: { handler: "session" },
|
|
3071
3074
|
ledger: null,
|
|
3072
|
-
result: () =>
|
|
3075
|
+
result: () => z22.unknown()
|
|
3073
3076
|
}),
|
|
3074
3077
|
startSession: managementEndpoint({
|
|
3075
3078
|
method: "POST",
|
|
@@ -3077,7 +3080,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3077
3080
|
parameters: {},
|
|
3078
3081
|
permission: { handler: "publish" },
|
|
3079
3082
|
ledger: null,
|
|
3080
|
-
result: () =>
|
|
3083
|
+
result: () => z22.unknown()
|
|
3081
3084
|
}),
|
|
3082
3085
|
renewSession: managementEndpoint({
|
|
3083
3086
|
method: "PUT",
|
|
@@ -3085,7 +3088,7 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3085
3088
|
parameters: {},
|
|
3086
3089
|
permission: { handler: "publish" },
|
|
3087
3090
|
ledger: null,
|
|
3088
|
-
result: () =>
|
|
3091
|
+
result: () => z22.unknown()
|
|
3089
3092
|
}),
|
|
3090
3093
|
stopSession: managementEndpoint({
|
|
3091
3094
|
method: "DELETE",
|
|
@@ -3093,12 +3096,12 @@ var developmentEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3093
3096
|
parameters: {},
|
|
3094
3097
|
permission: { handler: "publish" },
|
|
3095
3098
|
ledger: null,
|
|
3096
|
-
result: () =>
|
|
3099
|
+
result: () => z22.unknown()
|
|
3097
3100
|
})
|
|
3098
3101
|
}))();
|
|
3099
3102
|
|
|
3100
3103
|
// src/server/endpoints/identity-integrations.ts
|
|
3101
|
-
import * as
|
|
3104
|
+
import * as z23 from "zod";
|
|
3102
3105
|
var integration = { integration: ID_PATTERN };
|
|
3103
3106
|
var secret2 = { integration: ID_PATTERN, secret: ID_PATTERN };
|
|
3104
3107
|
var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
|
|
@@ -3108,7 +3111,7 @@ var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3108
3111
|
parameters: {},
|
|
3109
3112
|
permission: { organization: "identity-reader" },
|
|
3110
3113
|
ledger: null,
|
|
3111
|
-
result: () =>
|
|
3114
|
+
result: () => z23.array(identityIntegrationSchema)
|
|
3112
3115
|
}),
|
|
3113
3116
|
kinds: managementEndpoint({
|
|
3114
3117
|
method: "GET",
|
|
@@ -3116,7 +3119,7 @@ var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3116
3119
|
parameters: {},
|
|
3117
3120
|
permission: { organization: "identity-reader" },
|
|
3118
3121
|
ledger: null,
|
|
3119
|
-
result: () =>
|
|
3122
|
+
result: () => z23.array(identityKindClaimSchema)
|
|
3120
3123
|
}),
|
|
3121
3124
|
create: managementEndpoint({
|
|
3122
3125
|
method: "POST",
|
|
@@ -3172,12 +3175,12 @@ var identityIntegrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3172
3175
|
parameters: integration,
|
|
3173
3176
|
permission: { organization: "identity-admin" },
|
|
3174
3177
|
ledger: null,
|
|
3175
|
-
result: () =>
|
|
3178
|
+
result: () => z23.null()
|
|
3176
3179
|
})
|
|
3177
3180
|
}))();
|
|
3178
3181
|
|
|
3179
3182
|
// src/server/endpoints/integrations.ts
|
|
3180
|
-
import * as
|
|
3183
|
+
import * as z24 from "zod";
|
|
3181
3184
|
var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
3182
3185
|
// The list may name providers a release doesn't know, so the client reads it entry by entry.
|
|
3183
3186
|
list: managementEndpoint({
|
|
@@ -3186,7 +3189,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3186
3189
|
parameters: {},
|
|
3187
3190
|
permission: "read",
|
|
3188
3191
|
ledger: null,
|
|
3189
|
-
result: () =>
|
|
3192
|
+
result: () => z24.array(z24.unknown())
|
|
3190
3193
|
}),
|
|
3191
3194
|
discordServers: managementEndpoint({
|
|
3192
3195
|
method: "GET",
|
|
@@ -3234,7 +3237,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3234
3237
|
parameters: {},
|
|
3235
3238
|
permission: "read",
|
|
3236
3239
|
ledger: null,
|
|
3237
|
-
result: () =>
|
|
3240
|
+
result: () => z24.unknown()
|
|
3238
3241
|
}),
|
|
3239
3242
|
connectDiscord: managementEndpoint({
|
|
3240
3243
|
method: "POST",
|
|
@@ -3242,7 +3245,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3242
3245
|
parameters: {},
|
|
3243
3246
|
permission: { handler: "integration-admin" },
|
|
3244
3247
|
ledger: null,
|
|
3245
|
-
result: () =>
|
|
3248
|
+
result: () => z24.unknown()
|
|
3246
3249
|
}),
|
|
3247
3250
|
discordLink: managementEndpoint({
|
|
3248
3251
|
method: "POST",
|
|
@@ -3250,7 +3253,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3250
3253
|
parameters: {},
|
|
3251
3254
|
permission: { handler: "integration-admin" },
|
|
3252
3255
|
ledger: null,
|
|
3253
|
-
result: () =>
|
|
3256
|
+
result: () => z24.unknown()
|
|
3254
3257
|
}),
|
|
3255
3258
|
completeDiscord: managementEndpoint({
|
|
3256
3259
|
method: "POST",
|
|
@@ -3258,7 +3261,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3258
3261
|
parameters: {},
|
|
3259
3262
|
permission: { handler: "integration-admin" },
|
|
3260
3263
|
ledger: null,
|
|
3261
|
-
result: () =>
|
|
3264
|
+
result: () => z24.unknown()
|
|
3262
3265
|
}),
|
|
3263
3266
|
refreshDiscord: managementEndpoint({
|
|
3264
3267
|
method: "POST",
|
|
@@ -3266,7 +3269,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3266
3269
|
parameters: {},
|
|
3267
3270
|
permission: { handler: "integration-admin" },
|
|
3268
3271
|
ledger: null,
|
|
3269
|
-
result: () =>
|
|
3272
|
+
result: () => z24.unknown()
|
|
3270
3273
|
}),
|
|
3271
3274
|
disconnectDiscord: managementEndpoint({
|
|
3272
3275
|
method: "DELETE",
|
|
@@ -3274,7 +3277,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3274
3277
|
parameters: {},
|
|
3275
3278
|
permission: { handler: "integration-admin" },
|
|
3276
3279
|
ledger: null,
|
|
3277
|
-
result: () =>
|
|
3280
|
+
result: () => z24.unknown()
|
|
3278
3281
|
}),
|
|
3279
3282
|
// The Discord event receiver's state, when the backend runs it.
|
|
3280
3283
|
discordEvents: managementEndpoint({
|
|
@@ -3283,7 +3286,7 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3283
3286
|
parameters: {},
|
|
3284
3287
|
permission: "read",
|
|
3285
3288
|
ledger: null,
|
|
3286
|
-
result: () =>
|
|
3289
|
+
result: () => z24.unknown()
|
|
3287
3290
|
}),
|
|
3288
3291
|
// Always 403: Domino restarts the receiver itself.
|
|
3289
3292
|
restartDiscordEvents: managementEndpoint({
|
|
@@ -3292,63 +3295,63 @@ var integrationEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3292
3295
|
parameters: {},
|
|
3293
3296
|
permission: "read",
|
|
3294
3297
|
ledger: null,
|
|
3295
|
-
result: () =>
|
|
3298
|
+
result: () => z24.unknown()
|
|
3296
3299
|
})
|
|
3297
3300
|
}))();
|
|
3298
3301
|
|
|
3299
3302
|
// src/server/inventory-items.ts
|
|
3300
|
-
import * as
|
|
3301
|
-
var inventoryItemStateSchema = /* @__PURE__ */ (() =>
|
|
3303
|
+
import * as z25 from "zod";
|
|
3304
|
+
var inventoryItemStateSchema = /* @__PURE__ */ (() => z25.object({
|
|
3302
3305
|
item: identifier,
|
|
3303
|
-
name:
|
|
3304
|
-
available:
|
|
3305
|
-
reserved:
|
|
3306
|
-
allocated:
|
|
3307
|
-
offers:
|
|
3308
|
-
revision:
|
|
3309
|
-
archivedAt:
|
|
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()
|
|
3310
3313
|
}))();
|
|
3311
3314
|
var correction = /* @__PURE__ */ (() => ({
|
|
3312
|
-
actionId:
|
|
3313
|
-
expectedRevision:
|
|
3314
|
-
reason:
|
|
3315
|
+
actionId: z25.string().uuid().default(() => crypto.randomUUID()),
|
|
3316
|
+
expectedRevision: z25.number().int().nonnegative(),
|
|
3317
|
+
reason: z25.string().trim().min(1).max(500)
|
|
3315
3318
|
}))();
|
|
3316
|
-
var inventoryItemActionSchema = /* @__PURE__ */ (() =>
|
|
3317
|
-
var inventoryItemRenameSchema = /* @__PURE__ */ (() =>
|
|
3319
|
+
var inventoryItemActionSchema = /* @__PURE__ */ (() => z25.strictObject(correction))();
|
|
3320
|
+
var inventoryItemRenameSchema = /* @__PURE__ */ (() => z25.strictObject({
|
|
3318
3321
|
...correction,
|
|
3319
|
-
name:
|
|
3322
|
+
name: z25.string().trim().min(1).max(200)
|
|
3320
3323
|
}))();
|
|
3321
|
-
var inventoryStockCorrectionSchema = /* @__PURE__ */ (() =>
|
|
3324
|
+
var inventoryStockCorrectionSchema = /* @__PURE__ */ (() => z25.strictObject({
|
|
3322
3325
|
...correction,
|
|
3323
|
-
delta:
|
|
3326
|
+
delta: z25.number().int().safe()
|
|
3324
3327
|
}))();
|
|
3325
|
-
var inventoryItemPageSchema = /* @__PURE__ */ (() =>
|
|
3326
|
-
items:
|
|
3328
|
+
var inventoryItemPageSchema = /* @__PURE__ */ (() => z25.object({
|
|
3329
|
+
items: z25.array(inventoryItemStateSchema),
|
|
3327
3330
|
nextCursor: pageCursorSchema.nullable()
|
|
3328
3331
|
}))();
|
|
3329
|
-
var inventorySchema = /* @__PURE__ */ (() =>
|
|
3330
|
-
item:
|
|
3331
|
-
name:
|
|
3332
|
-
available:
|
|
3333
|
-
reserved:
|
|
3334
|
-
allocated:
|
|
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)
|
|
3335
3338
|
}))();
|
|
3336
|
-
var stockAdditionSchema = /* @__PURE__ */ (() =>
|
|
3339
|
+
var stockAdditionSchema = /* @__PURE__ */ (() => z25.object({
|
|
3337
3340
|
item: identifier,
|
|
3338
|
-
quantity:
|
|
3341
|
+
quantity: z25.number().int(),
|
|
3339
3342
|
actionId: identifier
|
|
3340
3343
|
}))();
|
|
3341
|
-
var stockInputSchema = /* @__PURE__ */ (() =>
|
|
3344
|
+
var stockInputSchema = /* @__PURE__ */ (() => z25.object({
|
|
3342
3345
|
item: identifier,
|
|
3343
|
-
quantity:
|
|
3346
|
+
quantity: z25.number().int().positive().max(1e6),
|
|
3344
3347
|
actionId: identifier
|
|
3345
3348
|
}).strict())();
|
|
3346
3349
|
var managedStockItemSchema = /* @__PURE__ */ (() => inventorySchema.extend({
|
|
3347
|
-
offers:
|
|
3350
|
+
offers: z25.array(identifier)
|
|
3348
3351
|
}))();
|
|
3349
3352
|
|
|
3350
3353
|
// src/server/endpoints/inventory.ts
|
|
3351
|
-
import * as
|
|
3354
|
+
import * as z26 from "zod";
|
|
3352
3355
|
var item = { item: ID_PATTERN };
|
|
3353
3356
|
var inventoryEndpoints = /* @__PURE__ */ (() => ({
|
|
3354
3357
|
list: managementEndpoint({
|
|
@@ -3357,7 +3360,7 @@ var inventoryEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3357
3360
|
parameters: {},
|
|
3358
3361
|
permission: "read",
|
|
3359
3362
|
ledger: "stock.list",
|
|
3360
|
-
result: () =>
|
|
3363
|
+
result: () => z26.array(managedStockItemSchema)
|
|
3361
3364
|
}),
|
|
3362
3365
|
items: managementEndpoint({
|
|
3363
3366
|
method: "GET",
|
|
@@ -3422,7 +3425,7 @@ var inventoryEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3422
3425
|
parameters: {},
|
|
3423
3426
|
permission: "read",
|
|
3424
3427
|
ledger: "pickup.list",
|
|
3425
|
-
result: () =>
|
|
3428
|
+
result: () => z26.array(pickupCatalogSchema)
|
|
3426
3429
|
}),
|
|
3427
3430
|
configure: managementEndpoint({
|
|
3428
3431
|
method: "POST",
|
|
@@ -3442,6 +3445,18 @@ var inventoryEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3442
3445
|
})
|
|
3443
3446
|
}))();
|
|
3444
3447
|
|
|
3448
|
+
// src/server/leaderboard-standing.ts
|
|
3449
|
+
import * as z27 from "zod";
|
|
3450
|
+
var leaderboardMemberStandingSchema = /* @__PURE__ */ (() => z27.object({
|
|
3451
|
+
leaderboard: identifier,
|
|
3452
|
+
member: identifier,
|
|
3453
|
+
status: z27.string(),
|
|
3454
|
+
rank: z27.number().int().positive().nullable(),
|
|
3455
|
+
score: z27.number().int().nullable(),
|
|
3456
|
+
/** Ranked participants on the board. */
|
|
3457
|
+
total: z27.number().int().nonnegative()
|
|
3458
|
+
}))();
|
|
3459
|
+
|
|
3445
3460
|
// src/server/settlement-payouts.ts
|
|
3446
3461
|
import * as z28 from "zod";
|
|
3447
3462
|
var timestamp = /* @__PURE__ */ (() => z28.number().int().safe().nonnegative())();
|
|
@@ -3690,6 +3705,22 @@ var leaderboardEndpoints = /* @__PURE__ */ (() => ({
|
|
|
3690
3705
|
ledger: "leaderboards.readManaged",
|
|
3691
3706
|
result: () => leaderboardPageSchema
|
|
3692
3707
|
}),
|
|
3708
|
+
memberStanding: managementEndpoint({
|
|
3709
|
+
method: "GET",
|
|
3710
|
+
path: "/leaderboards/{leaderboard}/members/{member}",
|
|
3711
|
+
parameters: { leaderboard: ID_PATTERN, member: ID_PATTERN },
|
|
3712
|
+
permission: "read",
|
|
3713
|
+
ledger: "leaderboards.memberStanding",
|
|
3714
|
+
result: () => leaderboardMemberStandingSchema
|
|
3715
|
+
}),
|
|
3716
|
+
memberEntries: managementEndpoint({
|
|
3717
|
+
method: "GET",
|
|
3718
|
+
path: "/leaderboards/{leaderboard}/members/{member}/entries",
|
|
3719
|
+
parameters: { leaderboard: ID_PATTERN, member: ID_PATTERN },
|
|
3720
|
+
permission: "read",
|
|
3721
|
+
ledger: "leaderboards.memberEntries",
|
|
3722
|
+
result: () => leaderboardHistoryPageSchema
|
|
3723
|
+
}),
|
|
3693
3724
|
history: managementEndpoint({
|
|
3694
3725
|
method: "GET",
|
|
3695
3726
|
path: "/leaderboards/{leaderboard}/history",
|
|
@@ -5321,6 +5352,8 @@ var accessSchema = /* @__PURE__ */ (() => z47.object({
|
|
|
5321
5352
|
admin: z47.boolean(),
|
|
5322
5353
|
local: z47.boolean(),
|
|
5323
5354
|
projects: z47.array(projectSchema),
|
|
5355
|
+
/** When the caller's CLI sign-in (`domino login`) stops working, in epoch milliseconds; absent for every other credential. */
|
|
5356
|
+
expiresAt: z47.number().optional(),
|
|
5324
5357
|
/** The credential's own kind and scope, when it is an organization automation key. */
|
|
5325
5358
|
credential: z47.object({
|
|
5326
5359
|
kind: z47.string(),
|
|
@@ -5859,8 +5892,33 @@ var questEndpoints = /* @__PURE__ */ (() => ({
|
|
|
5859
5892
|
})
|
|
5860
5893
|
}))();
|
|
5861
5894
|
|
|
5862
|
-
// src/server/
|
|
5895
|
+
// src/server/referral-history.ts
|
|
5863
5896
|
import * as z54 from "zod";
|
|
5897
|
+
var managedReferralHistorySchema = /* @__PURE__ */ (() => referralHistorySchema.extend({
|
|
5898
|
+
items: z54.array(
|
|
5899
|
+
referralHistorySchema.shape.items.element.extend({
|
|
5900
|
+
/**
|
|
5901
|
+
* The referral account the entry paid or corrected, as in `referrals.participants()`'s
|
|
5902
|
+
* `accounts`. Null for entries from before Relay recorded it, and once the friend's data is
|
|
5903
|
+
* purged.
|
|
5904
|
+
*/
|
|
5905
|
+
account: identifier.nullish(),
|
|
5906
|
+
/**
|
|
5907
|
+
* The invited friend whose qualification or earnings the entry pays. Null for a milestone,
|
|
5908
|
+
* which counts every friend, and when `account` is null.
|
|
5909
|
+
*/
|
|
5910
|
+
invitee: identifier.nullish(),
|
|
5911
|
+
/**
|
|
5912
|
+
* What the entry pays: a `fixed` reward for the friend's qualification, a `milestone`, or a
|
|
5913
|
+
* percentage `bonus` of the friend's earnings. Null when `account` is.
|
|
5914
|
+
*/
|
|
5915
|
+
kind: z54.string().nullish()
|
|
5916
|
+
})
|
|
5917
|
+
)
|
|
5918
|
+
}))();
|
|
5919
|
+
|
|
5920
|
+
// src/server/endpoints/referrals.ts
|
|
5921
|
+
import * as z55 from "zod";
|
|
5864
5922
|
var member2 = { member: ID_PATTERN };
|
|
5865
5923
|
var resource3 = { resource: ID_PATTERN };
|
|
5866
5924
|
var referralEndpoints = /* @__PURE__ */ (() => ({
|
|
@@ -5870,7 +5928,7 @@ var referralEndpoints = /* @__PURE__ */ (() => ({
|
|
|
5870
5928
|
parameters: {},
|
|
5871
5929
|
permission: "read",
|
|
5872
5930
|
ledger: "referrals.listManaged",
|
|
5873
|
-
result: () =>
|
|
5931
|
+
result: () => z55.array(publishedReferralSchema)
|
|
5874
5932
|
}),
|
|
5875
5933
|
participants: managementEndpoint({
|
|
5876
5934
|
method: "GET",
|
|
@@ -5886,7 +5944,7 @@ var referralEndpoints = /* @__PURE__ */ (() => ({
|
|
|
5886
5944
|
parameters: member2,
|
|
5887
5945
|
permission: "read",
|
|
5888
5946
|
ledger: "referrals.memberHistory",
|
|
5889
|
-
result: () =>
|
|
5947
|
+
result: () => managedReferralHistorySchema
|
|
5890
5948
|
}),
|
|
5891
5949
|
pause: managementEndpoint({
|
|
5892
5950
|
method: "POST",
|
|
@@ -5956,19 +6014,19 @@ var referralEndpoints = /* @__PURE__ */ (() => ({
|
|
|
5956
6014
|
}))();
|
|
5957
6015
|
|
|
5958
6016
|
// src/server/releases.ts
|
|
5959
|
-
import * as
|
|
5960
|
-
var managedReleaseQuerySchema = /* @__PURE__ */ (() =>
|
|
6017
|
+
import * as z56 from "zod";
|
|
6018
|
+
var managedReleaseQuerySchema = /* @__PURE__ */ (() => z56.strictObject({
|
|
5961
6019
|
quest: identifier.optional(),
|
|
5962
6020
|
limit: pageLimit,
|
|
5963
6021
|
cursor: pageCursorSchema.optional()
|
|
5964
6022
|
}))();
|
|
5965
|
-
var managedReleasePageSchema = /* @__PURE__ */ (() =>
|
|
5966
|
-
items:
|
|
5967
|
-
nextCursor:
|
|
6023
|
+
var managedReleasePageSchema = /* @__PURE__ */ (() => z56.object({
|
|
6024
|
+
items: z56.array(publishedReleaseSchema),
|
|
6025
|
+
nextCursor: z56.string().nullable()
|
|
5968
6026
|
}))();
|
|
5969
6027
|
|
|
5970
6028
|
// src/server/endpoints/releases.ts
|
|
5971
|
-
import * as
|
|
6029
|
+
import * as z57 from "zod";
|
|
5972
6030
|
var releaseEndpoints = /* @__PURE__ */ (() => ({
|
|
5973
6031
|
// `GET /releases` is the releases page, so the list is `/releases/list`.
|
|
5974
6032
|
list: managementEndpoint({
|
|
@@ -6001,7 +6059,7 @@ var releaseEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6001
6059
|
parameters: {},
|
|
6002
6060
|
permission: "publish",
|
|
6003
6061
|
ledger: "releases.publishBatch",
|
|
6004
|
-
result: () =>
|
|
6062
|
+
result: () => z57.array(publishedReleaseSchema)
|
|
6005
6063
|
}),
|
|
6006
6064
|
updateSettings: managementEndpoint({
|
|
6007
6065
|
method: "POST",
|
|
@@ -6023,7 +6081,7 @@ var releaseEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6023
6081
|
}))();
|
|
6024
6082
|
|
|
6025
6083
|
// src/server/endpoints/trackers.ts
|
|
6026
|
-
import * as
|
|
6084
|
+
import * as z58 from "zod";
|
|
6027
6085
|
var tracker = { tracker: ID_PATTERN };
|
|
6028
6086
|
var resource4 = { resource: ID_PATTERN };
|
|
6029
6087
|
var trackerEndpoints = /* @__PURE__ */ (() => ({
|
|
@@ -6033,7 +6091,7 @@ var trackerEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6033
6091
|
parameters: {},
|
|
6034
6092
|
permission: "read",
|
|
6035
6093
|
ledger: "trackers.list",
|
|
6036
|
-
result: () =>
|
|
6094
|
+
result: () => z58.array(trackerStatusSchema)
|
|
6037
6095
|
}),
|
|
6038
6096
|
get: managementEndpoint({
|
|
6039
6097
|
method: "GET",
|
|
@@ -6332,50 +6390,50 @@ var teamEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6332
6390
|
}))();
|
|
6333
6391
|
|
|
6334
6392
|
// src/server/test-members.ts
|
|
6335
|
-
import * as
|
|
6336
|
-
var testMemberWalletSchema = /* @__PURE__ */ (() =>
|
|
6393
|
+
import * as z59 from "zod";
|
|
6394
|
+
var testMemberWalletSchema = /* @__PURE__ */ (() => z59.object({
|
|
6337
6395
|
chain: walletChainSchema,
|
|
6338
6396
|
/** CAIP-2 network, Cosmos only. */
|
|
6339
6397
|
network: cosmosNetworkSchema.nullable(),
|
|
6340
|
-
address:
|
|
6398
|
+
address: z59.string()
|
|
6341
6399
|
}))();
|
|
6342
|
-
var testMemberAccountSchema = /* @__PURE__ */ (() =>
|
|
6343
|
-
provider:
|
|
6400
|
+
var testMemberAccountSchema = /* @__PURE__ */ (() => z59.object({
|
|
6401
|
+
provider: z59.enum(["x", "discord"]),
|
|
6344
6402
|
/** The X user ID or Discord user ID. */
|
|
6345
|
-
id:
|
|
6403
|
+
id: z59.string(),
|
|
6346
6404
|
/** The X handle, when the account was linked by username; otherwise null. */
|
|
6347
|
-
username:
|
|
6405
|
+
username: z59.string().nullable(),
|
|
6348
6406
|
/**
|
|
6349
6407
|
* `linked`: an operator linked a real account with `linkAccount`. `synthetic`: the account Relay
|
|
6350
6408
|
* linked for synthetic records. `connected`: the member connected it through X or Discord while
|
|
6351
6409
|
* a staging site acted as them.
|
|
6352
6410
|
*/
|
|
6353
|
-
source:
|
|
6411
|
+
source: z59.enum(["linked", "synthetic", "connected"])
|
|
6354
6412
|
}))();
|
|
6355
|
-
var testMemberSchema = /* @__PURE__ */ (() =>
|
|
6413
|
+
var testMemberSchema = /* @__PURE__ */ (() => z59.object({
|
|
6356
6414
|
id: identifier,
|
|
6357
|
-
name:
|
|
6358
|
-
test:
|
|
6415
|
+
name: z59.string(),
|
|
6416
|
+
test: z59.literal(true),
|
|
6359
6417
|
/** Current project-calendar date (YYYY-MM-DD), computed by the server. */
|
|
6360
|
-
today:
|
|
6418
|
+
today: z59.iso.date().optional(),
|
|
6361
6419
|
/**
|
|
6362
6420
|
* Number of calendar days advanced with `days`; absent means zero for older servers. Hours,
|
|
6363
6421
|
* minutes and `to` leave it unchanged, so read the member's date from `today`.
|
|
6364
6422
|
*/
|
|
6365
|
-
offsetDays:
|
|
6423
|
+
offsetDays: z59.number().int().min(0).optional(),
|
|
6366
6424
|
/** Linked wallet addresses, by chain then newest first; absent from older servers. */
|
|
6367
|
-
wallets:
|
|
6425
|
+
wallets: z59.array(testMemberWalletSchema).optional(),
|
|
6368
6426
|
/** Its X and Discord accounts, X first; absent from older servers. */
|
|
6369
|
-
accounts:
|
|
6427
|
+
accounts: z59.array(testMemberAccountSchema).optional()
|
|
6370
6428
|
}))();
|
|
6371
|
-
var testMemberCreateSchema = /* @__PURE__ */ (() =>
|
|
6429
|
+
var testMemberCreateSchema = /* @__PURE__ */ (() => z59.object({
|
|
6372
6430
|
actionId: identifier,
|
|
6373
|
-
name:
|
|
6431
|
+
name: z59.string().trim().min(1).max(40)
|
|
6374
6432
|
}).strict())();
|
|
6375
6433
|
var testMemberActionSchema = /* @__PURE__ */ (() => submitSchema.omit({ member: true, faultAfterReview: true }).extend({
|
|
6376
|
-
operation:
|
|
6434
|
+
operation: z59.literal("attempts.submit")
|
|
6377
6435
|
}).strict())();
|
|
6378
|
-
var testMemberPassSchema = /* @__PURE__ */ (() =>
|
|
6436
|
+
var testMemberPassSchema = /* @__PURE__ */ (() => z59.object({
|
|
6379
6437
|
actionId: identifier,
|
|
6380
6438
|
/** A manual quest, by key or ID. Automatic quests start from their tracker or schedule. */
|
|
6381
6439
|
quest: identifier,
|
|
@@ -6386,122 +6444,122 @@ var testMemberPassSchema = /* @__PURE__ */ (() => z58.object({
|
|
|
6386
6444
|
*/
|
|
6387
6445
|
completionKey: completionKeySchema.optional()
|
|
6388
6446
|
}).strict())();
|
|
6389
|
-
var testMemberAcceptAnywaySchema = /* @__PURE__ */ (() =>
|
|
6447
|
+
var testMemberAcceptAnywaySchema = /* @__PURE__ */ (() => z59.object({
|
|
6390
6448
|
actionId: identifier,
|
|
6391
6449
|
attempt: identifier,
|
|
6392
6450
|
/** `"test"` (the default) or `"live"`: whose refusals apply. */
|
|
6393
|
-
rules:
|
|
6451
|
+
rules: z59.enum(["test", "live"]).optional(),
|
|
6394
6452
|
/** Why the rejection is reversed, recorded with the decision. Required with `rules: "live"`. */
|
|
6395
|
-
reason:
|
|
6453
|
+
reason: z59.string().trim().min(1).max(2e3).optional()
|
|
6396
6454
|
}).strict())();
|
|
6397
|
-
var testMemberReferralAcceptSchema = /* @__PURE__ */ (() =>
|
|
6398
|
-
|
|
6399
|
-
|
|
6455
|
+
var testMemberReferralAcceptSchema = /* @__PURE__ */ (() => z59.union([
|
|
6456
|
+
z59.object({ actionId: identifier, code: identifier }).strict(),
|
|
6457
|
+
z59.object({ actionId: identifier, inviter: identifier }).strict()
|
|
6400
6458
|
]))();
|
|
6401
|
-
var testMemberRedeemSchema = /* @__PURE__ */ (() =>
|
|
6402
|
-
var testMemberResetSchema = /* @__PURE__ */ (() =>
|
|
6403
|
-
var testMemberPurgeSchema = /* @__PURE__ */ (() =>
|
|
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({
|
|
6404
6462
|
actionId: identifier,
|
|
6405
6463
|
// A cap on one transaction's size, matching the campaign playground's member limit per run.
|
|
6406
|
-
members:
|
|
6407
|
-
reason:
|
|
6464
|
+
members: z59.array(identifier).min(1).max(500),
|
|
6465
|
+
reason: z59.string().trim().min(1).max(2e3)
|
|
6408
6466
|
}).strict())();
|
|
6409
|
-
var testMemberAdvanceSchema = /* @__PURE__ */ (() =>
|
|
6467
|
+
var testMemberAdvanceSchema = /* @__PURE__ */ (() => z59.object({
|
|
6410
6468
|
actionId: identifier,
|
|
6411
|
-
days:
|
|
6469
|
+
days: z59.number().int().min(1).max(30)
|
|
6412
6470
|
}).strict())();
|
|
6413
|
-
var testMemberClockAdvanceSchema = /* @__PURE__ */ (() =>
|
|
6471
|
+
var testMemberClockAdvanceSchema = /* @__PURE__ */ (() => z59.union([
|
|
6414
6472
|
testMemberAdvanceSchema,
|
|
6415
|
-
|
|
6416
|
-
|
|
6473
|
+
z59.object({ actionId: identifier, hours: z59.number().int().min(1).max(720) }).strict(),
|
|
6474
|
+
z59.object({
|
|
6417
6475
|
actionId: identifier,
|
|
6418
|
-
minutes:
|
|
6476
|
+
minutes: z59.number().int().min(1).max(43200)
|
|
6419
6477
|
}).strict(),
|
|
6420
|
-
|
|
6478
|
+
z59.object({
|
|
6421
6479
|
actionId: identifier,
|
|
6422
6480
|
/**
|
|
6423
6481
|
* An ISO 8601 instant with an offset, such as `2026-10-10T00:00:00+02:00`, or epoch
|
|
6424
6482
|
* milliseconds, which parse to that instant in UTC, so the parsed `to` is always an ISO
|
|
6425
6483
|
* string.
|
|
6426
6484
|
*/
|
|
6427
|
-
to:
|
|
6428
|
-
|
|
6429
|
-
|
|
6485
|
+
to: z59.union([
|
|
6486
|
+
z59.iso.datetime({ offset: true }),
|
|
6487
|
+
z59.number().int().nonnegative().max(864e13).transform((at) => new Date(at).toISOString())
|
|
6430
6488
|
])
|
|
6431
6489
|
}).strict()
|
|
6432
6490
|
]))();
|
|
6433
|
-
var testMemberResetResultSchema = /* @__PURE__ */ (() =>
|
|
6491
|
+
var testMemberResetResultSchema = /* @__PURE__ */ (() => z59.object({
|
|
6434
6492
|
member: identifier,
|
|
6435
|
-
deleted:
|
|
6493
|
+
deleted: z59.literal(true)
|
|
6436
6494
|
}))();
|
|
6437
|
-
var testMemberPurgeResultSchema = /* @__PURE__ */ (() =>
|
|
6438
|
-
members:
|
|
6439
|
-
purged:
|
|
6495
|
+
var testMemberPurgeResultSchema = /* @__PURE__ */ (() => z59.object({
|
|
6496
|
+
members: z59.array(identifier),
|
|
6497
|
+
purged: z59.literal(true)
|
|
6440
6498
|
}))();
|
|
6441
|
-
var testMemberWalletLinkSchema = /* @__PURE__ */ (() =>
|
|
6442
|
-
|
|
6499
|
+
var testMemberWalletLinkSchema = /* @__PURE__ */ (() => z59.discriminatedUnion("chain", [
|
|
6500
|
+
z59.object({
|
|
6443
6501
|
actionId: identifier,
|
|
6444
|
-
chain:
|
|
6502
|
+
chain: z59.literal("solana"),
|
|
6445
6503
|
address: solanaAddressSchema
|
|
6446
6504
|
}).strict(),
|
|
6447
|
-
|
|
6505
|
+
z59.object({
|
|
6448
6506
|
actionId: identifier,
|
|
6449
|
-
chain:
|
|
6507
|
+
chain: z59.literal("eip155"),
|
|
6450
6508
|
address: evmAddressSchema
|
|
6451
6509
|
}).strict(),
|
|
6452
|
-
|
|
6510
|
+
z59.object({
|
|
6453
6511
|
actionId: identifier,
|
|
6454
|
-
chain:
|
|
6512
|
+
chain: z59.literal("cosmos"),
|
|
6455
6513
|
network: cosmosNetworkSchema,
|
|
6456
6514
|
address: cosmosAddressSchema
|
|
6457
6515
|
}).strict()
|
|
6458
6516
|
]))();
|
|
6459
|
-
var testMemberWalletUnlinkSchema = /* @__PURE__ */ (() =>
|
|
6517
|
+
var testMemberWalletUnlinkSchema = /* @__PURE__ */ (() => z59.object({
|
|
6460
6518
|
actionId: identifier,
|
|
6461
6519
|
chain: walletChainSchema,
|
|
6462
|
-
address:
|
|
6520
|
+
address: z59.string().min(1).max(100)
|
|
6463
6521
|
}).strict())();
|
|
6464
|
-
var snowflake = /* @__PURE__ */ (() =>
|
|
6465
|
-
var accountId = /* @__PURE__ */ (() =>
|
|
6466
|
-
var accountReference = /* @__PURE__ */ (() =>
|
|
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({
|
|
6467
6525
|
actionId: identifier,
|
|
6468
|
-
kind:
|
|
6469
|
-
subject:
|
|
6526
|
+
kind: z59.enum(["x", "discord"]),
|
|
6527
|
+
subject: z59.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric user ID")
|
|
6470
6528
|
}).strict().transform(({ actionId: actionId3, kind, subject }) => ({
|
|
6471
6529
|
actionId: actionId3,
|
|
6472
6530
|
provider: kind,
|
|
6473
6531
|
id: subject
|
|
6474
6532
|
})))();
|
|
6475
|
-
var accountById = /* @__PURE__ */ (() =>
|
|
6533
|
+
var accountById = /* @__PURE__ */ (() => z59.object({
|
|
6476
6534
|
actionId: identifier,
|
|
6477
|
-
provider:
|
|
6535
|
+
provider: z59.enum(["x", "discord"]),
|
|
6478
6536
|
id: accountId
|
|
6479
6537
|
}).strict())();
|
|
6480
|
-
var testMemberAccountLinkSchema = /* @__PURE__ */ (() =>
|
|
6538
|
+
var testMemberAccountLinkSchema = /* @__PURE__ */ (() => z59.union([
|
|
6481
6539
|
accountById,
|
|
6482
|
-
|
|
6540
|
+
z59.object({
|
|
6483
6541
|
actionId: identifier,
|
|
6484
|
-
provider:
|
|
6542
|
+
provider: z59.literal("x"),
|
|
6485
6543
|
username: xUsernameSchema
|
|
6486
6544
|
}).strict(),
|
|
6487
6545
|
accountReference
|
|
6488
6546
|
]))();
|
|
6489
|
-
var testMemberAccountUnlinkSchema = /* @__PURE__ */ (() =>
|
|
6547
|
+
var testMemberAccountUnlinkSchema = /* @__PURE__ */ (() => z59.union([
|
|
6490
6548
|
accountById,
|
|
6491
6549
|
accountReference
|
|
6492
6550
|
]))();
|
|
6493
|
-
var metric = /* @__PURE__ */ (() =>
|
|
6494
|
-
var testMemberXPostSchema = /* @__PURE__ */ (() =>
|
|
6495
|
-
content:
|
|
6496
|
-
author:
|
|
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({
|
|
6497
6555
|
/** Defaults to `test_` and the end of the synthetic account ID. */
|
|
6498
|
-
username:
|
|
6556
|
+
username: z59.string().min(1).max(50).optional(),
|
|
6499
6557
|
/** Defaults to the test member's name. */
|
|
6500
|
-
name:
|
|
6558
|
+
name: z59.string().min(1).max(100).optional()
|
|
6501
6559
|
}).default({}),
|
|
6502
|
-
isReply:
|
|
6503
|
-
isRetweet:
|
|
6504
|
-
isQuoteTweet:
|
|
6560
|
+
isReply: z59.boolean().default(false),
|
|
6561
|
+
isRetweet: z59.boolean().default(false),
|
|
6562
|
+
isQuoteTweet: z59.boolean().default(false),
|
|
6505
6563
|
likeCount: metric.default(0),
|
|
6506
6564
|
replyCount: metric.default(0),
|
|
6507
6565
|
retweetCount: metric.default(0),
|
|
@@ -6509,27 +6567,27 @@ var testMemberXPostSchema = /* @__PURE__ */ (() => z58.strictObject({
|
|
|
6509
6567
|
viewCount: metric.default(0),
|
|
6510
6568
|
bookmarkCount: metric.default(0)
|
|
6511
6569
|
}))();
|
|
6512
|
-
var testMemberDiscordMessageSchema = /* @__PURE__ */ (() =>
|
|
6570
|
+
var testMemberDiscordMessageSchema = /* @__PURE__ */ (() => z59.strictObject({
|
|
6513
6571
|
channelId: snowflake.optional(),
|
|
6514
6572
|
/** The channel whose thread `channelId` is, or null outside a thread. */
|
|
6515
6573
|
parentChannelId: snowflake.nullable().default(null),
|
|
6516
6574
|
replyTo: snowflake.nullable().default(null),
|
|
6517
|
-
text:
|
|
6575
|
+
text: z59.string().max(4e3).optional()
|
|
6518
6576
|
}))();
|
|
6519
|
-
var testMemberDiscordReactionSchema = /* @__PURE__ */ (() =>
|
|
6577
|
+
var testMemberDiscordReactionSchema = /* @__PURE__ */ (() => z59.strictObject({
|
|
6520
6578
|
channelId: snowflake.optional(),
|
|
6521
6579
|
/** The channel whose thread `channelId` is, or null outside a thread. */
|
|
6522
6580
|
parentChannelId: snowflake.nullable().default(null),
|
|
6523
6581
|
messageId: snowflake.optional(),
|
|
6524
|
-
emoji:
|
|
6582
|
+
emoji: z59.strictObject({
|
|
6525
6583
|
/** A custom emoji's ID, or null for a Unicode emoji. */
|
|
6526
6584
|
id: snowflake.nullable().default(null),
|
|
6527
|
-
name:
|
|
6585
|
+
name: z59.string().min(1).max(100)
|
|
6528
6586
|
}).default({ id: null, name: "\u{1F44D}" }),
|
|
6529
|
-
reactorRoles:
|
|
6530
|
-
messagePublishedAt:
|
|
6587
|
+
reactorRoles: z59.array(snowflake).max(50).default([]),
|
|
6588
|
+
messagePublishedAt: z59.number().int().nonnegative().safe().optional()
|
|
6531
6589
|
}))();
|
|
6532
|
-
var testMemberRecordSchema = /* @__PURE__ */ (() =>
|
|
6590
|
+
var testMemberRecordSchema = /* @__PURE__ */ (() => z59.object({
|
|
6533
6591
|
actionId: identifier,
|
|
6534
6592
|
/** A managed X or Discord tracker, by key or ID. */
|
|
6535
6593
|
tracker: identifier,
|
|
@@ -6537,16 +6595,16 @@ var testMemberRecordSchema = /* @__PURE__ */ (() => z58.object({
|
|
|
6537
6595
|
* The record account the test member holds. `messageAuthor` (Discord reactions only) makes the
|
|
6538
6596
|
* member the reacted-to message's author, and the reactor a synthetic account no member holds.
|
|
6539
6597
|
*/
|
|
6540
|
-
as:
|
|
6541
|
-
data:
|
|
6598
|
+
as: z59.enum(["author", "messageAuthor"]).default("author"),
|
|
6599
|
+
data: z59.record(z59.string(), z59.json()).default({})
|
|
6542
6600
|
}).strict())();
|
|
6543
6601
|
var testMemberRecordResultSchema = /* @__PURE__ */ (() => trackerIngestResultSchema.extend({
|
|
6544
6602
|
/** The tracker's stable ID. */
|
|
6545
6603
|
tracker: identifier,
|
|
6546
6604
|
/** The stored record's ID. */
|
|
6547
|
-
record:
|
|
6605
|
+
record: z59.string(),
|
|
6548
6606
|
/** The account the record names for the test member: its linked one, else its synthetic one. */
|
|
6549
|
-
account:
|
|
6607
|
+
account: z59.object({ kind: z59.enum(["x", "discord"]), id: z59.string() })
|
|
6550
6608
|
}))();
|
|
6551
6609
|
var TestMemberDecisionKind = {
|
|
6552
6610
|
/** `testMembers.pass`: the quest's check never ran. */
|
|
@@ -6554,51 +6612,51 @@ var TestMemberDecisionKind = {
|
|
|
6554
6612
|
/** `testMembers.acceptAnyway`: the attempt was rejected, then accepted. */
|
|
6555
6613
|
AcceptAnyway: "accept-anyway"
|
|
6556
6614
|
};
|
|
6557
|
-
var testMemberDecisionKindSchema = /* @__PURE__ */ (() =>
|
|
6558
|
-
var testMemberOperatorDecisionSchema = /* @__PURE__ */ (() =>
|
|
6615
|
+
var testMemberDecisionKindSchema = /* @__PURE__ */ (() => z59.string())();
|
|
6616
|
+
var testMemberOperatorDecisionSchema = /* @__PURE__ */ (() => z59.object({
|
|
6559
6617
|
kind: testMemberDecisionKindSchema,
|
|
6560
6618
|
/** The operator who decided, as audit history names them. */
|
|
6561
|
-
actor:
|
|
6562
|
-
at:
|
|
6619
|
+
actor: z59.string().nullable(),
|
|
6620
|
+
at: z59.number().int().nonnegative().safe()
|
|
6563
6621
|
}))();
|
|
6564
|
-
var testMemberHistoryQuerySchema = /* @__PURE__ */ (() =>
|
|
6622
|
+
var testMemberHistoryQuerySchema = /* @__PURE__ */ (() => z59.object({
|
|
6565
6623
|
/** Inclusive lower bound on credited activity time, in epoch milliseconds. */
|
|
6566
|
-
since:
|
|
6624
|
+
since: z59.coerce.number().int().nonnegative().safe().optional()
|
|
6567
6625
|
}))();
|
|
6568
|
-
var testMemberHistorySchema = /* @__PURE__ */ (() =>
|
|
6626
|
+
var testMemberHistorySchema = /* @__PURE__ */ (() => z59.object({
|
|
6569
6627
|
/** Newest credited activity first, up to 500 attempts. */
|
|
6570
|
-
attempts:
|
|
6628
|
+
attempts: z59.array(
|
|
6571
6629
|
attemptSchema.extend({
|
|
6572
6630
|
/** The quest's authoring key; absent when the quest has none. */
|
|
6573
|
-
questKey:
|
|
6574
|
-
eligibleAt:
|
|
6631
|
+
questKey: z59.string().optional(),
|
|
6632
|
+
eligibleAt: z59.number().int().nonnegative().safe(),
|
|
6575
6633
|
/** Set when an operator decided the attempt in place of its evaluator; absent otherwise. */
|
|
6576
6634
|
operatorDecision: testMemberOperatorDecisionSchema.optional(),
|
|
6577
6635
|
/**
|
|
6578
6636
|
* Rewards of this attempt's completion that Relay never sent, each with why: a role reward
|
|
6579
6637
|
* for a test-linked Discord account. Absent when every reward was sent.
|
|
6580
6638
|
*/
|
|
6581
|
-
rewardsNotSent:
|
|
6639
|
+
rewardsNotSent: z59.array(z59.object({ reason: z59.string() })).optional()
|
|
6582
6640
|
})
|
|
6583
6641
|
),
|
|
6584
6642
|
/** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
|
|
6585
|
-
skipped:
|
|
6586
|
-
|
|
6643
|
+
skipped: z59.array(
|
|
6644
|
+
z59.object({
|
|
6587
6645
|
quest: identifier,
|
|
6588
6646
|
/** The quest's authoring key; absent when the quest has none. */
|
|
6589
|
-
questKey:
|
|
6647
|
+
questKey: z59.string().optional(),
|
|
6590
6648
|
tracker: identifier,
|
|
6591
|
-
record:
|
|
6592
|
-
code:
|
|
6593
|
-
occurredAt:
|
|
6649
|
+
record: z59.string(),
|
|
6650
|
+
code: z59.string().min(1),
|
|
6651
|
+
occurredAt: z59.number().int().nonnegative().safe()
|
|
6594
6652
|
})
|
|
6595
6653
|
),
|
|
6596
6654
|
/** False when older entries were omitted from either list. */
|
|
6597
|
-
complete:
|
|
6655
|
+
complete: z59.boolean()
|
|
6598
6656
|
}))();
|
|
6599
6657
|
|
|
6600
6658
|
// src/server/endpoints/test-members.ts
|
|
6601
|
-
import * as
|
|
6659
|
+
import * as z60 from "zod";
|
|
6602
6660
|
var member3 = { member: SEGMENT_PATTERN };
|
|
6603
6661
|
var testMemberEndpoints = /* @__PURE__ */ (() => ({
|
|
6604
6662
|
list: managementEndpoint({
|
|
@@ -6607,7 +6665,7 @@ var testMemberEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6607
6665
|
parameters: {},
|
|
6608
6666
|
permission: "publish",
|
|
6609
6667
|
ledger: null,
|
|
6610
|
-
result: () =>
|
|
6668
|
+
result: () => z60.array(testMemberSchema)
|
|
6611
6669
|
}),
|
|
6612
6670
|
create: managementEndpoint({
|
|
6613
6671
|
method: "POST",
|
|
@@ -6741,7 +6799,7 @@ var testMemberEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6741
6799
|
}))();
|
|
6742
6800
|
|
|
6743
6801
|
// src/server/endpoints/webhooks.ts
|
|
6744
|
-
import * as
|
|
6802
|
+
import * as z61 from "zod";
|
|
6745
6803
|
var webhookEndpoints = /* @__PURE__ */ (() => ({
|
|
6746
6804
|
list: managementEndpoint({
|
|
6747
6805
|
method: "GET",
|
|
@@ -6749,7 +6807,7 @@ var webhookEndpoints = /* @__PURE__ */ (() => ({
|
|
|
6749
6807
|
parameters: {},
|
|
6750
6808
|
permission: "read",
|
|
6751
6809
|
ledger: null,
|
|
6752
|
-
result: () =>
|
|
6810
|
+
result: () => z61.array(webhookEndpointSchema)
|
|
6753
6811
|
}),
|
|
6754
6812
|
create: managementEndpoint({
|
|
6755
6813
|
method: "POST",
|
|
@@ -6948,13 +7006,6 @@ export {
|
|
|
6948
7006
|
connectionResyncInputSchema,
|
|
6949
7007
|
pluginEndpoints,
|
|
6950
7008
|
connectionEndpoints,
|
|
6951
|
-
environmentSchema,
|
|
6952
|
-
roleSchema,
|
|
6953
|
-
permissionSchema,
|
|
6954
|
-
rolePermissions,
|
|
6955
|
-
projectRoleSchema,
|
|
6956
|
-
projectPermissionSchema,
|
|
6957
|
-
projectRolePermissions,
|
|
6958
7009
|
ingestTrackerScopeSchema,
|
|
6959
7010
|
tokenScopeInputSchema,
|
|
6960
7011
|
tokenInputSchema,
|
|
@@ -6992,6 +7043,9 @@ export {
|
|
|
6992
7043
|
engagementEndpoints,
|
|
6993
7044
|
contentEndpoints,
|
|
6994
7045
|
managedEntitlementQuerySchema,
|
|
7046
|
+
EntitlementSourceKind,
|
|
7047
|
+
entitlementSourceSchema,
|
|
7048
|
+
entitlementProvenanceSchema,
|
|
6995
7049
|
managedEntitlementPageSchema,
|
|
6996
7050
|
managedEntitlementSchema,
|
|
6997
7051
|
entitlementEndpoints,
|
|
@@ -7019,6 +7073,7 @@ export {
|
|
|
7019
7073
|
scheduleEndpoints,
|
|
7020
7074
|
repositoryEndpoints,
|
|
7021
7075
|
buildEndpoints,
|
|
7076
|
+
runtimeLogEndpoints,
|
|
7022
7077
|
stagingEndpoints,
|
|
7023
7078
|
developmentEndpoints,
|
|
7024
7079
|
identityIntegrationEndpoints,
|
|
@@ -7033,6 +7088,7 @@ export {
|
|
|
7033
7088
|
stockInputSchema,
|
|
7034
7089
|
managedStockItemSchema,
|
|
7035
7090
|
inventoryEndpoints,
|
|
7091
|
+
leaderboardMemberStandingSchema,
|
|
7036
7092
|
solanaPayoutMintSchema,
|
|
7037
7093
|
solanaPayoutSquadsSchema,
|
|
7038
7094
|
solanaPayoutInputSchema,
|
|
@@ -7159,6 +7215,7 @@ export {
|
|
|
7159
7215
|
questLifecycleInputSchema,
|
|
7160
7216
|
questLifecycleSchema,
|
|
7161
7217
|
questEndpoints,
|
|
7218
|
+
managedReferralHistorySchema,
|
|
7162
7219
|
referralEndpoints,
|
|
7163
7220
|
managedReleaseQuerySchema,
|
|
7164
7221
|
managedReleasePageSchema,
|