@domino-sdk/relay 1.5.2 → 1.7.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/{activity-DeKJsRry.d.ts → activity-Br6vyYze.d.ts} +147 -116
- package/dist/authoring.d.ts +59 -47
- package/dist/authoring.js +3 -3
- package/dist/{automatic-outcomes-B1xrETxm.d.ts → automatic-outcomes-C1Q9LrDb.d.ts} +224 -13
- package/dist/browser.d.ts +22 -10
- package/dist/browser.js +6 -6
- package/dist/{capability-error-DNMwKmlL.d.ts → capability-error-Bv996M-h.d.ts} +2 -0
- package/dist/{chunk-GQKYAQM6.js → chunk-23QJ7WH4.js} +1 -1
- package/dist/{chunk-WJSSJ7AF.js → chunk-5ECM6AWV.js} +24 -4
- package/dist/{chunk-XFMSUPNS.js → chunk-6ON4RMEN.js} +1 -1
- package/dist/{chunk-VFHHLN6A.js → chunk-6RBF3UDA.js} +49 -6
- package/dist/chunk-AXRMT33W.js +112 -0
- package/dist/{chunk-24AFCBZN.js → chunk-BFZHJA2B.js} +2 -2
- package/dist/{chunk-EYH5RDIE.js → chunk-C25TDFHN.js} +4 -2
- package/dist/{chunk-36HTX2BM.js → chunk-GMPPLZKH.js} +61 -4
- package/dist/{chunk-BGGKNIRP.js → chunk-JW4G3SY5.js} +1 -1
- package/dist/{chunk-JON5SESL.js → chunk-KGJSKGKI.js} +84 -6
- package/dist/{chunk-DGWMLN35.js → chunk-ZOUEEK5L.js} +16 -5
- package/dist/{client-gqnRUHpC.d.ts → client-pfml_XAa.d.ts} +88 -41
- package/dist/{groups-Ck-OxzjD.d.ts → groups-BpWEqaPn.d.ts} +175 -3
- package/dist/{images-Dv-P5VBw.d.ts → images-BaKYd0fl.d.ts} +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +5 -5
- package/dist/internal.d.ts +6 -113
- package/dist/internal.js +18 -24
- package/dist/{offers-Cy-e4o5x.d.ts → offers-CYtal8jO.d.ts} +3 -2
- package/dist/{outcomes-kVB-Juzs.d.ts → pages-CixTNnF4.d.ts} +142 -99
- package/dist/{pages-BBYD21IE.d.ts → participant-activity-DkL3nY5a.d.ts} +1 -14
- package/dist/portal-proxy.js +48 -36
- package/dist/react/index.d.ts +25 -3949
- package/dist/react/index.js +8 -7
- package/dist/referral-reward-kinds-ClxAuCGx.d.ts +171 -0
- package/dist/{request-error-DWduJCGV.d.ts → request-error-D_dUPLwo.d.ts} +5 -0
- package/dist/{schema-DfJzH2ci.d.ts → schema-CQydLqw4.d.ts} +122 -37
- package/dist/schema.d.ts +10 -10
- package/dist/schema.js +48 -6
- package/dist/server/index.d.ts +9673 -66110
- package/dist/server/index.js +1048 -550
- package/dist/sign-in-options-CtXUFV7E.d.ts +202 -0
- package/dist/{submission-input-BZkm6ohU.d.ts → submission-input-CLefHTrj.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/browser-D_3s8B5e.d.ts +0 -4154
- package/dist/chunk-GUP7YRR4.js +0 -42
- package/dist/identity-integration-GxAHdKR2.d.ts +0 -58
package/dist/react/index.js
CHANGED
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
discoverSolanaWallets,
|
|
9
9
|
readSignInMethods,
|
|
10
10
|
signInOptionsFrom
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-BFZHJA2B.js";
|
|
12
|
+
import "../chunk-ZOUEEK5L.js";
|
|
13
|
+
import "../chunk-C25TDFHN.js";
|
|
14
14
|
import {
|
|
15
15
|
RelayErrorCode,
|
|
16
16
|
asRelayError,
|
|
17
17
|
isRelayError
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-GMPPLZKH.js";
|
|
19
19
|
import "../chunk-6QJ3LADK.js";
|
|
20
20
|
import "../chunk-NPGENI7K.js";
|
|
21
21
|
import {
|
|
22
22
|
sessionMember
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-6ON4RMEN.js";
|
|
24
|
+
import "../chunk-KGJSKGKI.js";
|
|
25
25
|
|
|
26
26
|
// src/react/activity.ts
|
|
27
27
|
import {
|
|
@@ -655,7 +655,8 @@ function knownStatus(view) {
|
|
|
655
655
|
if (availability.kind === "blocked") {
|
|
656
656
|
return {
|
|
657
657
|
tone: availability.reason === "paused" || availability.reason === "outside-window" ? "off" : availability.reason === "budget-exhausted" ? "attention" : "locked",
|
|
658
|
-
code: availability.reason
|
|
658
|
+
code: availability.reason,
|
|
659
|
+
...availability.reason === "outside-window" && availability.window ? { window: availability.window } : {}
|
|
659
660
|
};
|
|
660
661
|
}
|
|
661
662
|
const ownSubmission = view.trigger.kind === "manual" && view.trigger.actor !== "staff";
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { N as PublishedRelease, O as OpenIdentityKind, ao as TrackerSource, ac as TrackerDataSchema, aq as TrackerSourceResponse, V as QuestDescription } from './schema-CQydLqw4.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { c as ImageFields, g as ImageRequest } from './images-BaKYd0fl.js';
|
|
4
|
+
|
|
5
|
+
/** Older releases did not record ownership. Preserve every value, including defaults. */
|
|
6
|
+
declare function questConfiguration(release: PublishedRelease): {
|
|
7
|
+
defaults: Record<string, string | number | boolean | {
|
|
8
|
+
id: string;
|
|
9
|
+
prompt: string;
|
|
10
|
+
choices: {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}[];
|
|
14
|
+
correct: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
overrides: Record<string, string | number | boolean | {
|
|
17
|
+
id: string;
|
|
18
|
+
prompt: string;
|
|
19
|
+
choices: {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[];
|
|
23
|
+
correct: string;
|
|
24
|
+
}[]>;
|
|
25
|
+
preserved: string[];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare const identityIntegrationInputSchema: z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
origin: z.ZodString;
|
|
31
|
+
identityKind: z.ZodOptional<z.ZodTemplateLiteral<`app:${string}`>>;
|
|
32
|
+
adoptIdentitiesFrom: z.ZodOptional<z.ZodString>;
|
|
33
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
/** An integration as responses return it: fields a newer Relay adds are ignored. */
|
|
36
|
+
declare const identityIntegrationSchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
origin: z.ZodString;
|
|
40
|
+
expiresAt: z.ZodNumber;
|
|
41
|
+
identityKind: z.ZodDefault<z.ZodNullable<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
42
|
+
organization: z.ZodString;
|
|
43
|
+
project: z.ZodString;
|
|
44
|
+
environment: z.ZodEnum<{
|
|
45
|
+
test: "test";
|
|
46
|
+
live: "live";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const identityIntegrationSecretSchema: z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
origin: z.ZodString;
|
|
53
|
+
expiresAt: z.ZodNumber;
|
|
54
|
+
identityKind: z.ZodDefault<z.ZodNullable<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
55
|
+
organization: z.ZodString;
|
|
56
|
+
project: z.ZodString;
|
|
57
|
+
environment: z.ZodEnum<{
|
|
58
|
+
test: "test";
|
|
59
|
+
live: "live";
|
|
60
|
+
}>;
|
|
61
|
+
token: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
/**
|
|
64
|
+
* An `app:<name>` kind claimed in the project and environment, and the integration that owns its
|
|
65
|
+
* identities: the live one, or the disconnected one a new integration would adopt them from.
|
|
66
|
+
*/
|
|
67
|
+
declare const identityKindClaimSchema: z.ZodObject<{
|
|
68
|
+
kind: z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>;
|
|
69
|
+
integration: z.ZodString;
|
|
70
|
+
integrationName: z.ZodString;
|
|
71
|
+
connected: z.ZodBoolean;
|
|
72
|
+
linked: z.ZodNumber;
|
|
73
|
+
unlinked: z.ZodNumber;
|
|
74
|
+
claimedAt: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
type IdentityKindClaim = z.infer<typeof identityKindClaimSchema>;
|
|
77
|
+
declare const participantExchangeSchema: z.ZodObject<{
|
|
78
|
+
subject: z.ZodString;
|
|
79
|
+
previousToken: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
|
|
82
|
+
/** Every declared field is present with its declared type or null; nothing else is returned. */
|
|
83
|
+
declare function parseImageExtraction(raw: ImageFields, value: unknown): {
|
|
84
|
+
values: Record<string, string | number | boolean | null>;
|
|
85
|
+
reason: string;
|
|
86
|
+
};
|
|
87
|
+
declare function parseImageResult(request: ImageRequest, value: unknown): {
|
|
88
|
+
kind: "pass" | "fail" | "unclear";
|
|
89
|
+
reason: string;
|
|
90
|
+
} | {
|
|
91
|
+
width: number;
|
|
92
|
+
height: number;
|
|
93
|
+
format: "jpeg" | "png" | "webp" | "gif" | "avif";
|
|
94
|
+
bytes: number;
|
|
95
|
+
sha256: string;
|
|
96
|
+
phash: string;
|
|
97
|
+
dhash: string;
|
|
98
|
+
} | {
|
|
99
|
+
identical: boolean;
|
|
100
|
+
phashDistance: number;
|
|
101
|
+
dhashDistance: number;
|
|
102
|
+
} | {
|
|
103
|
+
values: Record<string, string | number | boolean | null>;
|
|
104
|
+
reason: string;
|
|
105
|
+
} | {
|
|
106
|
+
matches: number;
|
|
107
|
+
closestDistance: number | null;
|
|
108
|
+
firstSeenAt: number | null;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* One participant route. `path` uses the API's route syntax: every parameter is `:name{pattern}`,
|
|
113
|
+
* one path segment matched by `pattern`.
|
|
114
|
+
*/
|
|
115
|
+
type ParticipantRoute = {
|
|
116
|
+
method: "GET" | "POST";
|
|
117
|
+
path: `/v1/${string}`;
|
|
118
|
+
/**
|
|
119
|
+
* Sign-in routes only hosted apps reach: identity integrations' apps have their own login. They
|
|
120
|
+
* still connect accounts through /v1/auth/start and /v1/auth/complete.
|
|
121
|
+
*/
|
|
122
|
+
hostedOnly?: true;
|
|
123
|
+
};
|
|
124
|
+
declare const participantRoutes: readonly ParticipantRoute[];
|
|
125
|
+
/**
|
|
126
|
+
* The expression a route path matches: its literal parts exactly, each `:name{pattern}` one path
|
|
127
|
+
* segment. A parameter whose pattern can match "/" would span segments, so it is refused, as is a
|
|
128
|
+
* parameter without a pattern.
|
|
129
|
+
*/
|
|
130
|
+
declare function participantRoutePattern(path: string): RegExp;
|
|
131
|
+
/**
|
|
132
|
+
* A route a hosted app reaches through `proxyParticipant`: exactly a listed method and path.
|
|
133
|
+
* Another method on a listed path is not a participant route either.
|
|
134
|
+
*/
|
|
135
|
+
declare function isParticipantRoute(path: string, method: string): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* A path an identity integration reaches, with any method: the API answers a method its route
|
|
138
|
+
* does not register with 405, and OPTIONS with the route's `Allow` header. Sign-in routes are
|
|
139
|
+
* hosted-only.
|
|
140
|
+
*/
|
|
141
|
+
declare function isIntegrationParticipantPath(path: string): boolean;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* How Relay reads back a cursor it issued over a numeric position. Clients treat cursors as
|
|
145
|
+
* opaque strings (`pageCursorSchema`); only the server parses them, so the format can change.
|
|
146
|
+
*/
|
|
147
|
+
declare const sequenceCursorSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
|
|
148
|
+
|
|
149
|
+
/** The account roles a source's records can name: `author` and any others the source declares. */
|
|
150
|
+
declare function sourceRoles(source: TrackerSourceResponse): readonly string[];
|
|
151
|
+
/**
|
|
152
|
+
* The schema a source's record `data` matches: a custom source's declared schema, a Discord
|
|
153
|
+
* source's fixed one, or undefined for X (provider payloads) and untyped custom trackers.
|
|
154
|
+
*/
|
|
155
|
+
declare function sourceDataSchema(source: TrackerSource): TrackerDataSchema | undefined;
|
|
156
|
+
|
|
157
|
+
/** Rules independent of published resources, permissions and another release. */
|
|
158
|
+
type QuestShape = Pick<QuestDescription, "trigger" | "performance"> & {
|
|
159
|
+
completion: Pick<QuestDescription["completion"], "kind">;
|
|
160
|
+
requires: readonly unknown[];
|
|
161
|
+
};
|
|
162
|
+
/** The same trigger/completion matrix for authoring, publication and graph validation. */
|
|
163
|
+
declare function validateQuestShape(description: QuestShape, options?: {
|
|
164
|
+
template?: boolean;
|
|
165
|
+
}): void;
|
|
166
|
+
|
|
167
|
+
declare const REFERRAL_INTEGRATION_REWARD_ERROR = "Referral programs can grant points and tiered rewards; Discord roles need a quest";
|
|
168
|
+
/** Detect the unsupported reward in loose authoring, published, or reward-list shapes. */
|
|
169
|
+
declare function containsReferralIntegrationReward(value: unknown): boolean;
|
|
170
|
+
|
|
171
|
+
export { type IdentityKindClaim as I, type ParticipantRoute as P, REFERRAL_INTEGRATION_REWARD_ERROR as R, identityIntegrationSchema as a, identityIntegrationSecretSchema as b, containsReferralIntegrationReward as c, identityKindClaimSchema as d, isIntegrationParticipantPath as e, isParticipantRoute as f, parseImageResult as g, participantExchangeSchema as h, identityIntegrationInputSchema as i, participantRoutePattern as j, participantRoutes as k, sourceDataSchema as l, sourceRoles as m, parseImageExtraction as p, questConfiguration as q, sequenceCursorSchema as s, validateQuestShape as v };
|
|
@@ -40,6 +40,11 @@ declare const requestErrorBrand: unique symbol;
|
|
|
40
40
|
* fails when an app bundles two copies of the package.
|
|
41
41
|
*/
|
|
42
42
|
declare function isRequestError(value: unknown): value is RequestError;
|
|
43
|
+
/**
|
|
44
|
+
* The base of every Domino client error. Not for subclassing: a 1.x minor release can add members.
|
|
45
|
+
*
|
|
46
|
+
* @compat sealed
|
|
47
|
+
*/
|
|
43
48
|
declare class RequestError extends Error {
|
|
44
49
|
readonly name: string;
|
|
45
50
|
readonly [requestErrorBrand] = true;
|
|
@@ -1209,7 +1209,11 @@ declare const trackerIngestResultSchema: z.ZodObject<{
|
|
|
1209
1209
|
* `historical: "claim"`, the member claims it.
|
|
1210
1210
|
*/
|
|
1211
1211
|
declare const trackerSkipCodes: readonly ["quest-paused", "before-activation", "outside-window", "future-record", "record-removed", "invalid-record-data", "content-unavailable", "no-account", "beneficiary-is-author", "unlinked-account", "ambiguous-account", "not-joined", "already-completed", "not-enrolled", "before-enrollment", "historical", "prerequisites-incomplete"];
|
|
1212
|
-
/**
|
|
1212
|
+
/**
|
|
1213
|
+
* A skip code this SDK knows.
|
|
1214
|
+
*
|
|
1215
|
+
* @compat open
|
|
1216
|
+
*/
|
|
1213
1217
|
type KnownTrackerSkipCode = (typeof trackerSkipCodes)[number];
|
|
1214
1218
|
/** A known skip code, or one a newer Relay sends. */
|
|
1215
1219
|
type TrackerSkipCode = KnownTrackerSkipCode | (string & {});
|
|
@@ -1221,50 +1225,41 @@ declare const trackerOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1221
1225
|
state: z.ZodLiteral<"admitted">;
|
|
1222
1226
|
code: z.ZodNull;
|
|
1223
1227
|
reason: z.ZodNull;
|
|
1224
|
-
/** The attributed member. */
|
|
1225
1228
|
member: z.ZodString;
|
|
1226
|
-
/** The admitted attempt. Its evaluation, decision and rewards live on the attempt. */
|
|
1227
1229
|
attempt: z.ZodString;
|
|
1228
|
-
/** Stable quest ID. */
|
|
1229
1230
|
quest: z.ZodString;
|
|
1230
|
-
/** Stable tracker ID. */
|
|
1231
1231
|
tracker: z.ZodString;
|
|
1232
1232
|
record: z.ZodString;
|
|
1233
1233
|
observedAt: z.ZodNumber;
|
|
1234
|
-
/** The release admitted, or the one active when the observation was skipped. */
|
|
1235
1234
|
release: z.ZodString;
|
|
1236
|
-
/** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
|
|
1237
1235
|
account: z.ZodNullable<z.ZodString>;
|
|
1238
1236
|
createdAt: z.ZodNumber;
|
|
1239
1237
|
updatedAt: z.ZodNumber;
|
|
1240
|
-
/** Null for automatic decisions; the staff actor after a retry. */
|
|
1241
1238
|
actor: z.ZodNullable<z.ZodString>;
|
|
1242
|
-
}, z.core.$
|
|
1239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1243
1240
|
state: z.ZodLiteral<"skipped">;
|
|
1244
|
-
/** Why the observation was skipped, as one of `trackerSkipCodes`. */
|
|
1245
1241
|
code: z.ZodString;
|
|
1246
|
-
/** Why the observation was skipped, for people. */
|
|
1247
1242
|
reason: z.ZodString;
|
|
1248
|
-
|
|
1243
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
1244
|
+
quest: "quest";
|
|
1245
|
+
tracker: "tracker";
|
|
1246
|
+
}>>;
|
|
1249
1247
|
member: z.ZodNullable<z.ZodString>;
|
|
1250
1248
|
attempt: z.ZodNullable<z.ZodString>;
|
|
1251
|
-
/** Stable quest ID. */
|
|
1252
1249
|
quest: z.ZodString;
|
|
1253
|
-
/** Stable tracker ID. */
|
|
1254
1250
|
tracker: z.ZodString;
|
|
1255
1251
|
record: z.ZodString;
|
|
1256
1252
|
observedAt: z.ZodNumber;
|
|
1257
|
-
/** The release admitted, or the one active when the observation was skipped. */
|
|
1258
1253
|
release: z.ZodString;
|
|
1259
|
-
/** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
|
|
1260
1254
|
account: z.ZodNullable<z.ZodString>;
|
|
1261
1255
|
createdAt: z.ZodNumber;
|
|
1262
1256
|
updatedAt: z.ZodNumber;
|
|
1263
|
-
/** Null for automatic decisions; the staff actor after a retry. */
|
|
1264
1257
|
actor: z.ZodNullable<z.ZodString>;
|
|
1265
|
-
}, z.core.$
|
|
1258
|
+
}, z.core.$strip>], "state">;
|
|
1266
1259
|
type TrackerOutcome = z.infer<typeof trackerOutcomeSchema>;
|
|
1267
|
-
|
|
1260
|
+
/** Which of a tracker's trigger outcomes to read: filters, and a page's `nextCursor` as `cursor`. */
|
|
1261
|
+
declare const trackerTriggerOutcomeQuerySchema: z.ZodObject<{
|
|
1262
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1268
1263
|
/** Quest key or ID. */
|
|
1269
1264
|
quest: z.ZodOptional<z.ZodString>;
|
|
1270
1265
|
record: z.ZodOptional<z.ZodString>;
|
|
@@ -1276,58 +1271,105 @@ declare const trackerOutcomeQuerySchema: z.ZodObject<{
|
|
|
1276
1271
|
/** Only skips with this code, such as `unlinked-account`. */
|
|
1277
1272
|
code: z.ZodOptional<z.ZodString>;
|
|
1278
1273
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1274
|
+
}, z.core.$strict>;
|
|
1275
|
+
type TrackerTriggerOutcomeQuery = z.input<typeof trackerTriggerOutcomeQuerySchema>;
|
|
1276
|
+
/** One page of a tracker's trigger outcomes, newest first. */
|
|
1277
|
+
declare const trackerTriggerOutcomePageSchema: z.ZodObject<{
|
|
1278
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1279
|
+
state: z.ZodLiteral<"admitted">;
|
|
1280
|
+
code: z.ZodNull;
|
|
1281
|
+
reason: z.ZodNull;
|
|
1282
|
+
member: z.ZodString;
|
|
1283
|
+
attempt: z.ZodString;
|
|
1284
|
+
quest: z.ZodString;
|
|
1285
|
+
tracker: z.ZodString;
|
|
1286
|
+
record: z.ZodString;
|
|
1287
|
+
observedAt: z.ZodNumber;
|
|
1288
|
+
release: z.ZodString;
|
|
1289
|
+
account: z.ZodNullable<z.ZodString>;
|
|
1290
|
+
createdAt: z.ZodNumber;
|
|
1291
|
+
updatedAt: z.ZodNumber;
|
|
1292
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1293
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1294
|
+
state: z.ZodLiteral<"skipped">;
|
|
1295
|
+
code: z.ZodString;
|
|
1296
|
+
reason: z.ZodString;
|
|
1297
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
1298
|
+
quest: "quest";
|
|
1299
|
+
tracker: "tracker";
|
|
1300
|
+
}>>;
|
|
1301
|
+
member: z.ZodNullable<z.ZodString>;
|
|
1302
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
1303
|
+
quest: z.ZodString;
|
|
1304
|
+
tracker: z.ZodString;
|
|
1305
|
+
record: z.ZodString;
|
|
1306
|
+
observedAt: z.ZodNumber;
|
|
1307
|
+
release: z.ZodString;
|
|
1308
|
+
account: z.ZodNullable<z.ZodString>;
|
|
1309
|
+
createdAt: z.ZodNumber;
|
|
1310
|
+
updatedAt: z.ZodNumber;
|
|
1311
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1312
|
+
}, z.core.$strip>], "state">>;
|
|
1313
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1314
|
+
}, z.core.$strip>;
|
|
1315
|
+
/** @compat output */
|
|
1316
|
+
type TrackerTriggerOutcomePage = z.infer<typeof trackerTriggerOutcomePageSchema>;
|
|
1317
|
+
/** @deprecated Use `trackerTriggerOutcomeQuerySchema`. Removed in 2.0.0. */
|
|
1318
|
+
declare const trackerOutcomeQuerySchema: z.ZodObject<{
|
|
1279
1319
|
/** Opaque cursor from `next`: older outcomes. */
|
|
1280
1320
|
before: z.ZodOptional<z.ZodString>;
|
|
1321
|
+
/** Quest key or ID. */
|
|
1322
|
+
quest: z.ZodOptional<z.ZodString>;
|
|
1323
|
+
record: z.ZodOptional<z.ZodString>;
|
|
1324
|
+
member: z.ZodOptional<z.ZodString>;
|
|
1325
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1326
|
+
admitted: "admitted";
|
|
1327
|
+
skipped: "skipped";
|
|
1328
|
+
}>>;
|
|
1329
|
+
/** Only skips with this code, such as `unlinked-account`. */
|
|
1330
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1331
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1281
1332
|
}, z.core.$strict>;
|
|
1333
|
+
/** @deprecated Use `TrackerTriggerOutcomeQuery`. Removed in 2.0.0. */
|
|
1282
1334
|
type TrackerOutcomeQuery = z.input<typeof trackerOutcomeQuerySchema>;
|
|
1335
|
+
/** @deprecated Use `trackerTriggerOutcomePageSchema`. Removed in 2.0.0. */
|
|
1283
1336
|
declare const trackerOutcomePageSchema: z.ZodObject<{
|
|
1284
1337
|
/** Newest first. */
|
|
1285
1338
|
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1286
1339
|
state: z.ZodLiteral<"admitted">;
|
|
1287
1340
|
code: z.ZodNull;
|
|
1288
1341
|
reason: z.ZodNull;
|
|
1289
|
-
/** The attributed member. */
|
|
1290
1342
|
member: z.ZodString;
|
|
1291
|
-
/** The admitted attempt. Its evaluation, decision and rewards live on the attempt. */
|
|
1292
1343
|
attempt: z.ZodString;
|
|
1293
|
-
/** Stable quest ID. */
|
|
1294
1344
|
quest: z.ZodString;
|
|
1295
|
-
/** Stable tracker ID. */
|
|
1296
1345
|
tracker: z.ZodString;
|
|
1297
1346
|
record: z.ZodString;
|
|
1298
1347
|
observedAt: z.ZodNumber;
|
|
1299
|
-
/** The release admitted, or the one active when the observation was skipped. */
|
|
1300
1348
|
release: z.ZodString;
|
|
1301
|
-
/** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
|
|
1302
1349
|
account: z.ZodNullable<z.ZodString>;
|
|
1303
1350
|
createdAt: z.ZodNumber;
|
|
1304
1351
|
updatedAt: z.ZodNumber;
|
|
1305
|
-
/** Null for automatic decisions; the staff actor after a retry. */
|
|
1306
1352
|
actor: z.ZodNullable<z.ZodString>;
|
|
1307
|
-
}, z.core.$
|
|
1353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1308
1354
|
state: z.ZodLiteral<"skipped">;
|
|
1309
|
-
/** Why the observation was skipped, as one of `trackerSkipCodes`. */
|
|
1310
1355
|
code: z.ZodString;
|
|
1311
|
-
/** Why the observation was skipped, for people. */
|
|
1312
1356
|
reason: z.ZodString;
|
|
1313
|
-
|
|
1357
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
1358
|
+
quest: "quest";
|
|
1359
|
+
tracker: "tracker";
|
|
1360
|
+
}>>;
|
|
1314
1361
|
member: z.ZodNullable<z.ZodString>;
|
|
1315
1362
|
attempt: z.ZodNullable<z.ZodString>;
|
|
1316
|
-
/** Stable quest ID. */
|
|
1317
1363
|
quest: z.ZodString;
|
|
1318
|
-
/** Stable tracker ID. */
|
|
1319
1364
|
tracker: z.ZodString;
|
|
1320
1365
|
record: z.ZodString;
|
|
1321
1366
|
observedAt: z.ZodNumber;
|
|
1322
|
-
/** The release admitted, or the one active when the observation was skipped. */
|
|
1323
1367
|
release: z.ZodString;
|
|
1324
|
-
/** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
|
|
1325
1368
|
account: z.ZodNullable<z.ZodString>;
|
|
1326
1369
|
createdAt: z.ZodNumber;
|
|
1327
1370
|
updatedAt: z.ZodNumber;
|
|
1328
|
-
/** Null for automatic decisions; the staff actor after a retry. */
|
|
1329
1371
|
actor: z.ZodNullable<z.ZodString>;
|
|
1330
|
-
}, z.core.$
|
|
1372
|
+
}, z.core.$strip>], "state">>;
|
|
1331
1373
|
next: z.ZodNullable<z.ZodString>;
|
|
1332
1374
|
}, z.core.$strict>;
|
|
1333
1375
|
/** Re-runs admission for one skipped observation under the quest's current release and links. */
|
|
@@ -1906,6 +1948,11 @@ type Decision = z.infer<typeof decisionSchema>;
|
|
|
1906
1948
|
declare const reviewModeSchema: z.ZodEnum<{
|
|
1907
1949
|
"workers-ai": "workers-ai";
|
|
1908
1950
|
}>;
|
|
1951
|
+
/**
|
|
1952
|
+
* The review provider of a stored release or quest type. Publication accepts only `workers-ai`
|
|
1953
|
+
* (`reviewModeSchema`); the `fixture-*` values name the retired simulated providers and are
|
|
1954
|
+
* deprecated: they stay readable on records published before the retirement and are removed in 2.0.0.
|
|
1955
|
+
*/
|
|
1909
1956
|
declare const storedReviewModeSchema: z.ZodEnum<{
|
|
1910
1957
|
"workers-ai": "workers-ai";
|
|
1911
1958
|
"fixture-pass": "fixture-pass";
|
|
@@ -3459,6 +3506,7 @@ declare const submitSchema: z.ZodObject<{
|
|
|
3459
3506
|
faultAfterReview: z.ZodOptional<z.ZodBoolean>;
|
|
3460
3507
|
}, z.core.$strict>;
|
|
3461
3508
|
type SubmitInput = z.infer<typeof submitSchema>;
|
|
3509
|
+
/** @compat open */
|
|
3462
3510
|
type KnownAttemptStatus = (typeof AttemptStatus)[keyof typeof AttemptStatus];
|
|
3463
3511
|
declare const AttemptStatus: {
|
|
3464
3512
|
readonly Queued: "queued";
|
|
@@ -3957,11 +4005,29 @@ declare const entitlementCorrectionSchema: z.ZodObject<{
|
|
|
3957
4005
|
reason: z.ZodString;
|
|
3958
4006
|
}, z.core.$strict>;
|
|
3959
4007
|
type EntitlementCorrection = z.input<typeof entitlementCorrectionSchema>;
|
|
4008
|
+
type KnownCompletionSourceKind = (typeof CompletionSourceKind)[keyof typeof CompletionSourceKind];
|
|
4009
|
+
/** What paid a completion: a quest attempt, or a leaderboard settlement's prize. */
|
|
4010
|
+
declare const CompletionSourceKind: {
|
|
4011
|
+
readonly Quest: "quest";
|
|
4012
|
+
readonly Leaderboard: "leaderboard";
|
|
4013
|
+
};
|
|
4014
|
+
/** A known kind, or one a newer Relay sends. */
|
|
4015
|
+
type CompletionSourceKind = KnownCompletionSourceKind | (string & {});
|
|
4016
|
+
/** The quest or leaderboard that paid a completion, by `kind` and ID. */
|
|
4017
|
+
declare const completionSourceSchema: z.ZodObject<{
|
|
4018
|
+
kind: z.ZodType<CompletionSourceKind, unknown, z.core.$ZodTypeInternals<CompletionSourceKind, unknown>>;
|
|
4019
|
+
id: z.ZodString;
|
|
4020
|
+
}, z.core.$strip>;
|
|
4021
|
+
type CompletionSource = z.infer<typeof completionSourceSchema>;
|
|
3960
4022
|
declare const completionRecordSchema: z.ZodObject<{
|
|
3961
4023
|
key: z.ZodDefault<z.ZodString>;
|
|
3962
4024
|
id: z.ZodString;
|
|
3963
4025
|
quest: z.ZodString;
|
|
3964
4026
|
member: z.ZodString;
|
|
4027
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4028
|
+
kind: z.ZodType<CompletionSourceKind, unknown, z.core.$ZodTypeInternals<CompletionSourceKind, unknown>>;
|
|
4029
|
+
id: z.ZodString;
|
|
4030
|
+
}, z.core.$strip>>;
|
|
3965
4031
|
}, z.core.$strip>;
|
|
3966
4032
|
declare const questAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3967
4033
|
kind: z.ZodLiteral<"available">;
|
|
@@ -4013,6 +4079,10 @@ declare const questAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4013
4079
|
"wallet-required": "wallet-required";
|
|
4014
4080
|
"enrollment-required": "enrollment-required";
|
|
4015
4081
|
}>;
|
|
4082
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
4083
|
+
quest: "quest";
|
|
4084
|
+
tracker: "tracker";
|
|
4085
|
+
}>>;
|
|
4016
4086
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
4017
4087
|
}, z.core.$strict>, z.ZodObject<{
|
|
4018
4088
|
kind: z.ZodLiteral<"staff-required">;
|
|
@@ -4225,6 +4295,10 @@ declare const memberProgressSchema: z.ZodObject<{
|
|
|
4225
4295
|
"wallet-required": "wallet-required";
|
|
4226
4296
|
"enrollment-required": "enrollment-required";
|
|
4227
4297
|
}>;
|
|
4298
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
4299
|
+
quest: "quest";
|
|
4300
|
+
tracker: "tracker";
|
|
4301
|
+
}>>;
|
|
4228
4302
|
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
4229
4303
|
}, z.core.$strip> | z.ZodObject<{
|
|
4230
4304
|
kind: z.ZodLiteral<"staff-required">;
|
|
@@ -5036,6 +5110,10 @@ declare const snapshotSchema: z.ZodObject<{
|
|
|
5036
5110
|
id: z.ZodString;
|
|
5037
5111
|
quest: z.ZodString;
|
|
5038
5112
|
member: z.ZodString;
|
|
5113
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
5114
|
+
kind: z.ZodType<CompletionSourceKind, unknown, z.core.$ZodTypeInternals<CompletionSourceKind, unknown>>;
|
|
5115
|
+
id: z.ZodString;
|
|
5116
|
+
}, z.core.$strip>>;
|
|
5039
5117
|
}, z.core.$strip>>;
|
|
5040
5118
|
entitlements: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5041
5119
|
status: z.ZodLiteral<"available">;
|
|
@@ -5314,6 +5392,10 @@ declare const evidenceSchema: z.ZodObject<{
|
|
|
5314
5392
|
declare const errorSchema: z.ZodObject<{
|
|
5315
5393
|
error: z.ZodString;
|
|
5316
5394
|
code: z.ZodOptional<z.ZodString>;
|
|
5395
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
5396
|
+
quest: "quest";
|
|
5397
|
+
tracker: "tracker";
|
|
5398
|
+
}>>;
|
|
5317
5399
|
missing: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
5318
5400
|
kind: z.ZodLiteral<"completion">;
|
|
5319
5401
|
quest: z.ZodString;
|
|
@@ -5369,6 +5451,7 @@ declare const reviewListSchema: z.ZodObject<{
|
|
|
5369
5451
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
5370
5452
|
cursor: z.ZodOptional<z.ZodString>;
|
|
5371
5453
|
}, z.core.$strict>;
|
|
5454
|
+
/** @deprecated No route takes this query. Use `managedMemberQuerySchema` from `@domino-sdk/relay/server`. Removed in 2.0.0. */
|
|
5372
5455
|
declare const memberListSchema: z.ZodObject<{
|
|
5373
5456
|
prefix: z.ZodOptional<z.ZodString>;
|
|
5374
5457
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -5537,6 +5620,7 @@ declare const reviewPageSchema: z.ZodObject<{
|
|
|
5537
5620
|
}, z.core.$strip>>;
|
|
5538
5621
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
5539
5622
|
}, z.core.$strip>;
|
|
5623
|
+
/** @deprecated No route answers this shape. Use `managedMemberPageSchema` from `@domino-sdk/relay/server`. Removed in 2.0.0. */
|
|
5540
5624
|
declare const memberPageSchema: z.ZodObject<{
|
|
5541
5625
|
items: z.ZodArray<z.ZodObject<{
|
|
5542
5626
|
member: z.ZodString;
|
|
@@ -5544,6 +5628,7 @@ declare const memberPageSchema: z.ZodObject<{
|
|
|
5544
5628
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
5545
5629
|
}, z.core.$strip>;
|
|
5546
5630
|
type ReviewPage = z.infer<typeof reviewPageSchema>;
|
|
5631
|
+
/** @deprecated No route answers this shape. Use `ManagedMemberPage` from `@domino-sdk/relay/server`. Removed in 2.0.0. */
|
|
5547
5632
|
type MemberPage = z.infer<typeof memberPageSchema>;
|
|
5548
5633
|
declare const createStockItemSchema: z.ZodObject<{
|
|
5549
5634
|
actionId: z.ZodString;
|
|
@@ -5641,4 +5726,4 @@ declare const contentPerformancePageSchema: z.ZodObject<{
|
|
|
5641
5726
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
5642
5727
|
}, z.core.$strict>;
|
|
5643
5728
|
|
|
5644
|
-
export { type
|
|
5729
|
+
export { type SourceRoles as $, type Attempt as A, type Bound as B, type CompletionSource as C, type DataLeaves as D, type Entitlement as E, type KnownCompletionSourceKind as F, type KnownIdentityKind as G, type MemberIdentity as H, type IdentityKind as I, type MemberPage as J, type KnownAttemptStatus as K, type PickupAvailability as L, type MemberProgress as M, type PublishedRelease as N, type OpenIdentityKind as O, type PhotoResult as P, type QuestBudgetView as Q, type Reward as R, type SubmissionEvidence as S, type TieredRewardReference as T, type QuestAvailability as U, type QuestDescription as V, type QuestSettingsInput as W, type ReleaseInput as X, type ReviewPage as Y, type RoleOf as Z, type Snapshot as _, AttemptStatus as a, decisionSchema as a$, type TextResult as a0, type TextReviewInput as a1, type TieredRewardDefinition as a2, type Tracker as a3, type TrackerAccount as a4, type TrackerAttribution as a5, type TrackerBound as a6, type TrackerCondition as a7, type TrackerContent as a8, type TrackerContentQuery as a9, type TriggerSince as aA, type TypedTrackerRecord as aB, type Where as aC, type WhereSetting as aD, type WithAccountRoles as aE, type WithContent as aF, type WithRecordData as aG, type XContentMetric as aH, type XTweet as aI, accountRoleSchema as aJ, appIdentityKindSchema as aK, artifactSchema as aL, attemptSchema as aM, batchReleaseSchema as aN, beginHandoverSchema as aO, beneficiaryRole as aP, completionRecordSchema as aQ, completionSourceSchema as aR, configurePickupSchema as aS, confirmHandoverSchema as aT, contentMetricNameSchema as aU, contentPerformancePageSchema as aV, contentPerformanceQuerySchema as aW, contentPerformanceSnapshotSchema as aX, createStockItemSchema as aY, customContentSchema as aZ, customSourceSchema as a_, type TrackerData as aa, type TrackerDataIssue as ab, type TrackerDataSchema as ac, type TrackerDefinition as ad, type TrackerDefinitionResponse as ae, type TrackerOutcome as af, type TrackerOutcomeQuery as ag, type TrackerPage as ah, type TrackerPreview as ai, type TrackerPreviewInput as aj, type TrackerQuery as ak, type TrackerReadQuery as al, type TrackerReader as am, type TrackerRecord as an, type TrackerSource as ao, type TrackerSourceKind as ap, type TrackerSourceResponse as aq, type TrackerStatus as ar, type TrackerTriggerContext as as, type TrackerTriggerMode as at, type TrackerTriggerOutcomePage as au, type TrackerTriggerOutcomeQuery as av, type TrackerTriggerPolicy as aw, type TrackerWhere as ax, type TriggerEnrollment as ay, type TriggerHistorical as az, type EvaluatorProgress as b, tieredRewardDefinitionSchema as b$, defaultTriggerMode as b0, deferPolicy as b1, entitlementCorrectionSchema as b2, entitlementRecoverySchema as b3, entitlementSchema as b4, entitlementStateSchema as b5, errorSchema as b6, evaluatorProgressSchema as b7, evaluatorProtocol as b8, evaluatorProtocolSchema as b9, questProfileSchema as bA, questSettingsInputSchema as bB, quizAnswersSchema as bC, quizEvidenceSchema as bD, releaseSchema as bE, reservationSchema as bF, reviewItemSchema as bG, reviewListSchema as bH, reviewModeSchema as bI, reviewPageSchema as bJ, rewardBundleSchema as bK, rewardKey as bL, rewardSchema as bM, snapshotSchema as bN, sourceContent as bO, sourceIdentities as bP, staffDecisionSchema as bQ, stockItemSchema as bR, stockSchema as bS, storedQuestDescriptionSchema as bT, storedReviewModeSchema as bU, submissionEvidenceSchema as bV, submitSchema as bW, templateSchema as bX, textResultSchema as bY, textReviewInputSchema as bZ, tierRewardSchema as b_, eventSchema as ba, evidenceSchema as bb, identityKindSchema as bc, integrationRewardSchema as bd, isAppIdentityKind as be, isKnownTrackerSource as bf, knownIdentityKinds as bg, mediaUrlSchema as bh, memberIdentitySchema as bi, memberListSchema as bj, memberPageSchema as bk, memberProgressSchema as bl, openIdentityKindSchema as bm, photoResultSchema as bn, pickupAllocationSchema as bo, pickupAvailabilitySchema as bp, pickupCatalogSchema as bq, pickupPolicySchema as br, pickupSelectionSchema as bs, pointsRewardSchema as bt, publishedReleaseSchema as bu, publishedTrackerSchema as bv, questAvailabilitySchema as bw, questBudgetViewSchema as bx, questDescriptionSchema as by, questPresentationSchema as bz, type KnownTrackerSkipCode as c, trackerDataSchema as c$, tieredRewardReferenceSchema as c0, trackerAccountSchema as c1, trackerArtifactSchema as c2, trackerAttributionSchema as c3, trackerBoundSchema as c4, trackerConditionSchema as c5, trackerContentQuerySchema as c6, trackerContentReadSchema as c7, trackerContentSchema as c8, trackerContentStageSchema as c9, trackerSummarySchema as cA, trackerTriggerContextSchema as cB, trackerTriggerModeSchema as cC, trackerTriggerOutcomePageSchema as cD, trackerTriggerOutcomeQuerySchema as cE, trackerTriggerPolicySchema as cF, trackerTriggerRecordSchema as cG, trackerWhereSchema as cH, triggerAdmission as cI, triggerEnrollmentSchema as cJ, triggerHistoricalSchema as cK, triggerMode as cL, triggerSchema as cM, triggerSinceSchema as cN, whereConditions as cO, whereSettings as cP, xAccountRoles as cQ, xContentBodySchema as cR, xContentMetrics as cS, xSearchSourceSchema as cT, xTweetSchema as cU, type ResourceHandle as cV, type QuestHandle as cW, type LedgerReference as cX, type GroupHandle as cY, type LedgerHandle as cZ, type LedgerSetting as c_, trackerControlSchema as ca, trackerDataMaxBranches as cb, trackerDataMaxEntries as cc, trackerDataSchemaSchema as cd, trackerDefinitionResponseSchema as ce, trackerDefinitionSchema as cf, trackerEvidenceSchema as cg, trackerIngestResultSchema as ch, trackerIngestSchema as ci, trackerOutcomePageSchema as cj, trackerOutcomeQuerySchema as ck, trackerOutcomeRetrySchema as cl, trackerOutcomeSchema as cm, trackerPageSchema as cn, trackerPreviewInputSchema as co, trackerPreviewLimits as cp, trackerPreviewSchema as cq, trackerQuerySchema as cr, trackerRecordAccountSchema as cs, trackerRecordInputSchema as ct, trackerRecordSchema as cu, trackerSkipCodes as cv, trackerSourceKinds as cw, trackerSourceResponseSchema as cx, trackerSourceSchema as cy, trackerStatusSchema as cz, type QuestPresentation as d, type QuestProfile as e, type QuizEvidence as f, type SubmitInput as g, type TrackerSkipCode as h, type TrackerDataBudget as i, trackerDataIssue as j, trackerDataIssues as k, trackerDataPathTypes as l, trackerDataRecordSteps as m, type AccountRole as n, type AppIdentityKind as o, CompletionSourceKind as p, type Condition as q, type ContentBody as r, schemaCheckedReader as s, trackerDataBatchSteps as t, type ContentMetricName as u, type ContentPerformanceSnapshot as v, whereSchemaIssue as w, type Decision as x, type EntitlementCorrection as y, type EntitlementState as z };
|