@domino-sdk/relay 1.54.0 → 1.56.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 +1859 -0
- package/dist/analytics-URV-mxjH.d.ts +482 -0
- package/dist/{attempt-captures-QC4kTA44.d.ts → attempt-captures-CxxO7DeD.d.ts} +1 -1
- package/dist/authoring.d.ts +277 -40
- package/dist/authoring.js +142 -14
- package/dist/{automatic-outcomes-CVyZHxir.d.ts → automatic-outcomes-DxW_v5Wc.d.ts} +5 -2
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +10 -10
- package/dist/{capability-error-FQGGb5xS.d.ts → capability-error-DSd8EMQC.d.ts} +76 -2
- package/dist/{chunk-RP4LLEON.js → chunk-ABJ4G47X.js} +1 -1
- package/dist/{chunk-IELNFM3V.js → chunk-BHHUSBSD.js} +97 -8
- package/dist/chunk-BJYMTCWG.js +950 -0
- package/dist/{chunk-K6TVMNU4.js → chunk-CK7HO32Z.js} +1 -1
- package/dist/{chunk-GTQJSDBS.js → chunk-CXKXPB7K.js} +32 -16
- package/dist/{chunk-TL5TL5RD.js → chunk-G6XVBYH7.js} +4 -4
- package/dist/{chunk-S2PMKZSX.js → chunk-H2MD6E7Z.js} +21 -2
- package/dist/{chunk-YVC3B72P.js → chunk-INSWI2VZ.js} +1 -1
- package/dist/{chunk-XFAYQFRO.js → chunk-KBVH4XZC.js} +1 -1
- package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
- package/dist/{chunk-7BNCLWAO.js → chunk-MNU6UPXY.js} +1 -1
- package/dist/{chunk-JL7J3EQQ.js → chunk-NK6EER33.js} +46 -16
- package/dist/{chunk-QIDQWXSF.js → chunk-OTITLABX.js} +2 -2
- package/dist/{chunk-53JMTUWG.js → chunk-QNQNKIAA.js} +1 -1
- package/dist/{chunk-ZJ3FVZRP.js → chunk-RBPMT53S.js} +132 -99
- package/dist/chunk-ULQU7KC4.js +704 -0
- package/dist/chunk-VSHV7FEA.js +344 -0
- package/dist/{chunk-LPHXTZDA.js → chunk-W5U2WXG3.js} +2 -2
- package/dist/{client-CzNtl8UO.d.ts → client-bX3oTpRu.d.ts} +111 -8
- package/dist/{deployments-ovtqtAcx.d.ts → deployments-D3lxfQMB.d.ts} +1436 -185
- package/dist/{groups-B5R1RCsl.d.ts → groups-DPE004_V.d.ts} +135 -139
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -9
- package/dist/integrations-CcD5NPEA.d.ts +633 -0
- package/dist/internal.d.ts +11 -10
- package/dist/internal.js +9 -9
- package/dist/{offers-CH1RZekg.d.ts → offers-CtzMeB7O.d.ts} +207 -2
- package/dist/{pages-BTlOg8sl.d.ts → pages-BlLqB8ZQ.d.ts} +82 -2
- package/dist/portal-proxy.d.ts +11 -1
- package/dist/portal-proxy.js +27 -6
- package/dist/{profiles-Cdv4BSd_.d.ts → profiles-BoOK03cR.d.ts} +2 -0
- package/dist/react/index.d.ts +566 -13
- package/dist/react/index.js +105 -15
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/NDB42VFF.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/{schema-BJ9bOgpN.d.ts → schema-C4m9RhCR.d.ts} +166 -6
- package/dist/schema.d.ts +383 -79
- package/dist/schema.js +105 -41
- package/dist/server/index.d.ts +11 -10
- package/dist/server/index.js +1590 -1175
- package/dist/{submission-input-BNah53go.d.ts → submission-input-wTiYGdgA.d.ts} +2 -2
- package/dist/{telegram-browser-C36j_6v-.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
- package/dist/testing.d.ts +85 -12
- package/dist/testing.js +322 -37
- package/dist/{transport-C8BlCzmF.d.ts → transport-CnKA-_RL.d.ts} +7625 -1265
- package/dist/vite.d.ts +54 -1
- package/dist/vite.js +35 -0
- package/dist/{x-BfQcsDp0.d.ts → x-1czZFVUW.d.ts} +1 -1
- package/package.json +3 -2
- package/dist/chunk-2NUD237O.js +0 -102
- package/dist/chunk-CCE2JWES.js +0 -1083
- package/dist/integrations-CllF-kWg.d.ts +0 -314
- package/dist/runtime/chunks/AVRVSLHX.js +0 -1
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import {
|
|
2
|
+
accountConnectionSchema,
|
|
3
|
+
identifier,
|
|
4
|
+
pageCursorSchema
|
|
5
|
+
} from "./chunk-BHHUSBSD.js";
|
|
6
|
+
|
|
7
|
+
// src/point-ledgers.ts
|
|
8
|
+
import * as z from "zod";
|
|
9
|
+
var pointLedgerPropertiesSchema = z.object({
|
|
10
|
+
name: z.string().trim().min(1).max(120),
|
|
11
|
+
description: z.string().trim().max(1e3).default("")
|
|
12
|
+
}).strict();
|
|
13
|
+
var createPointLedgerSchema = pointLedgerPropertiesSchema.extend({ actionId: identifier, key: identifier.optional() }).strict();
|
|
14
|
+
var pointLedgerSchema = pointLedgerPropertiesSchema.extend({
|
|
15
|
+
id: identifier
|
|
16
|
+
});
|
|
17
|
+
var managedPointLedgerSchema = pointLedgerSchema.extend({
|
|
18
|
+
archivedAt: z.number().int().nonnegative().nullable()
|
|
19
|
+
});
|
|
20
|
+
var pointLedgerDeclarationSchema = pointLedgerPropertiesSchema.extend({ key: identifier }).strict();
|
|
21
|
+
var pointLedgerArtifactSchema = z.union([
|
|
22
|
+
pointLedgerDeclarationSchema,
|
|
23
|
+
z.object({ code: z.string().min(1).max(2e6) }).strict()
|
|
24
|
+
]);
|
|
25
|
+
var pointLedgerReferenceSchema = z.object({
|
|
26
|
+
id: identifier,
|
|
27
|
+
key: identifier.nullable(),
|
|
28
|
+
name: z.string()
|
|
29
|
+
});
|
|
30
|
+
var points = z.number().int().safe();
|
|
31
|
+
var pointBalanceSchema = z.object({
|
|
32
|
+
ledger: pointLedgerReferenceSchema,
|
|
33
|
+
balance: points,
|
|
34
|
+
available: points
|
|
35
|
+
});
|
|
36
|
+
var pointBalancesSchema = z.object({
|
|
37
|
+
items: z.array(pointBalanceSchema)
|
|
38
|
+
});
|
|
39
|
+
var PointEntryKind = {
|
|
40
|
+
/** Points a quest completion, an engagement settlement or an operator awarded. */
|
|
41
|
+
Award: "award",
|
|
42
|
+
/** Points the member spent. */
|
|
43
|
+
Spend: "spend",
|
|
44
|
+
/** A correction in either direction, by an operator or a referral payout. */
|
|
45
|
+
Adjust: "adjust",
|
|
46
|
+
/** Undoes part or all of an award or a positive adjustment (`reverses`). */
|
|
47
|
+
Reverse: "reverse"
|
|
48
|
+
};
|
|
49
|
+
var pointEntryKindSchema = z.string().min(1).max(64);
|
|
50
|
+
var pointEntrySchema = z.object({
|
|
51
|
+
id: identifier,
|
|
52
|
+
amount: points,
|
|
53
|
+
kind: pointEntryKindSchema,
|
|
54
|
+
/** When the entry took effect, in epoch milliseconds. A reversal keeps its source's. */
|
|
55
|
+
at: points.nonnegative(),
|
|
56
|
+
quest: identifier.nullable(),
|
|
57
|
+
reverses: identifier.nullable(),
|
|
58
|
+
/**
|
|
59
|
+
* True for an opening balance a member import recorded (an `adjust`). Absent from Relay
|
|
60
|
+
* versions without imports.
|
|
61
|
+
*/
|
|
62
|
+
imported: z.boolean().optional()
|
|
63
|
+
});
|
|
64
|
+
var pointHistoryQuerySchema = z.strictObject({
|
|
65
|
+
ledger: identifier,
|
|
66
|
+
cursor: pageCursorSchema.optional()
|
|
67
|
+
});
|
|
68
|
+
var pointHistoryPageSchema = z.object({
|
|
69
|
+
items: z.array(pointEntrySchema),
|
|
70
|
+
nextCursor: pageCursorSchema.nullable()
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// src/telegram.ts
|
|
74
|
+
import * as z2 from "zod";
|
|
75
|
+
var telegramSignInMethodsSchema = z2.object({
|
|
76
|
+
/** Telegram Login, the OpenID Connect sign-in Domino configures for the platform. */
|
|
77
|
+
login: z2.boolean(),
|
|
78
|
+
/** Mini App sign-in, which the project enables in Console with its bot's ID. */
|
|
79
|
+
miniApp: z2.boolean()
|
|
80
|
+
});
|
|
81
|
+
var telegramAccountConnectionSchema = accountConnectionSchema.extend({
|
|
82
|
+
provider: z2.literal("telegram")
|
|
83
|
+
});
|
|
84
|
+
var telegramInitDataSchema = z2.string().min(1, "Pass the Mini App's Telegram.WebApp.initData").max(8192);
|
|
85
|
+
var telegramMiniAppSignInSchema = z2.object({
|
|
86
|
+
initData: telegramInitDataSchema,
|
|
87
|
+
mode: z2.enum(["sign-in", "connect"])
|
|
88
|
+
}).strict();
|
|
89
|
+
var telegramChatIdSchema = z2.string().regex(
|
|
90
|
+
/^-?[1-9][0-9]{0,19}$/,
|
|
91
|
+
"Use the chat's numeric ID, such as -1001234567890"
|
|
92
|
+
);
|
|
93
|
+
var telegramChatSchema = z2.object({
|
|
94
|
+
/** The numeric chat ID, as a string. */
|
|
95
|
+
id: telegramChatIdSchema,
|
|
96
|
+
/** `group`, `supergroup` or `channel`; a later Telegram may add others. */
|
|
97
|
+
type: z2.string(),
|
|
98
|
+
title: z2.string(),
|
|
99
|
+
/** The public @username, without the @, or null for a private chat. */
|
|
100
|
+
username: z2.string().nullable(),
|
|
101
|
+
status: z2.string(),
|
|
102
|
+
issue: z2.string().nullable(),
|
|
103
|
+
connectedAt: z2.number()
|
|
104
|
+
});
|
|
105
|
+
var telegramChatsSchema = z2.object({
|
|
106
|
+
configured: z2.boolean(),
|
|
107
|
+
/** Domino's bot, the one operators add to their chats. */
|
|
108
|
+
bot: z2.object({ username: z2.string() }).nullable(),
|
|
109
|
+
chats: z2.array(telegramChatSchema)
|
|
110
|
+
});
|
|
111
|
+
var telegramChatConnectionSchema = z2.object({
|
|
112
|
+
url: z2.string(),
|
|
113
|
+
expiresAt: z2.number()
|
|
114
|
+
});
|
|
115
|
+
var telegramMemberInputSchema = z2.object({
|
|
116
|
+
chat: z2.string().regex(
|
|
117
|
+
/^(-?[1-9][0-9]{0,19}|@[A-Za-z][A-Za-z0-9_]{3,31})$/,
|
|
118
|
+
"Name a chat the project connected, by its numeric ID or @username"
|
|
119
|
+
)
|
|
120
|
+
}).strict();
|
|
121
|
+
var telegramChatMemberSchema = z2.object({
|
|
122
|
+
/** The numeric Telegram user ID. */
|
|
123
|
+
userId: z2.string(),
|
|
124
|
+
username: z2.string().nullable(),
|
|
125
|
+
status: z2.custom(
|
|
126
|
+
(value) => typeof value === "string"
|
|
127
|
+
),
|
|
128
|
+
/** Whether they are in the chat now: a creator, administrator, member, or restricted member. */
|
|
129
|
+
isMember: z2.boolean(),
|
|
130
|
+
/** Whether they are its creator or an administrator. */
|
|
131
|
+
isAdmin: z2.boolean(),
|
|
132
|
+
/** When a paid subscription or a restriction ends, epoch milliseconds; null when it does not. */
|
|
133
|
+
untilDate: z2.number().nullable()
|
|
134
|
+
});
|
|
135
|
+
var telegramReactionsNamespace = "telegram-reactions";
|
|
136
|
+
var telegramReactionDataSchema = z2.object({
|
|
137
|
+
/** The chat's numeric ID, as a string. */
|
|
138
|
+
chatId: z2.string(),
|
|
139
|
+
/** `group` or `supergroup`: channel reactions are anonymous and never recorded. */
|
|
140
|
+
chatType: z2.string(),
|
|
141
|
+
messageId: z2.number(),
|
|
142
|
+
/** `emoji`, `custom_emoji` or `paid`. */
|
|
143
|
+
reactionType: z2.string(),
|
|
144
|
+
/** The emoji, such as "❤", for an `emoji` reaction; null otherwise. */
|
|
145
|
+
emoji: z2.string().nullable(),
|
|
146
|
+
/** The custom emoji's ID for a `custom_emoji` reaction; null otherwise. */
|
|
147
|
+
customEmojiId: z2.string().nullable(),
|
|
148
|
+
/**
|
|
149
|
+
* `creator` or `administrator` for one of the chat's administrators, read at most ten minutes
|
|
150
|
+
* before Relay recorded the reaction; `member` for anyone else.
|
|
151
|
+
*/
|
|
152
|
+
reactorStatus: z2.string(),
|
|
153
|
+
/** Whether the reactor was the chat's creator or an administrator then. */
|
|
154
|
+
reactorIsAdmin: z2.boolean()
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// src/profiles.ts
|
|
158
|
+
import * as z3 from "zod";
|
|
159
|
+
var count = z3.number().int().nonnegative().safe();
|
|
160
|
+
var profileVisibilitySchema = z3.enum([
|
|
161
|
+
"private",
|
|
162
|
+
"participants",
|
|
163
|
+
"public"
|
|
164
|
+
]);
|
|
165
|
+
var avatarProviderSchema = z3.enum(["x", "discord", "google"]);
|
|
166
|
+
var profileDefaultProviderSchema = z3.enum(["x", "discord"]);
|
|
167
|
+
var profileDefaultsSchema = z3.array(profileDefaultProviderSchema).max(profileDefaultProviderSchema.options.length).refine(
|
|
168
|
+
(providers) => new Set(providers).size === providers.length,
|
|
169
|
+
"List each provider once"
|
|
170
|
+
);
|
|
171
|
+
var avatarSeedSchema = z3.string().min(1).max(100);
|
|
172
|
+
var profileAvatarSchema = z3.discriminatedUnion("source", [
|
|
173
|
+
z3.object({
|
|
174
|
+
source: z3.literal("upload"),
|
|
175
|
+
url: z3.string().url(),
|
|
176
|
+
seed: avatarSeedSchema
|
|
177
|
+
}),
|
|
178
|
+
z3.object({
|
|
179
|
+
source: z3.literal("account"),
|
|
180
|
+
provider: avatarProviderSchema,
|
|
181
|
+
url: z3.string().url(),
|
|
182
|
+
seed: avatarSeedSchema
|
|
183
|
+
}),
|
|
184
|
+
z3.object({ source: z3.literal("generated"), seed: avatarSeedSchema })
|
|
185
|
+
]);
|
|
186
|
+
var profileSummarySchema = z3.object({
|
|
187
|
+
id: identifier,
|
|
188
|
+
name: z3.string(),
|
|
189
|
+
avatar: profileAvatarSchema
|
|
190
|
+
});
|
|
191
|
+
var invisible = /[\p{Cc}----]/u;
|
|
192
|
+
var displayNameSchema = z3.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
|
|
193
|
+
z3.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
|
|
194
|
+
);
|
|
195
|
+
var profileUpdateSchema = z3.object({
|
|
196
|
+
displayName: displayNameSchema.nullable().optional(),
|
|
197
|
+
avatar: z3.discriminatedUnion("source", [
|
|
198
|
+
z3.object({
|
|
199
|
+
source: z3.literal("account"),
|
|
200
|
+
provider: avatarProviderSchema
|
|
201
|
+
}).strict(),
|
|
202
|
+
z3.object({ source: z3.literal("generated") }).strict()
|
|
203
|
+
]).nullable().optional(),
|
|
204
|
+
hidden: z3.boolean().optional()
|
|
205
|
+
}).strict().refine(
|
|
206
|
+
(value) => Object.values(value).some((field) => field !== void 0),
|
|
207
|
+
"Change at least one field"
|
|
208
|
+
);
|
|
209
|
+
var ownProfileSchema = profileSummarySchema.extend({
|
|
210
|
+
/** The name the member chose, or null for the default. */
|
|
211
|
+
displayName: z3.string().nullable(),
|
|
212
|
+
/** The avatar the member chose: `default` follows the project's defaults. */
|
|
213
|
+
avatarChoice: z3.enum(["default", "upload", "account", "generated"]),
|
|
214
|
+
/** The account of an `account` choice. */
|
|
215
|
+
avatarProvider: avatarProviderSchema.nullable(),
|
|
216
|
+
hidden: z3.boolean(),
|
|
217
|
+
/** An operator locked the name and avatar; the member can still hide the profile. */
|
|
218
|
+
locked: z3.boolean(),
|
|
219
|
+
/** Who can see profiles in this project, so the app can explain it. */
|
|
220
|
+
visibility: profileVisibilitySchema,
|
|
221
|
+
/** The member's connected accounts a picture or name can come from. */
|
|
222
|
+
options: z3.array(
|
|
223
|
+
z3.object({
|
|
224
|
+
provider: avatarProviderSchema,
|
|
225
|
+
name: z3.string().nullable(),
|
|
226
|
+
/**
|
|
227
|
+
* The account's first name, where the provider sends one (Google does; X and Discord don't).
|
|
228
|
+
* Only the member's own profile carries it.
|
|
229
|
+
*/
|
|
230
|
+
givenName: z3.string().nullable().default(null),
|
|
231
|
+
imageUrl: z3.string().url().nullable()
|
|
232
|
+
})
|
|
233
|
+
)
|
|
234
|
+
});
|
|
235
|
+
var cursor = z3.string().min(1).max(512);
|
|
236
|
+
var profileCompletionQuerySchema = z3.object({
|
|
237
|
+
limit: z3.coerce.number().int().min(1).max(100).default(20),
|
|
238
|
+
cursor: cursor.optional()
|
|
239
|
+
}).strict();
|
|
240
|
+
var profileCompletionSchema = z3.object({
|
|
241
|
+
quest: identifier,
|
|
242
|
+
key: identifier.optional(),
|
|
243
|
+
title: z3.string(),
|
|
244
|
+
completions: count.positive(),
|
|
245
|
+
/** Null for completions recorded before completion times were. */
|
|
246
|
+
lastCompletedAt: count.nullable()
|
|
247
|
+
});
|
|
248
|
+
var profileCompletionPageSchema = z3.object({
|
|
249
|
+
items: z3.array(profileCompletionSchema),
|
|
250
|
+
nextCursor: cursor.nullable()
|
|
251
|
+
});
|
|
252
|
+
var profileReferralSchema = z3.object({
|
|
253
|
+
program: identifier,
|
|
254
|
+
key: identifier.optional(),
|
|
255
|
+
title: z3.string(),
|
|
256
|
+
/** Members this member invited. Invitations are shared by every program. */
|
|
257
|
+
invited: count,
|
|
258
|
+
/** Invited members who qualified in this program. */
|
|
259
|
+
qualified: count,
|
|
260
|
+
milestones: z3.array(
|
|
261
|
+
z3.object({ id: identifier, count, reached: z3.boolean() })
|
|
262
|
+
)
|
|
263
|
+
});
|
|
264
|
+
var profileSettingsSchema = z3.object({
|
|
265
|
+
visibility: profileVisibilitySchema,
|
|
266
|
+
defaults: profileDefaultsSchema,
|
|
267
|
+
revision: count,
|
|
268
|
+
actor: z3.string().nullable(),
|
|
269
|
+
updatedAt: count.nullable()
|
|
270
|
+
});
|
|
271
|
+
var profileSettingsInputSchema = profileSettingsSchema.omit({ revision: true, actor: true, updatedAt: true }).extend({
|
|
272
|
+
actionId: identifier,
|
|
273
|
+
/** The revision the change was made against; a newer one is a 409. */
|
|
274
|
+
expectedRevision: count,
|
|
275
|
+
reason: z3.string().trim().min(1).max(500)
|
|
276
|
+
}).strict();
|
|
277
|
+
var profileModerationSchema = z3.object({
|
|
278
|
+
actionId: identifier,
|
|
279
|
+
resetName: z3.boolean().default(false),
|
|
280
|
+
removeAvatar: z3.boolean().default(false),
|
|
281
|
+
/** True locks the name and avatar, false unlocks them. */
|
|
282
|
+
lock: z3.boolean().optional(),
|
|
283
|
+
reason: z3.string().trim().min(1).max(1e3)
|
|
284
|
+
}).strict().refine(
|
|
285
|
+
(value) => value.resetName || value.removeAvatar || value.lock !== void 0,
|
|
286
|
+
"Choose an action"
|
|
287
|
+
);
|
|
288
|
+
var managedProfileSchema = ownProfileSchema.omit({ options: true }).extend({
|
|
289
|
+
member: identifier,
|
|
290
|
+
lockedAt: count.nullable(),
|
|
291
|
+
lockedBy: z3.string().nullable(),
|
|
292
|
+
lockedReason: z3.string().nullable(),
|
|
293
|
+
updatedAt: count
|
|
294
|
+
});
|
|
295
|
+
var AVATAR_UPLOAD_LIMIT = 5 * 1024 * 1024;
|
|
296
|
+
var avatarUploadTypes = ["image/jpeg", "image/png", "image/webp"];
|
|
297
|
+
|
|
298
|
+
export {
|
|
299
|
+
pointLedgerPropertiesSchema,
|
|
300
|
+
createPointLedgerSchema,
|
|
301
|
+
pointLedgerSchema,
|
|
302
|
+
managedPointLedgerSchema,
|
|
303
|
+
pointLedgerDeclarationSchema,
|
|
304
|
+
pointLedgerArtifactSchema,
|
|
305
|
+
pointLedgerReferenceSchema,
|
|
306
|
+
pointBalanceSchema,
|
|
307
|
+
pointBalancesSchema,
|
|
308
|
+
PointEntryKind,
|
|
309
|
+
pointEntrySchema,
|
|
310
|
+
pointHistoryQuerySchema,
|
|
311
|
+
pointHistoryPageSchema,
|
|
312
|
+
telegramSignInMethodsSchema,
|
|
313
|
+
telegramAccountConnectionSchema,
|
|
314
|
+
telegramInitDataSchema,
|
|
315
|
+
telegramMiniAppSignInSchema,
|
|
316
|
+
telegramChatIdSchema,
|
|
317
|
+
telegramChatSchema,
|
|
318
|
+
telegramChatsSchema,
|
|
319
|
+
telegramChatConnectionSchema,
|
|
320
|
+
telegramMemberInputSchema,
|
|
321
|
+
telegramChatMemberSchema,
|
|
322
|
+
telegramReactionsNamespace,
|
|
323
|
+
telegramReactionDataSchema,
|
|
324
|
+
profileVisibilitySchema,
|
|
325
|
+
avatarProviderSchema,
|
|
326
|
+
profileDefaultProviderSchema,
|
|
327
|
+
profileDefaultsSchema,
|
|
328
|
+
avatarSeedSchema,
|
|
329
|
+
profileAvatarSchema,
|
|
330
|
+
profileSummarySchema,
|
|
331
|
+
displayNameSchema,
|
|
332
|
+
profileUpdateSchema,
|
|
333
|
+
ownProfileSchema,
|
|
334
|
+
profileCompletionQuerySchema,
|
|
335
|
+
profileCompletionSchema,
|
|
336
|
+
profileCompletionPageSchema,
|
|
337
|
+
profileReferralSchema,
|
|
338
|
+
profileSettingsSchema,
|
|
339
|
+
profileSettingsInputSchema,
|
|
340
|
+
profileModerationSchema,
|
|
341
|
+
managedProfileSchema,
|
|
342
|
+
AVATAR_UPLOAD_LIMIT,
|
|
343
|
+
avatarUploadTypes
|
|
344
|
+
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CK7HO32Z.js";
|
|
8
8
|
import {
|
|
9
9
|
photoResultSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BHHUSBSD.js";
|
|
11
11
|
|
|
12
12
|
// src/image-results.ts
|
|
13
13
|
import * as z from "zod";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-
|
|
1
|
+
import { m as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, o as TrackerSkipCode, i as PointHistoryQuery, g as PointEntryKind, ao as submitSchema, ap as contentPerformanceQuerySchema } from './schema-C4m9RhCR.js';
|
|
2
|
+
import { l as QuestView, m as ResponseSchema, c as PageQuery, e as QuestEnrollmentInput, Q as QuestClaimInput, i as QuestOutcomeQuery, q as questExperienceSchema, a as CreatorAccountProvider, n as RewardDeliveryQuery, o as RewardDeliveryAction, r as contentQualificationQuerySchema } from './pages-BlLqB8ZQ.js';
|
|
3
|
+
import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-wTiYGdgA.js';
|
|
4
4
|
import { a as RequestError, b as RequestErrorDetails, c as RequestErrorKind, e as createRelayAction, O as OptionalActionId } from './action-DBzILFx9.js';
|
|
5
|
-
import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, ae as submitSchema, af as contentPerformanceQuerySchema } from './schema-BJ9bOgpN.js';
|
|
6
5
|
import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-iciCEs_8.js';
|
|
7
6
|
import * as z from 'zod';
|
|
8
7
|
import { a as AuthProvider } from './accounts-DRPENuZe.js';
|
|
9
|
-
import { p as
|
|
8
|
+
import { p as referralAcceptSchema, i as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, f as LeaderboardHistoryQuery, q as engagementPageQuerySchema } from './groups-DPE004_V.js';
|
|
9
|
+
import { p as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-BoOK03cR.js';
|
|
10
10
|
import { w as walletAddressInputSchema, o as walletSignatureSchema, L as LinkedWallet, f as WalletSigner } from './wallet-Ac7OFpOr.js';
|
|
11
11
|
|
|
12
12
|
/** What happened, as in every Domino client error (see `RequestError`). */
|
|
@@ -59,6 +59,11 @@ declare const RelayErrorCode: {
|
|
|
59
59
|
* says when they may submit again.
|
|
60
60
|
*/
|
|
61
61
|
readonly RetryCooldown: "retry-cooldown";
|
|
62
|
+
/**
|
|
63
|
+
* The member's last accepted completion of the quest is more recent than its completion
|
|
64
|
+
* cooldown; `retryAt` says when they may submit again.
|
|
65
|
+
*/
|
|
66
|
+
readonly CompletionCooldown: "completion-cooldown";
|
|
62
67
|
/** The quiz changed since the member answered it. */
|
|
63
68
|
readonly StaleQuiz: "stale-quiz";
|
|
64
69
|
/** Relay refused the submitted evidence. */
|
|
@@ -89,7 +94,7 @@ declare const RelayErrorCode: {
|
|
|
89
94
|
readonly Credential: "credential";
|
|
90
95
|
/** A wallet signer failed or the member refused to sign; `cause` is the wallet's own error. */
|
|
91
96
|
readonly WalletSigner: "wallet-signer";
|
|
92
|
-
/** The member has not met the quest's prerequisites; `missing` lists them. */
|
|
97
|
+
/** The member has not met the quest's or offer's prerequisites; `missing` lists them. */
|
|
93
98
|
readonly PrerequisitesIncomplete: "prerequisites-incomplete";
|
|
94
99
|
/** The quest is archived or retired: it takes no new participation. */
|
|
95
100
|
readonly QuestClosed: "quest-closed";
|
|
@@ -115,7 +120,10 @@ type RelayErrorDetails = RequestErrorDetails & {
|
|
|
115
120
|
/** Which window refused admission when `code` is `outside-window`. */
|
|
116
121
|
window?: "tracker" | "quest";
|
|
117
122
|
missing?: MissingPrerequisite[];
|
|
118
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Unix milliseconds when the member may submit again, when `code` is `retry-cooldown` or
|
|
125
|
+
* `completion-cooldown`.
|
|
126
|
+
*/
|
|
119
127
|
retryAt?: number;
|
|
120
128
|
};
|
|
121
129
|
declare const relayErrorBrand: unique symbol;
|
|
@@ -134,7 +142,10 @@ declare class RelayError extends RequestError {
|
|
|
134
142
|
readonly window: "tracker" | "quest" | undefined;
|
|
135
143
|
/** Prerequisites the member does not currently meet, when Relay refused for that reason. */
|
|
136
144
|
readonly missing: MissingPrerequisite[];
|
|
137
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Unix milliseconds when the member may submit again, when `code` is `retry-cooldown` or
|
|
147
|
+
* `completion-cooldown`.
|
|
148
|
+
*/
|
|
138
149
|
readonly retryAt: number | undefined;
|
|
139
150
|
constructor(message: string, details: RelayErrorDetails);
|
|
140
151
|
}
|
|
@@ -412,7 +423,48 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
412
423
|
} | {
|
|
413
424
|
kind: "paused";
|
|
414
425
|
};
|
|
426
|
+
missing: ({
|
|
427
|
+
kind: "completion";
|
|
428
|
+
quest: string;
|
|
429
|
+
title: string;
|
|
430
|
+
scope: "ever";
|
|
431
|
+
} | {
|
|
432
|
+
kind: "completion";
|
|
433
|
+
quest: string;
|
|
434
|
+
title: string;
|
|
435
|
+
scope: "period";
|
|
436
|
+
period: "day" | "week" | "month";
|
|
437
|
+
resetsAt: number;
|
|
438
|
+
} | {
|
|
439
|
+
kind: "balance";
|
|
440
|
+
balance: string;
|
|
441
|
+
title: string;
|
|
442
|
+
minimum: number;
|
|
443
|
+
current: number;
|
|
444
|
+
} | {
|
|
445
|
+
kind: "group";
|
|
446
|
+
group: string;
|
|
447
|
+
title: string;
|
|
448
|
+
})[];
|
|
415
449
|
key?: string | undefined;
|
|
450
|
+
requires?: ({
|
|
451
|
+
kind: "completion";
|
|
452
|
+
quest: string;
|
|
453
|
+
scope: "ever";
|
|
454
|
+
} | {
|
|
455
|
+
kind: "completion";
|
|
456
|
+
quest: string;
|
|
457
|
+
scope: "period";
|
|
458
|
+
period: "day" | "week" | "month";
|
|
459
|
+
} | {
|
|
460
|
+
kind: "balance";
|
|
461
|
+
balance: string;
|
|
462
|
+
minimum: number;
|
|
463
|
+
} | {
|
|
464
|
+
kind: "group";
|
|
465
|
+
group: string;
|
|
466
|
+
title: string;
|
|
467
|
+
})[] | undefined;
|
|
416
468
|
}[]>;
|
|
417
469
|
/** Redeems one offer. Persist `actionId` to retry after an uncertain result. */
|
|
418
470
|
redeem: (offer: string, value?: {
|
|
@@ -1217,6 +1269,15 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1217
1269
|
amount: number;
|
|
1218
1270
|
})[];
|
|
1219
1271
|
}[];
|
|
1272
|
+
pool?: {
|
|
1273
|
+
amount: string;
|
|
1274
|
+
unit: "points" | {
|
|
1275
|
+
code: string;
|
|
1276
|
+
decimals: number;
|
|
1277
|
+
};
|
|
1278
|
+
ledger?: string | undefined;
|
|
1279
|
+
minScore?: number | undefined;
|
|
1280
|
+
} | undefined;
|
|
1220
1281
|
} | undefined;
|
|
1221
1282
|
}[]>;
|
|
1222
1283
|
standings: (board: string, query?: LeaderboardQuery, requestOptions?: RelayRequestOptions) => Promise<{
|
|
@@ -1364,6 +1425,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1364
1425
|
options: {
|
|
1365
1426
|
provider: "discord" | "google" | "x";
|
|
1366
1427
|
name: string | null;
|
|
1428
|
+
givenName: string | null;
|
|
1367
1429
|
imageUrl: string | null;
|
|
1368
1430
|
}[];
|
|
1369
1431
|
}>;
|
|
@@ -1398,6 +1460,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1398
1460
|
options: {
|
|
1399
1461
|
provider: "discord" | "google" | "x";
|
|
1400
1462
|
name: string | null;
|
|
1463
|
+
givenName: string | null;
|
|
1401
1464
|
imageUrl: string | null;
|
|
1402
1465
|
}[];
|
|
1403
1466
|
}>;
|
|
@@ -1434,6 +1497,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1434
1497
|
options: {
|
|
1435
1498
|
provider: "discord" | "google" | "x";
|
|
1436
1499
|
name: string | null;
|
|
1500
|
+
givenName: string | null;
|
|
1437
1501
|
imageUrl: string | null;
|
|
1438
1502
|
}[];
|
|
1439
1503
|
}>;
|
|
@@ -1899,6 +1963,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1899
1963
|
} | null;
|
|
1900
1964
|
} | null | undefined;
|
|
1901
1965
|
retryAt?: number | undefined;
|
|
1966
|
+
nextAvailableAt?: number | undefined;
|
|
1902
1967
|
}>;
|
|
1903
1968
|
/**
|
|
1904
1969
|
* Enrolls the signed-in member in a quest whose tracker trigger requires enrollment. Activity
|
|
@@ -2586,6 +2651,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2586
2651
|
} | null;
|
|
2587
2652
|
} | null | undefined;
|
|
2588
2653
|
retryAt?: number | undefined;
|
|
2654
|
+
nextAvailableAt?: number | undefined;
|
|
2589
2655
|
}[];
|
|
2590
2656
|
collections: {
|
|
2591
2657
|
id: string;
|
|
@@ -2999,6 +3065,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2999
3065
|
} | null;
|
|
3000
3066
|
} | null | undefined;
|
|
3001
3067
|
retryAt?: number | undefined;
|
|
3068
|
+
nextAvailableAt?: number | undefined;
|
|
3002
3069
|
}[];
|
|
3003
3070
|
key?: string | undefined;
|
|
3004
3071
|
description?: string | undefined;
|
|
@@ -3418,6 +3485,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3418
3485
|
} | null;
|
|
3419
3486
|
} | null | undefined;
|
|
3420
3487
|
retryAt?: number | undefined;
|
|
3488
|
+
nextAvailableAt?: number | undefined;
|
|
3421
3489
|
}[];
|
|
3422
3490
|
key?: string | undefined;
|
|
3423
3491
|
description?: string | undefined;
|
|
@@ -3640,6 +3708,40 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3640
3708
|
}>;
|
|
3641
3709
|
};
|
|
3642
3710
|
};
|
|
3711
|
+
/**
|
|
3712
|
+
* The member's creator accounts: the platform accounts they publish from, such as a YouTube
|
|
3713
|
+
* channel, which managed tracker sources read. A creator account is linked only to a
|
|
3714
|
+
* signed-in member, never used to sign in, and linking another one on the same platform
|
|
3715
|
+
* replaces it.
|
|
3716
|
+
*/
|
|
3717
|
+
creatorAccounts: {
|
|
3718
|
+
/** One entry per creator-account provider the platform configured. */
|
|
3719
|
+
list: (requestOptions?: RelayRequestOptions) => Promise<{
|
|
3720
|
+
accounts: {
|
|
3721
|
+
provider: CreatorAccountProvider;
|
|
3722
|
+
configured: boolean;
|
|
3723
|
+
status: "disconnected" | "connected" | "reconnect";
|
|
3724
|
+
subject: string | null;
|
|
3725
|
+
revision: number;
|
|
3726
|
+
profile: {
|
|
3727
|
+
name?: string | undefined;
|
|
3728
|
+
username?: string | undefined;
|
|
3729
|
+
imageUrl?: string | undefined;
|
|
3730
|
+
} | null;
|
|
3731
|
+
}[];
|
|
3732
|
+
}>;
|
|
3733
|
+
/**
|
|
3734
|
+
* Leaves for the provider's consent screen to link an account to the signed-in member.
|
|
3735
|
+
* Answers the URL to open; the browser comes back to the app linked.
|
|
3736
|
+
*/
|
|
3737
|
+
connect: (provider: CreatorAccountProvider, requestOptions?: RelayRequestOptions) => Promise<{
|
|
3738
|
+
url: string;
|
|
3739
|
+
}>;
|
|
3740
|
+
/** Unlinks the member's account on `provider`. Records it authored stay. */
|
|
3741
|
+
disconnect: (provider: CreatorAccountProvider, requestOptions?: RelayRequestOptions) => Promise<{
|
|
3742
|
+
ok: boolean;
|
|
3743
|
+
}>;
|
|
3744
|
+
};
|
|
3643
3745
|
/** The member's connected sign-in accounts, one per provider. */
|
|
3644
3746
|
accounts: (requestOptions?: RelayRequestOptions) => Promise<{
|
|
3645
3747
|
provider: "discord" | "google" | "apple" | "x";
|
|
@@ -4224,6 +4326,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
4224
4326
|
} | null;
|
|
4225
4327
|
} | null | undefined;
|
|
4226
4328
|
retryAt?: number | undefined;
|
|
4329
|
+
nextAvailableAt?: number | undefined;
|
|
4227
4330
|
}[];
|
|
4228
4331
|
entitlements: ({
|
|
4229
4332
|
[x: string]: unknown;
|