@domino-sdk/relay 1.60.0 → 1.62.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 +175 -8
- package/README.md +3 -2
- package/dist/{schema-CwbRkmlr.d.ts → accounts-CCqCKCVx.d.ts} +3127 -1764
- package/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{analytics-URV-mxjH.d.ts → analytics-BwAKLi7O.d.ts} +347 -3
- package/dist/{attempt-captures-W2dgzGqE.d.ts → attempt-captures-Cm-5G0PC.d.ts} +1 -1
- package/dist/authoring.d.ts +130 -42
- package/dist/authoring.js +105 -19
- package/dist/{automatic-outcomes-Cmou89IS.d.ts → automatic-outcomes-pAsOyIVp.d.ts} +5 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +15 -11
- package/dist/browser.js +15 -11
- package/dist/{integrations-CmIkP1Gi.d.ts → capability-error-DFMwSuSf.d.ts} +160 -42
- package/dist/{pages-Bti7g5mX.d.ts → catalog--ZIlskAo.d.ts} +39 -561
- package/dist/{chunk-N3LJ6GFK.js → chunk-3KLC4AMA.js} +40 -11
- package/dist/{chunk-6ZG7WNYX.js → chunk-3PYYGFSB.js} +14 -2
- package/dist/{chunk-VWMIA2TT.js → chunk-5TEYFX6X.js} +2 -2
- package/dist/chunk-6WCIWXUV.js +31 -0
- package/dist/chunk-CICDIBOF.js +373 -0
- package/dist/{chunk-MHPKEVEW.js → chunk-CZFXGGEK.js} +5 -0
- package/dist/chunk-D26YNACF.js +320 -0
- package/dist/{chunk-KUPVQXUJ.js → chunk-E6IKQHTX.js} +2 -2
- package/dist/chunk-FWLQ5XCS.js +21 -0
- package/dist/{chunk-VVRQQRMQ.js → chunk-GKIFABGN.js} +150 -61
- package/dist/chunk-GTDW453U.js +522 -0
- package/dist/{chunk-Y2IGFLD2.js → chunk-HTZHBTIL.js} +69 -27
- package/dist/chunk-K2KS3JLY.js +188 -0
- package/dist/{chunk-GBSDAD3N.js → chunk-MK425RXJ.js} +3140 -3202
- package/dist/{chunk-YOAPPIWN.js → chunk-QYPMPWVX.js} +1 -1
- package/dist/chunk-UAKYDVT3.js +565 -0
- package/dist/{chunk-KWFY7L7X.js → chunk-UPQPUJOU.js} +36 -123
- package/dist/{chunk-2FHNY52R.js → chunk-UW5232GG.js} +65 -19
- package/dist/chunk-WSBYWVTZ.js +717 -0
- package/dist/{chunk-422J3QRW.js → chunk-XJFYAXET.js} +9 -8
- package/dist/{chunk-OTEUP2SG.js → chunk-XNKSSE32.js} +1 -1
- package/dist/{chunk-4OFH4BNX.js → chunk-Y322OTCH.js} +1 -1
- package/dist/{client-Cw1pB5sv.d.ts → client-B-hbHX30.d.ts} +109 -40
- package/dist/{deployments-DI-W7fBq.d.ts → deployments-M4OHn7G3.d.ts} +407 -18
- package/dist/identity-integration-3mX6b5iH.d.ts +1241 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +14 -11
- package/dist/internal.d.ts +14 -12
- package/dist/internal.js +26 -14
- package/dist/{offers-CqXfMIxq.d.ts → offers-DhAtss4_.d.ts} +21 -4
- package/dist/pages-B8q8Y_dQ.d.ts +715 -0
- package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
- package/dist/portal-proxy.d.ts +59 -2
- package/dist/portal-proxy.js +109 -23
- package/dist/react/index.d.ts +211 -27
- package/dist/react/index.js +286 -29
- package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/Y4OAVXFR.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +154 -30
- package/dist/schema.js +128 -75
- package/dist/server/index.d.ts +14 -12
- package/dist/server/index.js +2189 -1631
- package/dist/sign-in-providers-BkjcDsFF.d.ts +39 -0
- package/dist/submission-input-DHGKhXfp.d.ts +342 -0
- package/dist/{telegram-browser-CTJh4Ro_.d.ts → telegram-browser-BCE7zdOb.d.ts} +49 -6
- package/dist/telegram.d.ts +64 -0
- package/dist/telegram.js +23 -0
- package/dist/testing.d.ts +112 -15
- package/dist/testing.js +321 -16
- package/dist/tracker-data-Hb1uQnk5.d.ts +1855 -0
- package/dist/{transport-B8Ss5lcz.d.ts → transport-DkhX2Cbs.d.ts} +5863 -2217
- package/dist/{wallet-DZWL7lJH.d.ts → wallet-DTO7SXj7.d.ts} +27 -7
- package/package.json +5 -1
- package/dist/accounts-DoabriBX.d.ts +0 -306
- package/dist/capability-error-DufwG3G0.d.ts +0 -159
- package/dist/chunk-MJEJQH5A.js +0 -962
- package/dist/chunk-N7YOS4ZU.js +0 -13
- package/dist/chunk-XQKUJL7H.js +0 -602
- package/dist/chunk-YNW2ZUUP.js +0 -247
- package/dist/groups-9Jm3peq3.d.ts +0 -2827
- package/dist/runtime/chunks/ADUMK6CR.js +0 -1
- package/dist/submission-input-D9EGH_yb.d.ts +0 -146
- package/dist/x-KFJD2x8y.d.ts +0 -331
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { R as RequestError } from './request-error-D_dUPLwo.js';
|
|
2
|
+
|
|
3
|
+
/** SDK input convenience; the wire request always carries a key. */
|
|
4
|
+
type OptionalActionId<T> = T extends {
|
|
5
|
+
actionId: string;
|
|
6
|
+
} ? Omit<T, "actionId"> & {
|
|
7
|
+
actionId?: string;
|
|
8
|
+
} : never;
|
|
9
|
+
/** One logical write. Keep this object until its outcome is definite. */
|
|
10
|
+
type RelayAction<T> = {
|
|
11
|
+
/** The pending write's key, also available on its uncertain error as `operationId`. */
|
|
12
|
+
readonly actionId: string | undefined;
|
|
13
|
+
readonly busy: boolean;
|
|
14
|
+
readonly error: RequestError | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Starts a write with a generated key. While an uncertain write is pending, replays its saved
|
|
17
|
+
* callback instead of accepting a different write. Concurrent calls share one request.
|
|
18
|
+
* Put refreshes and other follow-up work outside the callback.
|
|
19
|
+
*/
|
|
20
|
+
run(task: (actionId: string) => Promise<T>): Promise<T>;
|
|
21
|
+
/** Replays the exact pending callback and key, only when the error's recovery is `replay`. */
|
|
22
|
+
retry(): Promise<T>;
|
|
23
|
+
/** Acknowledge an authoritative, definite outcome after reconciliation. Refuses while busy. */
|
|
24
|
+
settle(): boolean;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Owns a mutation key across uncertain answers. A definite success or refusal ends the action;
|
|
28
|
+
* the next `run` gets a new key. `reconcile` failures stay pending and cannot be replayed.
|
|
29
|
+
* In-memory only: persist the key yourself if recovery must survive a reload or process restart.
|
|
30
|
+
*/
|
|
31
|
+
declare function createRelayAction<T = unknown>(): RelayAction<T>;
|
|
32
|
+
|
|
33
|
+
export { type OptionalActionId as O, type RelayAction as R, createRelayAction as c };
|
|
@@ -1,4 +1,332 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
import { aa as PhotoResult, V as AttemptCodeSource } from './accounts-CCqCKCVx.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Quest code names an image; the platform fetches, decodes and pins it. No bytes or URLs cross the
|
|
6
|
+
* sandbox boundary, so a quest cannot make the platform fetch an arbitrary address.
|
|
7
|
+
*/
|
|
8
|
+
declare const imageReferenceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
9
|
+
evidence: z.ZodString;
|
|
10
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11
|
+
x: z.ZodLiteral<"profile">;
|
|
12
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
13
|
+
x: z.ZodLiteral<"post">;
|
|
14
|
+
postId: z.ZodString;
|
|
15
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
17
|
+
asset: z.ZodString;
|
|
18
|
+
}, z.core.$strict>]>;
|
|
19
|
+
type ImageReference = z.input<typeof imageReferenceSchema>;
|
|
20
|
+
declare const imageFieldSchema: z.ZodObject<{
|
|
21
|
+
type: z.ZodEnum<{
|
|
22
|
+
string: "string";
|
|
23
|
+
number: "number";
|
|
24
|
+
boolean: "boolean";
|
|
25
|
+
}>;
|
|
26
|
+
description: z.ZodString;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
declare const imageFieldsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
29
|
+
type: z.ZodEnum<{
|
|
30
|
+
string: "string";
|
|
31
|
+
number: "number";
|
|
32
|
+
boolean: "boolean";
|
|
33
|
+
}>;
|
|
34
|
+
description: z.ZodString;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
type ImageFields = z.input<typeof imageFieldsSchema>;
|
|
37
|
+
declare const imageRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
operation: z.ZodLiteral<"inspect">;
|
|
39
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
40
|
+
evidence: z.ZodString;
|
|
41
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
42
|
+
x: z.ZodLiteral<"profile">;
|
|
43
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
44
|
+
x: z.ZodLiteral<"post">;
|
|
45
|
+
postId: z.ZodString;
|
|
46
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
47
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
48
|
+
asset: z.ZodString;
|
|
49
|
+
}, z.core.$strict>]>;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
operation: z.ZodLiteral<"compare">;
|
|
52
|
+
images: z.ZodTuple<[z.ZodUnion<readonly [z.ZodObject<{
|
|
53
|
+
evidence: z.ZodString;
|
|
54
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
55
|
+
x: z.ZodLiteral<"profile">;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
x: z.ZodLiteral<"post">;
|
|
58
|
+
postId: z.ZodString;
|
|
59
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
asset: z.ZodString;
|
|
62
|
+
}, z.core.$strict>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
63
|
+
evidence: z.ZodString;
|
|
64
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
65
|
+
x: z.ZodLiteral<"profile">;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
+
x: z.ZodLiteral<"post">;
|
|
68
|
+
postId: z.ZodString;
|
|
69
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
asset: z.ZodString;
|
|
72
|
+
}, z.core.$strict>]>], null>;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
operation: z.ZodLiteral<"review">;
|
|
75
|
+
images: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
76
|
+
evidence: z.ZodString;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
x: z.ZodLiteral<"profile">;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
x: z.ZodLiteral<"post">;
|
|
81
|
+
postId: z.ZodString;
|
|
82
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
asset: z.ZodString;
|
|
85
|
+
}, z.core.$strict>]>>;
|
|
86
|
+
criteria: z.ZodString;
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
|
+
operation: z.ZodLiteral<"extract">;
|
|
89
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
90
|
+
evidence: z.ZodString;
|
|
91
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
92
|
+
x: z.ZodLiteral<"profile">;
|
|
93
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
94
|
+
x: z.ZodLiteral<"post">;
|
|
95
|
+
postId: z.ZodString;
|
|
96
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
98
|
+
asset: z.ZodString;
|
|
99
|
+
}, z.core.$strict>]>;
|
|
100
|
+
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
101
|
+
type: z.ZodEnum<{
|
|
102
|
+
string: "string";
|
|
103
|
+
number: "number";
|
|
104
|
+
boolean: "boolean";
|
|
105
|
+
}>;
|
|
106
|
+
description: z.ZodString;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
109
|
+
operation: z.ZodLiteral<"seen">;
|
|
110
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
111
|
+
evidence: z.ZodString;
|
|
112
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
113
|
+
x: z.ZodLiteral<"profile">;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
115
|
+
x: z.ZodLiteral<"post">;
|
|
116
|
+
postId: z.ZodString;
|
|
117
|
+
index: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
asset: z.ZodString;
|
|
120
|
+
}, z.core.$strict>]>;
|
|
121
|
+
maxDistance: z.ZodDefault<z.ZodNumber>;
|
|
122
|
+
}, z.core.$strict>], "operation">;
|
|
123
|
+
type ImageRequest = z.input<typeof imageRequestSchema>;
|
|
124
|
+
declare const imageInspectionSchema: z.ZodObject<{
|
|
125
|
+
width: z.ZodNumber;
|
|
126
|
+
height: z.ZodNumber;
|
|
127
|
+
format: z.ZodEnum<{
|
|
128
|
+
jpeg: "jpeg";
|
|
129
|
+
png: "png";
|
|
130
|
+
webp: "webp";
|
|
131
|
+
gif: "gif";
|
|
132
|
+
avif: "avif";
|
|
133
|
+
}>;
|
|
134
|
+
bytes: z.ZodNumber;
|
|
135
|
+
sha256: z.ZodString;
|
|
136
|
+
phash: z.ZodString;
|
|
137
|
+
dhash: z.ZodString;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
type ImageInspection = z.infer<typeof imageInspectionSchema>;
|
|
140
|
+
declare const imageComparisonSchema: z.ZodObject<{
|
|
141
|
+
identical: z.ZodBoolean;
|
|
142
|
+
phashDistance: z.ZodNumber;
|
|
143
|
+
dhashDistance: z.ZodNumber;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
type ImageComparison = z.infer<typeof imageComparisonSchema>;
|
|
146
|
+
declare const imageExtractionSchema: z.ZodObject<{
|
|
147
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
148
|
+
reason: z.ZodString;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
type ImageExtraction = z.infer<typeof imageExtractionSchema>;
|
|
151
|
+
declare const imageSightingsSchema: z.ZodObject<{
|
|
152
|
+
matches: z.ZodNumber;
|
|
153
|
+
closestDistance: z.ZodNullable<z.ZodNumber>;
|
|
154
|
+
firstSeenAt: z.ZodNullable<z.ZodNumber>;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
type ImageSightings = z.infer<typeof imageSightingsSchema>;
|
|
157
|
+
/**
|
|
158
|
+
* One reference image in a deployment bundle: a reference, never the bytes. The CLI uploads each
|
|
159
|
+
* file to storage before the preview; a hosted build stages it. `path` is where the bundle found
|
|
160
|
+
* the file, relative to relay.json; the platform ignores it.
|
|
161
|
+
*/
|
|
162
|
+
declare const imageAssetArtifactSchema: z.ZodObject<{
|
|
163
|
+
key: z.ZodString;
|
|
164
|
+
sha256: z.ZodString;
|
|
165
|
+
size: z.ZodNumber;
|
|
166
|
+
path: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
type ImageAssetArtifact = z.infer<typeof imageAssetArtifactSchema>;
|
|
169
|
+
/** Ask for upload URLs for images the project's storage does not hold yet. */
|
|
170
|
+
declare const imageUploadRequestSchema: z.ZodObject<{
|
|
171
|
+
images: z.ZodArray<z.ZodObject<{
|
|
172
|
+
sha256: z.ZodString;
|
|
173
|
+
size: z.ZodNumber;
|
|
174
|
+
type: z.ZodEnum<{
|
|
175
|
+
"image/jpeg": "image/jpeg";
|
|
176
|
+
"image/png": "image/png";
|
|
177
|
+
"image/webp": "image/webp";
|
|
178
|
+
}>;
|
|
179
|
+
}, z.core.$strict>>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
/** `upload` is null when the image is already stored; otherwise PUT the exact bytes before it expires. */
|
|
182
|
+
declare const imageUploadsSchema: z.ZodObject<{
|
|
183
|
+
images: z.ZodArray<z.ZodObject<{
|
|
184
|
+
sha256: z.ZodString;
|
|
185
|
+
upload: z.ZodNullable<z.ZodObject<{
|
|
186
|
+
url: z.ZodString;
|
|
187
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
188
|
+
expiresAt: z.ZodNumber;
|
|
189
|
+
}, z.core.$strict>>;
|
|
190
|
+
}, z.core.$strict>>;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
declare const publishedImageSchema: z.ZodObject<{
|
|
193
|
+
key: z.ZodString;
|
|
194
|
+
sha256: z.ZodString;
|
|
195
|
+
type: z.ZodEnum<{
|
|
196
|
+
"image/jpeg": "image/jpeg";
|
|
197
|
+
"image/png": "image/png";
|
|
198
|
+
"image/webp": "image/webp";
|
|
199
|
+
}>;
|
|
200
|
+
size: z.ZodNumber;
|
|
201
|
+
width: z.ZodNumber;
|
|
202
|
+
height: z.ZodNumber;
|
|
203
|
+
}, z.core.$strict>;
|
|
204
|
+
type PublishedImage = z.infer<typeof publishedImageSchema>;
|
|
205
|
+
type Extracted<F extends ImageFields> = {
|
|
206
|
+
[K in keyof F]: (F[K]["type"] extends "number" ? number : F[K]["type"] extends "boolean" ? boolean : string) | null;
|
|
207
|
+
};
|
|
208
|
+
/** Evaluator `ctx.images`. Each call uses one of the evaluation's eight capability calls. */
|
|
209
|
+
interface ImageReader {
|
|
210
|
+
inspect(image: ImageReference): Promise<ImageInspection>;
|
|
211
|
+
compare(a: ImageReference, b: ImageReference): Promise<ImageComparison>;
|
|
212
|
+
review(options: {
|
|
213
|
+
images: ImageReference[];
|
|
214
|
+
criteria: string;
|
|
215
|
+
}): Promise<PhotoResult>;
|
|
216
|
+
extract<const F extends ImageFields>(options: {
|
|
217
|
+
image: ImageReference;
|
|
218
|
+
fields: F;
|
|
219
|
+
}): Promise<{
|
|
220
|
+
values: Extracted<F>;
|
|
221
|
+
reason: string;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* Records the image for this attempt, then counts other participants' recorded images within
|
|
225
|
+
* `maxDistance`. The record is written when `seen` runs, not when the attempt is decided, so it
|
|
226
|
+
* stays even if the attempt is rejected: concurrent submissions of one photo must see each
|
|
227
|
+
* other. Replays reuse the captured result.
|
|
228
|
+
*/
|
|
229
|
+
seen(image: ImageReference, options?: {
|
|
230
|
+
maxDistance?: number;
|
|
231
|
+
}): Promise<ImageSightings>;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare const xIdSchema: z.ZodString;
|
|
235
|
+
declare const xConnectionSchema: z.ZodObject<{
|
|
236
|
+
userId: z.ZodString;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
declare const xProfileSchema: z.ZodObject<{
|
|
239
|
+
id: z.ZodString;
|
|
240
|
+
username: z.ZodString;
|
|
241
|
+
name: z.ZodString;
|
|
242
|
+
bio: z.ZodNullable<z.ZodString>;
|
|
243
|
+
profileImageUrl: z.ZodNullable<z.ZodString>;
|
|
244
|
+
followersCount: z.ZodNullable<z.ZodNumber>;
|
|
245
|
+
verified: z.ZodNullable<z.ZodBoolean>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
/** An X handle, with or without its leading `@`: 1 to 15 letters, digits or underscores. */
|
|
248
|
+
declare const xUsernameSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
249
|
+
declare const xUserLookupInputSchema: z.ZodObject<{
|
|
250
|
+
username: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
type XUserLookupInput = z.input<typeof xUserLookupInputSchema>;
|
|
253
|
+
/**
|
|
254
|
+
* The X account that holds a handle, as Domino last read it from X (at most a day ago). A handle
|
|
255
|
+
* can change hands, so the stable `id` is what trackers, `--author` filters and
|
|
256
|
+
* `ctx.x.follows({ userId })` take. Resolving a handle says nothing about who owns the account.
|
|
257
|
+
*/
|
|
258
|
+
declare const xUserSchema: z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
username: z.ZodString;
|
|
261
|
+
name: z.ZodString;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
type XUser = z.infer<typeof xUserSchema>;
|
|
264
|
+
declare const xPostSchema: z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
userId: z.ZodString;
|
|
267
|
+
content: z.ZodString;
|
|
268
|
+
createdAt: z.ZodISODateTime;
|
|
269
|
+
author: z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
username: z.ZodString;
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
274
|
+
}, z.core.$loose>;
|
|
275
|
+
likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
276
|
+
replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
277
|
+
retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
278
|
+
quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
279
|
+
viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
280
|
+
bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
281
|
+
isReply: z.ZodBoolean;
|
|
282
|
+
isRetweet: z.ZodBoolean;
|
|
283
|
+
isQuoteTweet: z.ZodBoolean;
|
|
284
|
+
quotedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
285
|
+
inReplyToUserId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
286
|
+
inReplyToStatusId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
287
|
+
retweetedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
288
|
+
media: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<{
|
|
289
|
+
type: string;
|
|
290
|
+
url: string;
|
|
291
|
+
}[], unknown>>;
|
|
292
|
+
}, z.core.$loose>;
|
|
293
|
+
declare const xRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
294
|
+
operation: z.ZodLiteral<"connection">;
|
|
295
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
+
operation: z.ZodLiteral<"profile">;
|
|
297
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
298
|
+
operation: z.ZodLiteral<"post">;
|
|
299
|
+
postId: z.ZodString;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
operation: z.ZodLiteral<"follows">;
|
|
302
|
+
userId: z.ZodString;
|
|
303
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
304
|
+
operation: z.ZodLiteral<"reposted">;
|
|
305
|
+
postId: z.ZodString;
|
|
306
|
+
}, z.core.$strict>], "operation">;
|
|
307
|
+
type XConnection = z.infer<typeof xConnectionSchema>;
|
|
308
|
+
type XProfile = z.infer<typeof xProfileSchema>;
|
|
309
|
+
type XPost = z.infer<typeof xPostSchema>;
|
|
310
|
+
/**
|
|
311
|
+
* Reads the member's linked X account and public X data. The account is pinned at the attempt's
|
|
312
|
+
* first X read: later links and unlinks do not change the attempt. `connection()`, `profile()`,
|
|
313
|
+
* `follows()` and `reposted()` resolve to `null` when the member has no linked X account;
|
|
314
|
+
* `post()` reads any public post and resolves to `null` when it does not exist. Provider failures
|
|
315
|
+
* throw `CapabilityError` with code `"provider-unavailable"`.
|
|
316
|
+
*/
|
|
317
|
+
interface XReader {
|
|
318
|
+
connection(): Promise<XConnection | null>;
|
|
319
|
+
profile(): Promise<XProfile | null>;
|
|
320
|
+
post(input: {
|
|
321
|
+
postId: string;
|
|
322
|
+
}): Promise<XPost | null>;
|
|
323
|
+
follows(input: {
|
|
324
|
+
userId: string;
|
|
325
|
+
}): Promise<boolean | null>;
|
|
326
|
+
reposted(input: {
|
|
327
|
+
postId: string;
|
|
328
|
+
}): Promise<boolean | null>;
|
|
329
|
+
}
|
|
2
330
|
|
|
3
331
|
/**
|
|
4
332
|
* The ranges `analytics.read` covers. Each ends now: `7d`, `30d` and `90d` are that many project
|
|
@@ -34,7 +362,9 @@ declare const analyticsReadSchema: z.ZodObject<{
|
|
|
34
362
|
all: "all";
|
|
35
363
|
}>;
|
|
36
364
|
from: z.ZodISODateTime;
|
|
365
|
+
fromMs: z.ZodOptional<z.ZodNumber>;
|
|
37
366
|
to: z.ZodISODateTime;
|
|
367
|
+
toMs: z.ZodOptional<z.ZodNumber>;
|
|
38
368
|
bucket: z.ZodEnum<{
|
|
39
369
|
day: "day";
|
|
40
370
|
week: "week";
|
|
@@ -43,12 +373,16 @@ declare const analyticsReadSchema: z.ZodObject<{
|
|
|
43
373
|
buckets: z.ZodArray<z.ZodObject<{
|
|
44
374
|
key: z.ZodString;
|
|
45
375
|
start: z.ZodISODateTime;
|
|
376
|
+
startMs: z.ZodOptional<z.ZodNumber>;
|
|
46
377
|
end: z.ZodISODateTime;
|
|
378
|
+
endMs: z.ZodOptional<z.ZodNumber>;
|
|
47
379
|
}, z.core.$strip>>;
|
|
48
380
|
}, z.core.$strip>;
|
|
49
381
|
previous: z.ZodOptional<z.ZodObject<{
|
|
50
382
|
from: z.ZodISODateTime;
|
|
383
|
+
fromMs: z.ZodOptional<z.ZodNumber>;
|
|
51
384
|
to: z.ZodISODateTime;
|
|
385
|
+
toMs: z.ZodOptional<z.ZodNumber>;
|
|
52
386
|
}, z.core.$strip>>;
|
|
53
387
|
members: z.ZodObject<{
|
|
54
388
|
signUps: z.ZodObject<{
|
|
@@ -95,6 +429,7 @@ declare const analyticsReadSchema: z.ZodObject<{
|
|
|
95
429
|
topReasons: z.ZodArray<z.ZodObject<{
|
|
96
430
|
reason: z.ZodString;
|
|
97
431
|
code: z.ZodNullable<z.ZodString>;
|
|
432
|
+
codeSource: z.ZodOptional<z.ZodNullable<z.ZodType<AttemptCodeSource, unknown, z.core.$ZodTypeInternals<AttemptCodeSource, unknown>>>>;
|
|
98
433
|
count: z.ZodNumber;
|
|
99
434
|
}, z.core.$strip>>;
|
|
100
435
|
rejectionsBySource: z.ZodObject<{
|
|
@@ -102,6 +437,7 @@ declare const analyticsReadSchema: z.ZodObject<{
|
|
|
102
437
|
staff: z.ZodNumber;
|
|
103
438
|
budget: z.ZodNumber;
|
|
104
439
|
expired: z.ZodNumber;
|
|
440
|
+
keyUsed: z.ZodOptional<z.ZodNumber>;
|
|
105
441
|
}, z.core.$strip>;
|
|
106
442
|
series: z.ZodObject<{
|
|
107
443
|
attempts: z.ZodArray<z.ZodNumber>;
|
|
@@ -169,6 +505,7 @@ declare const analyticsReadSchema: z.ZodObject<{
|
|
|
169
505
|
}, z.core.$strip>>;
|
|
170
506
|
testEnvironment: z.ZodOptional<z.ZodObject<{
|
|
171
507
|
lastResetAt: z.ZodNullable<z.ZodISODateTime>;
|
|
508
|
+
lastResetAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
172
509
|
shiftedClockMembers: z.ZodNumber;
|
|
173
510
|
}, z.core.$strip>>;
|
|
174
511
|
}, z.core.$strip>;
|
|
@@ -179,8 +516,9 @@ type AnalyticsMetric = AnalyticsRead["members"]["signUps"];
|
|
|
179
516
|
type AnalyticsQuest = AnalyticsRead["quests"]["byQuest"][number];
|
|
180
517
|
/**
|
|
181
518
|
* How a breakdown splits a metric: by quest, offer, referral program, group, tracker or
|
|
182
|
-
* leaderboard; for rejections by `source` (evaluator, staff, budget, expired) or `reason`
|
|
183
|
-
* rejection code, else the exact text); for
|
|
519
|
+
* leaderboard; for rejections by `source` (evaluator, staff, budget, expired, keyUsed) or `reason`
|
|
520
|
+
* (the rejection code, with Relay's `key-used` apart from an evaluator's, else the exact text); for
|
|
521
|
+
* tracker outcomes by `outcome` (admitted or skipped).
|
|
184
522
|
*/
|
|
185
523
|
declare const analyticsBreakdowns: readonly ["quest", "source", "reason", "offer", "program", "group", "tracker", "outcome", "leaderboard"];
|
|
186
524
|
type AnalyticsBreakdown = (typeof analyticsBreakdowns)[number];
|
|
@@ -436,7 +774,9 @@ declare const analyticsMetricResultSchema: z.ZodObject<{
|
|
|
436
774
|
all: "all";
|
|
437
775
|
}>;
|
|
438
776
|
from: z.ZodISODateTime;
|
|
777
|
+
fromMs: z.ZodOptional<z.ZodNumber>;
|
|
439
778
|
to: z.ZodISODateTime;
|
|
779
|
+
toMs: z.ZodOptional<z.ZodNumber>;
|
|
440
780
|
bucket: z.ZodEnum<{
|
|
441
781
|
day: "day";
|
|
442
782
|
week: "week";
|
|
@@ -445,12 +785,16 @@ declare const analyticsMetricResultSchema: z.ZodObject<{
|
|
|
445
785
|
buckets: z.ZodArray<z.ZodObject<{
|
|
446
786
|
key: z.ZodString;
|
|
447
787
|
start: z.ZodISODateTime;
|
|
788
|
+
startMs: z.ZodOptional<z.ZodNumber>;
|
|
448
789
|
end: z.ZodISODateTime;
|
|
790
|
+
endMs: z.ZodOptional<z.ZodNumber>;
|
|
449
791
|
}, z.core.$strip>>;
|
|
450
792
|
}, z.core.$strip>;
|
|
451
793
|
previous: z.ZodOptional<z.ZodObject<{
|
|
452
794
|
from: z.ZodISODateTime;
|
|
795
|
+
fromMs: z.ZodOptional<z.ZodNumber>;
|
|
453
796
|
to: z.ZodISODateTime;
|
|
797
|
+
toMs: z.ZodOptional<z.ZodNumber>;
|
|
454
798
|
}, z.core.$strip>>;
|
|
455
799
|
ledger: z.ZodOptional<z.ZodString>;
|
|
456
800
|
value: z.ZodObject<{
|
|
@@ -479,4 +823,4 @@ declare const analyticsMetricResultSchema: z.ZodObject<{
|
|
|
479
823
|
type AnalyticsMetricResult = z.infer<typeof analyticsMetricResultSchema>;
|
|
480
824
|
type AnalyticsBreakdownRow = NonNullable<AnalyticsMetricResult["breakdown"]>["rows"][number];
|
|
481
825
|
|
|
482
|
-
export { type AnalyticsMetricId as
|
|
826
|
+
export { analyticsBreakdowns as $, xIdSchema as A, xPostSchema as B, xProfileSchema as C, xRequestSchema as D, type Extracted as E, xUserLookupInputSchema as F, xUserSchema as G, xUsernameSchema as H, type ImageReader as I, type AnalyticsMetricId as J, analyticsCatalog as K, type AnalyticsQuery as L, type AnalyticsRead as M, type AnalyticsCatalog as N, type AnalyticsMetricQuery as O, type PublishedImage as P, type AnalyticsMetricResult as Q, type AnalyticsBreakdown as R, type AnalyticsBreakdownRow as S, type AnalyticsCatalogEntry as T, type AnalyticsChart as U, type AnalyticsFilter as V, type AnalyticsMetric as W, type XReader as X, type AnalyticsMetricKind as Y, type AnalyticsQuest as Z, type AnalyticsRange as _, type ImageAssetArtifact as a, analyticsCatalogSchema as a0, analyticsCharts as a1, analyticsFilters as a2, analyticsMetricIds as a3, analyticsMetricQuerySchema as a4, analyticsMetricResultSchema as a5, analyticsQueryLimit as a6, analyticsQuerySchema as a7, analyticsRanges as a8, analyticsReadSchema as a9, type ImageComparison as b, type ImageExtraction as c, type ImageFields as d, type ImageInspection as e, type ImageReference as f, type ImageRequest as g, type ImageSightings as h, type XConnection as i, type XPost as j, type XProfile as k, type XUser as l, type XUserLookupInput as m, imageAssetArtifactSchema as n, imageComparisonSchema as o, imageExtractionSchema as p, imageFieldSchema as q, imageFieldsSchema as r, imageInspectionSchema as s, imageReferenceSchema as t, imageRequestSchema as u, imageSightingsSchema as v, imageUploadRequestSchema as w, imageUploadsSchema as x, publishedImageSchema as y, xConnectionSchema as z };
|