@domino-sdk/relay 1.7.0 → 1.10.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/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{activity-Br6vyYze.d.ts → activity-C0O3g7VJ.d.ts} +9 -9
- package/dist/authoring.d.ts +12 -12
- package/dist/authoring.js +3 -3
- package/dist/{automatic-outcomes-C1Q9LrDb.d.ts → automatic-outcomes-kPIDv6X_.d.ts} +1 -1
- package/dist/avatar.d.ts +2 -2
- package/dist/browser.d.ts +9 -8
- package/dist/browser.js +8 -6
- package/dist/{capability-error-Bv996M-h.d.ts → capability-error-ty3SqD_b.d.ts} +1 -1
- package/dist/{chunk-KGJSKGKI.js → chunk-23JUD56J.js} +1119 -910
- package/dist/{chunk-ZOUEEK5L.js → chunk-7BRHUUVB.js} +83 -26
- package/dist/{chunk-C25TDFHN.js → chunk-BKLGWPPD.js} +48 -37
- package/dist/{chunk-6ON4RMEN.js → chunk-BUXNTVER.js} +1 -1
- package/dist/{chunk-BFZHJA2B.js → chunk-GEPSEVQO.js} +2 -2
- package/dist/chunk-GFAFH7XR.js +98 -0
- package/dist/{chunk-6RBF3UDA.js → chunk-GPS546KR.js} +232 -7
- package/dist/{chunk-5ECM6AWV.js → chunk-MMWTHVXW.js} +3 -3
- package/dist/chunk-N2HXMTVA.js +13 -0
- package/dist/{chunk-23QJ7WH4.js → chunk-QL77V77D.js} +1 -1
- package/dist/{chunk-GMPPLZKH.js → chunk-UIR6NSYZ.js} +243 -228
- package/dist/{chunk-JW4G3SY5.js → chunk-WRBPLXVP.js} +60 -47
- package/dist/{client-pfml_XAa.d.ts → client-Yq11HA_f.d.ts} +64 -43
- package/dist/{groups-BpWEqaPn.d.ts → groups-BK8ts2yK.d.ts} +94 -6
- package/dist/{images-BaKYd0fl.d.ts → images-aw6W7vFZ.d.ts} +2 -2
- package/dist/index.d.ts +10 -9
- package/dist/index.js +10 -5
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +5 -5
- package/dist/{offers-CYtal8jO.d.ts → offers-C2FANzrG.d.ts} +3 -3
- package/dist/{pages-CixTNnF4.d.ts → pages-D00JDZB-.d.ts} +70 -39
- package/dist/portal-proxy.js +8 -2
- package/dist/react/index.d.ts +203 -19
- package/dist/react/index.js +256 -113
- package/dist/{referral-reward-kinds-ClxAuCGx.d.ts → referral-reward-kinds-M3f0PdiR.d.ts} +2 -2
- package/dist/{schema-CQydLqw4.d.ts → schema-DEM8y8Fm.d.ts} +16 -16
- package/dist/schema.d.ts +11239 -13
- package/dist/schema.js +38 -6
- package/dist/server/index.d.ts +43693 -52
- package/dist/server/index.js +465 -53
- package/dist/{sign-in-options-CtXUFV7E.d.ts → sign-in-options-Coim0G1u.d.ts} +3 -3
- package/dist/{submission-input-CLefHTrj.d.ts → submission-input-BbBJTVlT.d.ts} +3 -3
- package/dist/util.d-w9f9t3ua.d.ts +5 -0
- package/dist/{wallet-YssWxGg8.d.ts → wallet-CDyo-U4n.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/{profiles-D2aFcOxu.d.ts → profiles-BHMVj0kM.d.ts} +5 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
identifier,
|
|
3
|
+
responseShape,
|
|
3
4
|
xTweetSchema
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-23JUD56J.js";
|
|
5
6
|
|
|
6
7
|
// src/x.ts
|
|
7
8
|
import { z } from "zod";
|
|
@@ -85,33 +86,41 @@ var imageRequestSchema = z2.discriminatedUnion("operation", [
|
|
|
85
86
|
})
|
|
86
87
|
]);
|
|
87
88
|
var hash = z2.string().regex(/^[0-9a-f]{16}$/);
|
|
88
|
-
var imageInspectionSchema =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
var imageInspectionSchema = responseShape(
|
|
90
|
+
z2.strictObject({
|
|
91
|
+
width: z2.number().int().positive(),
|
|
92
|
+
height: z2.number().int().positive(),
|
|
93
|
+
format: z2.enum(["jpeg", "png", "webp", "gif", "avif"]),
|
|
94
|
+
bytes: z2.number().int().positive(),
|
|
95
|
+
sha256: z2.string().regex(/^[0-9a-f]{64}$/),
|
|
96
|
+
phash: hash,
|
|
97
|
+
dhash: hash
|
|
98
|
+
})
|
|
99
|
+
);
|
|
97
100
|
var distance = z2.number().int().min(0).max(64);
|
|
98
|
-
var imageComparisonSchema =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
101
|
+
var imageComparisonSchema = responseShape(
|
|
102
|
+
z2.strictObject({
|
|
103
|
+
identical: z2.boolean(),
|
|
104
|
+
phashDistance: distance,
|
|
105
|
+
dhashDistance: distance
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
var imageExtractionSchema = responseShape(
|
|
109
|
+
z2.strictObject({
|
|
110
|
+
values: z2.record(
|
|
111
|
+
z2.string(),
|
|
112
|
+
z2.union([z2.string().max(2e3), z2.number(), z2.boolean(), z2.null()])
|
|
113
|
+
),
|
|
114
|
+
reason: z2.string().min(1).max(2e3)
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
var imageSightingsSchema = responseShape(
|
|
118
|
+
z2.strictObject({
|
|
119
|
+
matches: z2.number().int().nonnegative(),
|
|
120
|
+
closestDistance: distance.nullable(),
|
|
121
|
+
firstSeenAt: z2.number().int().nonnegative().nullable()
|
|
122
|
+
})
|
|
123
|
+
);
|
|
115
124
|
var sha256 = z2.string().regex(/^[0-9a-f]{64}$/);
|
|
116
125
|
var imageSize = z2.number().int().positive().max(5 * 1024 * 1024);
|
|
117
126
|
var imageAssetArtifactSchema = z2.strictObject({
|
|
@@ -129,26 +138,30 @@ var imageUploadRequestSchema = z2.strictObject({
|
|
|
129
138
|
})
|
|
130
139
|
).min(1).max(10)
|
|
131
140
|
});
|
|
132
|
-
var imageUploadsSchema =
|
|
133
|
-
|
|
134
|
-
z2.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
141
|
+
var imageUploadsSchema = responseShape(
|
|
142
|
+
z2.strictObject({
|
|
143
|
+
images: z2.array(
|
|
144
|
+
z2.strictObject({
|
|
145
|
+
sha256,
|
|
146
|
+
upload: z2.strictObject({
|
|
147
|
+
url: z2.string().url(),
|
|
148
|
+
headers: z2.record(z2.string(), z2.string()),
|
|
149
|
+
expiresAt: z2.number().int().positive()
|
|
150
|
+
}).nullable()
|
|
151
|
+
})
|
|
152
|
+
)
|
|
153
|
+
})
|
|
154
|
+
);
|
|
155
|
+
var publishedImageSchema = responseShape(
|
|
156
|
+
z2.strictObject({
|
|
157
|
+
key: identifier,
|
|
158
|
+
sha256,
|
|
159
|
+
type: z2.enum(["image/jpeg", "image/png", "image/webp"]),
|
|
160
|
+
size: imageSize,
|
|
161
|
+
width: z2.number().int().positive(),
|
|
162
|
+
height: z2.number().int().positive()
|
|
163
|
+
})
|
|
164
|
+
);
|
|
152
165
|
|
|
153
166
|
export {
|
|
154
167
|
xIdSchema,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { j as QuestView, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery,
|
|
3
|
-
import { M as MissingPrerequisite, V as ValueEvidence, a as AuthProvider } from './submission-input-
|
|
1
|
+
import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-BK8ts2yK.js';
|
|
2
|
+
import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, Y as questExperienceSchema, l as RewardDeliveryAction, E as contentQualificationQuerySchema } from './pages-D00JDZB-.js';
|
|
3
|
+
import { M as MissingPrerequisite, V as ValueEvidence, a as AuthProvider } from './submission-input-BbBJTVlT.js';
|
|
4
4
|
import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-D_dUPLwo.js';
|
|
5
|
-
import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode,
|
|
5
|
+
import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, c6 as submitSchema, b8 as contentPerformanceQuerySchema } from './schema-DEM8y8Fm.js';
|
|
6
6
|
import { b as ParticipantSession, d as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-DkL3nY5a.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { c as createRelayAction, O as OptionalActionId } from './action-9Xl0StBg.js';
|
|
9
|
+
import { F as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-BHMVj0kM.js';
|
|
10
|
+
import { y as walletAddressInputSchema, I as walletSignatureSchema, L as LinkedWallet, f as WalletSigner } from './wallet-CDyo-U4n.js';
|
|
10
11
|
|
|
11
12
|
/** What happened, as in every Domino client error (see `RequestError`). */
|
|
12
13
|
type RelayErrorKind = RequestErrorKind;
|
|
@@ -266,8 +267,25 @@ type RelayClientOptions = {
|
|
|
266
267
|
*/
|
|
267
268
|
timeout?: number;
|
|
268
269
|
};
|
|
270
|
+
/** @compat input */
|
|
271
|
+
type RelayResponseOptions = RelayRequestOptions & {
|
|
272
|
+
method?: "GET" | "POST";
|
|
273
|
+
input?: unknown;
|
|
274
|
+
/** Persist this identity before sending a write. */
|
|
275
|
+
operationId?: string;
|
|
276
|
+
/** Use only when the route records a receipt for the supplied operation identity. */
|
|
277
|
+
replaySafe?: boolean;
|
|
278
|
+
};
|
|
269
279
|
declare function createRelayClient(options: RelayClientOptions): RelayClient;
|
|
270
280
|
declare function relayClient(options: RelayClientOptions): {
|
|
281
|
+
/** Owns one action key across uncertain writes. Reuse the helper until a definite answer. */
|
|
282
|
+
action: typeof createRelayAction;
|
|
283
|
+
/** A JSON call using an explicit tolerant response schema from `@domino-sdk/relay/schema`. */
|
|
284
|
+
response: <T>(path: string, schema: ResponseSchema<T>, call?: RelayResponseOptions) => Promise<{
|
|
285
|
+
status: number;
|
|
286
|
+
operationId: string | undefined;
|
|
287
|
+
result: Awaited<T>;
|
|
288
|
+
}>;
|
|
271
289
|
offers: {
|
|
272
290
|
/** Offers available to this participant, including stock and per-member availability. */
|
|
273
291
|
list: (requestOptions?: RelayRequestOptions) => Promise<{
|
|
@@ -631,7 +649,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
631
649
|
}[];
|
|
632
650
|
nextCursor: string | null;
|
|
633
651
|
}>;
|
|
634
|
-
accept: (value: z.input<typeof referralAcceptSchema
|
|
652
|
+
accept: (value: OptionalActionId<z.input<typeof referralAcceptSchema>>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
635
653
|
ok: true;
|
|
636
654
|
}>;
|
|
637
655
|
};
|
|
@@ -1060,7 +1078,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1060
1078
|
period: "day" | "week" | "month";
|
|
1061
1079
|
};
|
|
1062
1080
|
};
|
|
1063
|
-
access: "
|
|
1081
|
+
access: "public" | "participants";
|
|
1064
1082
|
key?: string | undefined;
|
|
1065
1083
|
group?: string | undefined;
|
|
1066
1084
|
settle?: {
|
|
@@ -1224,7 +1242,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1224
1242
|
avatarProvider: "discord" | "google" | "x" | null;
|
|
1225
1243
|
hidden: boolean;
|
|
1226
1244
|
locked: boolean;
|
|
1227
|
-
visibility: "
|
|
1245
|
+
visibility: "public" | "private" | "participants";
|
|
1228
1246
|
options: {
|
|
1229
1247
|
provider: "discord" | "google" | "x";
|
|
1230
1248
|
name: string | null;
|
|
@@ -1235,7 +1253,9 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1235
1253
|
* Changes the member's own name, avatar choice or visibility; omitted fields stay, and null
|
|
1236
1254
|
* returns to the default.
|
|
1237
1255
|
*/
|
|
1238
|
-
update: (value: z.input<typeof profileUpdateSchema
|
|
1256
|
+
update: (value: z.input<typeof profileUpdateSchema> & {
|
|
1257
|
+
actionId?: string;
|
|
1258
|
+
}, requestOptions?: RelayRequestOptions) => Promise<{
|
|
1239
1259
|
id: string;
|
|
1240
1260
|
name: string;
|
|
1241
1261
|
avatar: {
|
|
@@ -1256,7 +1276,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1256
1276
|
avatarProvider: "discord" | "google" | "x" | null;
|
|
1257
1277
|
hidden: boolean;
|
|
1258
1278
|
locked: boolean;
|
|
1259
|
-
visibility: "
|
|
1279
|
+
visibility: "public" | "private" | "participants";
|
|
1260
1280
|
options: {
|
|
1261
1281
|
provider: "discord" | "google" | "x";
|
|
1262
1282
|
name: string | null;
|
|
@@ -1269,6 +1289,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1269
1289
|
* `uploadId` and file stores no second picture, but only before another upload replaces it.
|
|
1270
1290
|
*/
|
|
1271
1291
|
uploadAvatar: (file: Blob, requestOptions?: RelayRequestOptions & {
|
|
1292
|
+
actionId?: string;
|
|
1272
1293
|
uploadId?: string;
|
|
1273
1294
|
}) => Promise<{
|
|
1274
1295
|
id: string;
|
|
@@ -1291,7 +1312,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1291
1312
|
avatarProvider: "discord" | "google" | "x" | null;
|
|
1292
1313
|
hidden: boolean;
|
|
1293
1314
|
locked: boolean;
|
|
1294
|
-
visibility: "
|
|
1315
|
+
visibility: "public" | "private" | "participants";
|
|
1295
1316
|
options: {
|
|
1296
1317
|
provider: "discord" | "google" | "x";
|
|
1297
1318
|
name: string | null;
|
|
@@ -1439,14 +1460,14 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1439
1460
|
equals: string | number | boolean;
|
|
1440
1461
|
})[] | undefined;
|
|
1441
1462
|
enrollment?: "none" | "required" | undefined;
|
|
1442
|
-
since?: "
|
|
1463
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
1443
1464
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1444
1465
|
content?: true | undefined;
|
|
1445
1466
|
} | undefined;
|
|
1446
1467
|
};
|
|
1447
1468
|
availability: {
|
|
1448
1469
|
kind: "available";
|
|
1449
|
-
input: "
|
|
1470
|
+
input: "url" | "text" | "none" | "quiz" | "photo";
|
|
1450
1471
|
} | {
|
|
1451
1472
|
kind: "completed";
|
|
1452
1473
|
} | {
|
|
@@ -1476,7 +1497,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1476
1497
|
})[];
|
|
1477
1498
|
} | {
|
|
1478
1499
|
kind: "blocked";
|
|
1479
|
-
reason: "
|
|
1500
|
+
reason: "outside-window" | "enrollment-required" | "budget-exhausted" | "paused" | "connection-required" | "wallet-required";
|
|
1480
1501
|
window?: "quest" | "tracker" | undefined;
|
|
1481
1502
|
resetsAt?: number | undefined;
|
|
1482
1503
|
} | {
|
|
@@ -1639,7 +1660,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1639
1660
|
} | undefined;
|
|
1640
1661
|
} | null;
|
|
1641
1662
|
release: string;
|
|
1642
|
-
interaction: "
|
|
1663
|
+
interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
|
|
1643
1664
|
lifecycle: "paused" | "active" | "archived";
|
|
1644
1665
|
rewards: ({
|
|
1645
1666
|
kind: "points";
|
|
@@ -1734,7 +1755,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1734
1755
|
* counts from then on; earlier activity is historical, or skipped with `before-enrollment`
|
|
1735
1756
|
* on a quest that counts from enrollment. Enrolling again returns the first enrollment.
|
|
1736
1757
|
*/
|
|
1737
|
-
enroll: (value: QuestEnrollmentInput
|
|
1758
|
+
enroll: (value: OptionalActionId<QuestEnrollmentInput>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
1738
1759
|
quest: string;
|
|
1739
1760
|
member: string;
|
|
1740
1761
|
enrolledAt: number;
|
|
@@ -1745,7 +1766,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
1745
1766
|
* historical activity released and returns the outcome; a rule that still fails rejects
|
|
1746
1767
|
* with a `RelayError` whose code is that rule's skip code.
|
|
1747
1768
|
*/
|
|
1748
|
-
claim: (value: QuestClaimInput
|
|
1769
|
+
claim: (value: OptionalActionId<QuestClaimInput>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
1749
1770
|
quest: string;
|
|
1750
1771
|
tracker: string | null;
|
|
1751
1772
|
record: string | null;
|
|
@@ -2092,14 +2113,14 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2092
2113
|
equals: string | number | boolean;
|
|
2093
2114
|
})[] | undefined;
|
|
2094
2115
|
enrollment?: "none" | "required" | undefined;
|
|
2095
|
-
since?: "
|
|
2116
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
2096
2117
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
2097
2118
|
content?: true | undefined;
|
|
2098
2119
|
} | undefined;
|
|
2099
2120
|
};
|
|
2100
2121
|
availability: {
|
|
2101
2122
|
kind: "available";
|
|
2102
|
-
input: "
|
|
2123
|
+
input: "url" | "text" | "none" | "quiz" | "photo";
|
|
2103
2124
|
} | {
|
|
2104
2125
|
kind: "completed";
|
|
2105
2126
|
} | {
|
|
@@ -2129,7 +2150,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2129
2150
|
})[];
|
|
2130
2151
|
} | {
|
|
2131
2152
|
kind: "blocked";
|
|
2132
|
-
reason: "
|
|
2153
|
+
reason: "outside-window" | "enrollment-required" | "budget-exhausted" | "paused" | "connection-required" | "wallet-required";
|
|
2133
2154
|
window?: "quest" | "tracker" | undefined;
|
|
2134
2155
|
resetsAt?: number | undefined;
|
|
2135
2156
|
} | {
|
|
@@ -2292,7 +2313,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2292
2313
|
} | undefined;
|
|
2293
2314
|
} | null;
|
|
2294
2315
|
release: string;
|
|
2295
|
-
interaction: "
|
|
2316
|
+
interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
|
|
2296
2317
|
lifecycle: "paused" | "active" | "archived";
|
|
2297
2318
|
rewards: ({
|
|
2298
2319
|
kind: "points";
|
|
@@ -2473,14 +2494,14 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2473
2494
|
equals: string | number | boolean;
|
|
2474
2495
|
})[] | undefined;
|
|
2475
2496
|
enrollment?: "none" | "required" | undefined;
|
|
2476
|
-
since?: "
|
|
2497
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
2477
2498
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
2478
2499
|
content?: true | undefined;
|
|
2479
2500
|
} | undefined;
|
|
2480
2501
|
};
|
|
2481
2502
|
availability: {
|
|
2482
2503
|
kind: "available";
|
|
2483
|
-
input: "
|
|
2504
|
+
input: "url" | "text" | "none" | "quiz" | "photo";
|
|
2484
2505
|
} | {
|
|
2485
2506
|
kind: "completed";
|
|
2486
2507
|
} | {
|
|
@@ -2510,7 +2531,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2510
2531
|
})[];
|
|
2511
2532
|
} | {
|
|
2512
2533
|
kind: "blocked";
|
|
2513
|
-
reason: "
|
|
2534
|
+
reason: "outside-window" | "enrollment-required" | "budget-exhausted" | "paused" | "connection-required" | "wallet-required";
|
|
2514
2535
|
window?: "quest" | "tracker" | undefined;
|
|
2515
2536
|
resetsAt?: number | undefined;
|
|
2516
2537
|
} | {
|
|
@@ -2673,7 +2694,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2673
2694
|
} | undefined;
|
|
2674
2695
|
} | null;
|
|
2675
2696
|
release: string;
|
|
2676
|
-
interaction: "
|
|
2697
|
+
interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
|
|
2677
2698
|
lifecycle: "paused" | "active" | "archived";
|
|
2678
2699
|
rewards: ({
|
|
2679
2700
|
kind: "points";
|
|
@@ -2857,14 +2878,14 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2857
2878
|
equals: string | number | boolean;
|
|
2858
2879
|
})[] | undefined;
|
|
2859
2880
|
enrollment?: "none" | "required" | undefined;
|
|
2860
|
-
since?: "
|
|
2881
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
2861
2882
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
2862
2883
|
content?: true | undefined;
|
|
2863
2884
|
} | undefined;
|
|
2864
2885
|
};
|
|
2865
2886
|
availability: {
|
|
2866
2887
|
kind: "available";
|
|
2867
|
-
input: "
|
|
2888
|
+
input: "url" | "text" | "none" | "quiz" | "photo";
|
|
2868
2889
|
} | {
|
|
2869
2890
|
kind: "completed";
|
|
2870
2891
|
} | {
|
|
@@ -2894,7 +2915,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2894
2915
|
})[];
|
|
2895
2916
|
} | {
|
|
2896
2917
|
kind: "blocked";
|
|
2897
|
-
reason: "
|
|
2918
|
+
reason: "outside-window" | "enrollment-required" | "budget-exhausted" | "paused" | "connection-required" | "wallet-required";
|
|
2898
2919
|
window?: "quest" | "tracker" | undefined;
|
|
2899
2920
|
resetsAt?: number | undefined;
|
|
2900
2921
|
} | {
|
|
@@ -3057,7 +3078,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3057
3078
|
} | undefined;
|
|
3058
3079
|
} | null;
|
|
3059
3080
|
release: string;
|
|
3060
|
-
interaction: "
|
|
3081
|
+
interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
|
|
3061
3082
|
lifecycle: "paused" | "active" | "archived";
|
|
3062
3083
|
rewards: ({
|
|
3063
3084
|
kind: "points";
|
|
@@ -3157,7 +3178,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3157
3178
|
};
|
|
3158
3179
|
campaigns: {
|
|
3159
3180
|
/** Enrolls the signed-in member once in every quest of a campaign that requires it. */
|
|
3160
|
-
enroll: (value: CampaignEnrollmentInput
|
|
3181
|
+
enroll: (value: OptionalActionId<CampaignEnrollmentInput>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
3161
3182
|
campaign: string;
|
|
3162
3183
|
member: string;
|
|
3163
3184
|
enrolledAt: number;
|
|
@@ -3165,7 +3186,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3165
3186
|
withdrawalReason: string | null;
|
|
3166
3187
|
}>;
|
|
3167
3188
|
/** Pauses the signed-in member's campaign enrollment without erasing its history. */
|
|
3168
|
-
withdraw: (value: CampaignWithdrawalInput
|
|
3189
|
+
withdraw: (value: OptionalActionId<CampaignWithdrawalInput>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
3169
3190
|
campaign: string;
|
|
3170
3191
|
member: string;
|
|
3171
3192
|
enrolledAt: number;
|
|
@@ -3468,10 +3489,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3468
3489
|
}): Promise<QuizSubmission>;
|
|
3469
3490
|
(quest: string, options: {
|
|
3470
3491
|
input: "none";
|
|
3471
|
-
release
|
|
3472
|
-
* Cancels the call, which rejects with a `RelayError` of kind `aborted`. Cancelling stops any
|
|
3473
|
-
* retry; a write already sent stays `uncertain`, since Relay may have applied it.
|
|
3474
|
-
*/: string;
|
|
3492
|
+
release?: string;
|
|
3475
3493
|
recoverPrevious?: boolean;
|
|
3476
3494
|
repeatable?: boolean;
|
|
3477
3495
|
}): Promise<ClaimSubmission>;
|
|
@@ -3577,14 +3595,14 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3577
3595
|
equals: string | number | boolean;
|
|
3578
3596
|
})[] | undefined;
|
|
3579
3597
|
enrollment?: "none" | "required" | undefined;
|
|
3580
|
-
since?: "
|
|
3598
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
3581
3599
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
3582
3600
|
content?: true | undefined;
|
|
3583
3601
|
} | undefined;
|
|
3584
3602
|
};
|
|
3585
3603
|
availability: {
|
|
3586
3604
|
kind: "available";
|
|
3587
|
-
input: "
|
|
3605
|
+
input: "url" | "text" | "none" | "quiz" | "photo";
|
|
3588
3606
|
} | {
|
|
3589
3607
|
kind: "completed";
|
|
3590
3608
|
} | {
|
|
@@ -3614,7 +3632,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3614
3632
|
})[];
|
|
3615
3633
|
} | {
|
|
3616
3634
|
kind: "blocked";
|
|
3617
|
-
reason: "
|
|
3635
|
+
reason: "outside-window" | "enrollment-required" | "budget-exhausted" | "paused" | "connection-required" | "wallet-required";
|
|
3618
3636
|
window?: "quest" | "tracker" | undefined;
|
|
3619
3637
|
resetsAt?: number | undefined;
|
|
3620
3638
|
} | {
|
|
@@ -4075,7 +4093,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
4075
4093
|
nextCursor: string | null;
|
|
4076
4094
|
}>;
|
|
4077
4095
|
/** Claims a quest for the signed-in member. Quest controllers (`quests.open`) call this. */
|
|
4078
|
-
claim: (value: Omit<z.input<typeof submitSchema>, "member"
|
|
4096
|
+
claim: (value: OptionalActionId<Omit<z.input<typeof submitSchema>, "member">>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
4079
4097
|
id: string;
|
|
4080
4098
|
release: string;
|
|
4081
4099
|
quest: string;
|
|
@@ -4141,8 +4159,11 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
4141
4159
|
release?: string | undefined;
|
|
4142
4160
|
} | undefined;
|
|
4143
4161
|
}>;
|
|
4144
|
-
/** Uploads a
|
|
4145
|
-
upload: (file: Blob, requestOptions?: RelayRequestOptions
|
|
4162
|
+
/** Uploads evidence with a generated key; reuse `actionId` and the same file to replay. */
|
|
4163
|
+
upload: (file: Blob, requestOptions?: RelayRequestOptions & {
|
|
4164
|
+
actionId?: string;
|
|
4165
|
+
uploadId?: string;
|
|
4166
|
+
}) => Promise<{
|
|
4146
4167
|
id: string;
|
|
4147
4168
|
member: string;
|
|
4148
4169
|
type: "image/jpeg" | "image/png";
|
|
@@ -4317,4 +4338,4 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
4317
4338
|
interface RelayClient extends ReturnType<typeof relayClient> {
|
|
4318
4339
|
}
|
|
4319
4340
|
|
|
4320
|
-
export { type ClaimSubmission as C, type KnownRelayErrorCode as K, type PhotoSubmission as P, type QuestActionResult as Q, type RelayClient as R, type SubmissionDraft as S, type ValueSubmission as V, type ProgressObservation as a, type ProgressObserver as b, type QuestController as c, QuestUpdatedError as d, type QuizSubmission as e, type RelayClientOptions as f, RelayError as g, RelayErrorCode as h, type RelayErrorDetails as i, type RelayErrorKind as j, type RelayRequestOptions as k, type
|
|
4341
|
+
export { type ClaimSubmission as C, type KnownRelayErrorCode as K, type PhotoSubmission as P, type QuestActionResult as Q, type RelayClient as R, type SubmissionDraft as S, type ValueSubmission as V, type ProgressObservation as a, type ProgressObserver as b, type QuestController as c, QuestUpdatedError as d, type QuizSubmission as e, type RelayClientOptions as f, RelayError as g, RelayErrorCode as h, type RelayErrorDetails as i, type RelayErrorKind as j, type RelayRequestOptions as k, type RelayResponseOptions as l, type SubmissionStatus as m, type SubmissionStore as n, createRelayClient as o, isRelayError as p };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { n as ResourceHandle, G as GroupHandle } from './schema-DEM8y8Fm.js';
|
|
3
3
|
|
|
4
4
|
declare const pointLedgerPropertiesSchema: z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
@@ -755,8 +755,96 @@ declare const leaderboardDefinitionSchema: z.ZodObject<{
|
|
|
755
755
|
}, z.core.$strip>], "kind">>;
|
|
756
756
|
}, z.core.$strict>], "kind">>;
|
|
757
757
|
access: z.ZodDefault<z.ZodEnum<{
|
|
758
|
+
public: "public";
|
|
758
759
|
participants: "participants";
|
|
760
|
+
}>>;
|
|
761
|
+
group: z.ZodOptional<z.ZodString>;
|
|
762
|
+
settle: z.ZodOptional<z.ZodObject<{
|
|
763
|
+
at: z.ZodLiteral<"window-end">;
|
|
764
|
+
ties: z.ZodEnum<{
|
|
765
|
+
shared: "shared";
|
|
766
|
+
earliest: "earliest";
|
|
767
|
+
}>;
|
|
768
|
+
prizes: z.ZodArray<z.ZodObject<{
|
|
769
|
+
ranks: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
770
|
+
rewards: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
771
|
+
kind: z.ZodDefault<z.ZodLiteral<"points">>;
|
|
772
|
+
balance: z.ZodString;
|
|
773
|
+
amount: z.ZodNumber;
|
|
774
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
775
|
+
kind: z.ZodLiteral<"tier">;
|
|
776
|
+
reward: z.ZodObject<{
|
|
777
|
+
id: z.ZodString;
|
|
778
|
+
title: z.ZodString;
|
|
779
|
+
tiers: z.ZodArray<z.ZodObject<{
|
|
780
|
+
id: z.ZodString;
|
|
781
|
+
title: z.ZodString;
|
|
782
|
+
}, z.core.$strict>>;
|
|
783
|
+
inventory: z.ZodObject<{
|
|
784
|
+
kind: z.ZodLiteral<"untracked">;
|
|
785
|
+
}, z.core.$strict>;
|
|
786
|
+
fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
787
|
+
kind: z.ZodLiteral<"staff-handover">;
|
|
788
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
789
|
+
kind: z.ZodLiteral<"automatic">;
|
|
790
|
+
}, z.core.$strict>], "kind">;
|
|
791
|
+
}, z.core.$strict>;
|
|
792
|
+
tier: z.ZodString;
|
|
793
|
+
}, z.core.$strict>]>>;
|
|
794
|
+
}, z.core.$strict>>;
|
|
795
|
+
}, z.core.$strict>>;
|
|
796
|
+
}, z.core.$strict>;
|
|
797
|
+
/** Known leaderboard data is read separately from its strict authoring definition. */
|
|
798
|
+
declare const leaderboardDefinitionResponseSchema: z.ZodObject<{
|
|
799
|
+
id: z.ZodString;
|
|
800
|
+
key: z.ZodOptional<z.ZodString>;
|
|
801
|
+
title: z.ZodString;
|
|
802
|
+
balance: z.ZodString;
|
|
803
|
+
score: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
804
|
+
kind: z.ZodLiteral<"balance">;
|
|
805
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
806
|
+
window: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
807
|
+
kind: z.ZodLiteral<"all-time">;
|
|
808
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
809
|
+
kind: z.ZodLiteral<"fixed">;
|
|
810
|
+
start: z.ZodNumber;
|
|
811
|
+
end: z.ZodNumber;
|
|
812
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
813
|
+
kind: z.ZodLiteral<"rolling">;
|
|
814
|
+
days: z.ZodNumber;
|
|
815
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
816
|
+
kind: z.ZodLiteral<"calendar">;
|
|
817
|
+
period: z.ZodEnum<{
|
|
818
|
+
day: "day";
|
|
819
|
+
week: "week";
|
|
820
|
+
month: "month";
|
|
821
|
+
}>;
|
|
822
|
+
}, z.core.$strip>], "kind">>;
|
|
823
|
+
quests: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
824
|
+
kind: z.ZodLiteral<"earned">;
|
|
825
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
826
|
+
kind: z.ZodLiteral<"net">;
|
|
827
|
+
window: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
828
|
+
kind: z.ZodLiteral<"all-time">;
|
|
829
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
830
|
+
kind: z.ZodLiteral<"fixed">;
|
|
831
|
+
start: z.ZodNumber;
|
|
832
|
+
end: z.ZodNumber;
|
|
833
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
834
|
+
kind: z.ZodLiteral<"rolling">;
|
|
835
|
+
days: z.ZodNumber;
|
|
836
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
837
|
+
kind: z.ZodLiteral<"calendar">;
|
|
838
|
+
period: z.ZodEnum<{
|
|
839
|
+
day: "day";
|
|
840
|
+
week: "week";
|
|
841
|
+
month: "month";
|
|
842
|
+
}>;
|
|
843
|
+
}, z.core.$strip>], "kind">>;
|
|
844
|
+
}, z.core.$strict>], "kind">>;
|
|
845
|
+
access: z.ZodDefault<z.ZodEnum<{
|
|
759
846
|
public: "public";
|
|
847
|
+
participants: "participants";
|
|
760
848
|
}>>;
|
|
761
849
|
group: z.ZodOptional<z.ZodString>;
|
|
762
850
|
settle: z.ZodOptional<z.ZodObject<{
|
|
@@ -799,8 +887,8 @@ declare const leaderboardAuthoringSchema: z.ZodObject<{
|
|
|
799
887
|
title: z.ZodString;
|
|
800
888
|
balance: z.ZodString;
|
|
801
889
|
access: z.ZodDefault<z.ZodEnum<{
|
|
802
|
-
participants: "participants";
|
|
803
890
|
public: "public";
|
|
891
|
+
participants: "participants";
|
|
804
892
|
}>>;
|
|
805
893
|
settle: z.ZodOptional<z.ZodObject<{
|
|
806
894
|
at: z.ZodLiteral<"window-end">;
|
|
@@ -885,8 +973,8 @@ declare const leaderboardArtifactSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
885
973
|
title: z.ZodString;
|
|
886
974
|
balance: z.ZodString;
|
|
887
975
|
access: z.ZodDefault<z.ZodEnum<{
|
|
888
|
-
participants: "participants";
|
|
889
976
|
public: "public";
|
|
977
|
+
participants: "participants";
|
|
890
978
|
}>>;
|
|
891
979
|
settle: z.ZodOptional<z.ZodObject<{
|
|
892
980
|
at: z.ZodLiteral<"window-end">;
|
|
@@ -1020,8 +1108,8 @@ declare const publishedLeaderboardSchema: z.ZodObject<{
|
|
|
1020
1108
|
}, z.core.$strip>], "kind">>;
|
|
1021
1109
|
}, z.core.$strict>], "kind">>;
|
|
1022
1110
|
access: z.ZodDefault<z.ZodEnum<{
|
|
1023
|
-
participants: "participants";
|
|
1024
1111
|
public: "public";
|
|
1112
|
+
participants: "participants";
|
|
1025
1113
|
}>>;
|
|
1026
1114
|
group: z.ZodOptional<z.ZodString>;
|
|
1027
1115
|
settle: z.ZodOptional<z.ZodObject<{
|
|
@@ -1264,8 +1352,8 @@ declare const leaderboardPreviewSchema: z.ZodObject<{
|
|
|
1264
1352
|
}, z.core.$strip>], "kind">>;
|
|
1265
1353
|
}, z.core.$strict>], "kind">>;
|
|
1266
1354
|
access: z.ZodDefault<z.ZodEnum<{
|
|
1267
|
-
participants: "participants";
|
|
1268
1355
|
public: "public";
|
|
1356
|
+
participants: "participants";
|
|
1269
1357
|
}>>;
|
|
1270
1358
|
group: z.ZodOptional<z.ZodString>;
|
|
1271
1359
|
settle: z.ZodOptional<z.ZodObject<{
|
|
@@ -2618,4 +2706,4 @@ declare const groupMemberPageSchema: z.ZodObject<{
|
|
|
2618
2706
|
/** @compat output */
|
|
2619
2707
|
type GroupMemberPage = z.infer<typeof groupMemberPageSchema>;
|
|
2620
2708
|
|
|
2621
|
-
export {
|
|
2709
|
+
export { engagementBoundaryPageSchema as $, type AvailabilityWindow as A, type GroupPageQuery as B, type CampaignDefinition as C, type LeaderboardSettlement as D, type EngagementBudget as E, type LeaderboardSettlementPolicy as F, type GroupMember as G, type LeaderboardSettlementSummary as H, type ManagedGroup as I, type ManagedPointHistoryPage as J, type KnownPointEntryKind as K, type LeaderboardDefinition as L, type MemberCampaignEnrollmentInput as M, type ManagedPointLedger as N, type PointLedger as O, type PointBalance as P, addGroupMemberSchema as Q, type ReferralDefinition as R, availabilityWindowSchema as S, campaignDefinitionSchema as T, campaignEnrollmentInputSchema as U, campaignEnrollmentSchema as V, campaignViewSchema as W, campaignWithdrawalInputSchema as X, createGroupSchema as Y, createPointLedgerSchema as Z, engagementArtifactSchema as _, type CampaignEnrollment as a, referralArtifactSchema as a$, engagementBudgetSchema as a0, engagementChangePreviewInputSchema as a1, engagementChangePreviewSchema as a2, engagementChangeSchema as a3, engagementDefinitionSchema as a4, engagementDeploymentEntrySchema as a5, engagementPageQuerySchema as a6, engagementPageSchema as a7, engagementPublishSchema as a8, engagementRuleSchema as a9, leaderboardSettlementStatusSchema as aA, leaderboardSettlementSummarySchema as aB, leaderboardWindowSchema as aC, managedGroupSchema as aD, managedPointHistoryPageSchema as aE, managedPointLedgerSchema as aF, memberCampaignEnrollmentInputSchema as aG, memberCampaignWithdrawalInputSchema as aH, pointBalanceSchema as aI, pointBalancesSchema as aJ, pointEntrySchema as aK, pointHistoryPageSchema as aL, pointHistoryQuerySchema as aM, pointLedgerArtifactSchema as aN, pointLedgerPropertiesSchema as aO, pointLedgerReferenceSchema as aP, pointLedgerSchema as aQ, pointsAccountSchema as aR, pointsEntrySchema as aS, pointsMutationSchema as aT, pointsResultSchema as aU, projectGroupKey as aV, projectGroupSchema as aW, publishedLeaderboardSchema as aX, publishedReferralSchema as aY, referralAcceptSchema as aZ, referralAccountSchema as a_, engagementRuleVersionPageSchema as aa, engagementScoreInputSchema as ab, engagementScoreSchema as ac, engagementSettlementSchema as ad, engagementVersionPageSchema as ae, engagementVersionQuerySchema as af, groupMemberPageSchema as ag, groupMemberSchema as ah, groupPageQuerySchema as ai, groupPageSchema as aj, leaderboardArtifactSchema as ak, leaderboardAuthoringSchema as al, leaderboardDefinitionResponseSchema as am, leaderboardExclusionSchema as an, leaderboardGroupSchema as ao, leaderboardPageSchema as ap, leaderboardPlacementSchema as aq, leaderboardPreviewSchema as ar, leaderboardPrizeRewardSchema as as, leaderboardPrizeSchema as at, leaderboardQuerySchema as au, leaderboardRowSchema as av, leaderboardSettlementApprovalSchema as aw, leaderboardSettlementPolicySchema as ax, leaderboardSettlementRowSchema as ay, leaderboardSettlementSchema as az, type CampaignEnrollmentInput as b, referralControlSchema as b0, referralDefinitionSchema as b1, referralHistorySchema as b2, referralManagementSchema as b3, referralQualificationSchema as b4, referralRelationshipSchema as b5, referralRewardResolutionSchema as b6, referralSummarySchema as b7, referralSuspensionSchema as b8, removeGroupMemberSchema as b9, updateGroupSchema as ba, type CampaignView as c, type CampaignWithdrawalInput as d, type LeaderboardPage as e, type LeaderboardPlacement as f, type LeaderboardQuery as g, type MemberCampaignWithdrawalInput as h, type PointBalances as i, type PointEntry as j, PointEntryKind as k, type PointHistoryPage as l, type PointHistoryQuery as m, type PointLedgerReference as n, type ProjectGroup as o, type ProjectGroupReference as p, type AuthoringIdentity as q, leaderboardDefinitionSchema as r, pointLedgerDeclarationSchema as s, referralAuthoringSchema as t, defineCampaign as u, defineGroup as v, type EngagementDefinition as w, type EngagementRuleVersionPage as x, type GroupMemberPage as y, type GroupPage as z };
|