@domino-sdk/relay 1.0.0-next.10 → 1.0.0-next.13

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.
Files changed (46) hide show
  1. package/dist/authoring.d.ts +39 -36
  2. package/dist/authoring.js +10 -3
  3. package/dist/avatar.d.ts +2 -2
  4. package/dist/browser.d.ts +153 -129
  5. package/dist/browser.js +6 -6
  6. package/dist/{pages-D3titw5B.d.ts → catalog-C85V1NgW.d.ts} +178 -216
  7. package/dist/{chunk-ZWY3R6B3.js → chunk-6A2V4L3T.js} +4 -0
  8. package/dist/{chunk-YYD4QUBO.js → chunk-CRNQP7NV.js} +550 -470
  9. package/dist/{chunk-X2F2RAR3.js → chunk-EZWNGI5B.js} +23 -4
  10. package/dist/{chunk-7Q4BGGT6.js → chunk-FXYJ4OMX.js} +1 -1
  11. package/dist/{chunk-4LBUTHD6.js → chunk-II7DRZSL.js} +1 -1
  12. package/dist/chunk-KS33GOUL.js +83 -0
  13. package/dist/{chunk-QR7ZA2BJ.js → chunk-M64XHC42.js} +48 -4
  14. package/dist/chunk-MNQI35OG.js +100 -0
  15. package/dist/{chunk-PHU5VDLR.js → chunk-OA2KMQVZ.js} +41 -26
  16. package/dist/{chunk-P6FK43GG.js → chunk-WQ24ILGO.js} +140 -41
  17. package/dist/{client-CT4-S5vc.d.ts → client-Bf9PNUIi.d.ts} +61 -80
  18. package/dist/deployments-CNCP0JnD.d.ts +4250 -0
  19. package/dist/identity-integration-CBR8l3ju.d.ts +37 -0
  20. package/dist/images-BG4pdO4y.d.ts +234 -0
  21. package/dist/index.d.ts +10 -8
  22. package/dist/index.js +8 -5
  23. package/dist/{integrations-Ba5TtqTv.d.ts → integrations-EjQzIApL.d.ts} +1 -88
  24. package/dist/internal.d.ts +7 -38
  25. package/dist/internal.js +15 -88
  26. package/dist/observations-CQ6IcNuQ.d.ts +90 -0
  27. package/dist/pages-KYK1L60W.d.ts +152 -0
  28. package/dist/portal-proxy.js +5 -4
  29. package/dist/{profiles-DDMFBRKe.d.ts → profiles-BtOXMGcC.d.ts} +1 -1
  30. package/dist/react/index.d.ts +150 -31
  31. package/dist/react/index.js +149 -11
  32. package/dist/{submission-input-0OOGaq8c.d.ts → referrals-KQfP4pBf.d.ts} +189 -182
  33. package/dist/request-error-VnTiMXc3.d.ts +52 -0
  34. package/dist/{schema-Di3aLSiK.d.ts → schema-BF_TQsmT.d.ts} +338 -47
  35. package/dist/schema.d.ts +14 -4126
  36. package/dist/schema.js +46 -40
  37. package/dist/server/index.d.ts +19445 -0
  38. package/dist/server/index.js +1884 -0
  39. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  40. package/dist/submission-input-CccwAl5Z.d.ts +83 -0
  41. package/dist/{images-BTgk6OmC.d.ts → trackers-W7nRdRr7.d.ts} +1 -232
  42. package/dist/vite.d.ts +1 -1
  43. package/dist/vite.js +1 -0
  44. package/dist/{wallet-BGOfFkG9.d.ts → wallet-BtiG0Xhr.d.ts} +1 -1
  45. package/package.json +5 -1
  46. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const identityIntegrationInputSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ origin: z.ZodString;
6
+ }, z.core.$strict>;
7
+ declare const identityIntegrationSchema: z.ZodObject<{
8
+ organization: z.ZodString;
9
+ project: z.ZodString;
10
+ environment: z.ZodEnum<{
11
+ test: "test";
12
+ live: "live";
13
+ }>;
14
+ id: z.ZodString;
15
+ name: z.ZodString;
16
+ origin: z.ZodString;
17
+ expiresAt: z.ZodNumber;
18
+ }, z.core.$strict>;
19
+ declare const identityIntegrationSecretSchema: z.ZodObject<{
20
+ organization: z.ZodString;
21
+ project: z.ZodString;
22
+ environment: z.ZodEnum<{
23
+ test: "test";
24
+ live: "live";
25
+ }>;
26
+ id: z.ZodString;
27
+ name: z.ZodString;
28
+ origin: z.ZodString;
29
+ expiresAt: z.ZodNumber;
30
+ token: z.ZodString;
31
+ }, z.core.$strict>;
32
+ declare const participantExchangeSchema: z.ZodObject<{
33
+ subject: z.ZodString;
34
+ previousToken: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strict>;
36
+
37
+ export { identityIntegrationSchema as a, identityIntegrationSecretSchema as b, identityIntegrationInputSchema as i, participantExchangeSchema as p };
@@ -0,0 +1,234 @@
1
+ import { z } from 'zod';
2
+ import { P as PhotoResult } from './schema-BF_TQsmT.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
+ export { type ImageAssetArtifact as I, type PublishedImage as P, type ImageComparison as a, type ImageExtraction as b, type ImageFields as c, type ImageInspection as d, type ImageReader as e, type ImageReference as f, type ImageRequest as g, type ImageSightings as h, imageAssetArtifactSchema as i, imageComparisonSchema as j, imageExtractionSchema as k, imageFieldSchema as l, imageFieldsSchema as m, imageInspectionSchema as n, imageReferenceSchema as o, imageRequestSchema as p, imageSightingsSchema as q, imageUploadRequestSchema as r, imageUploadsSchema as s, publishedImageSchema as t };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
- export { C as ClaimSubmission, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, l as RequestError, m as RequestErrorDetails, n as RequestErrorKind, o as RequestRecovery, S as SubmissionDraft, p as SubmissionStatus, q as SubmissionStore, V as ValueSubmission, r as createRelayClient, s as isRelayError, t as isRequestError } from './client-CT4-S5vc.js';
1
+ export { C as ClaimSubmission, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, S as SubmissionDraft, l as SubmissionStatus, m as SubmissionStore, V as ValueSubmission, n as createRelayClient, o as isRelayError } from './client-Bf9PNUIi.js';
2
+ export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-VnTiMXc3.js';
2
3
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
3
- export { A as AccountConnection, a as AuthProvider, L as LeaderboardDefinition, b as LeaderboardPage, c as LeaderboardPlacement, d as LeaderboardQuery, R as ReferralDefinition, T as TextEvidence, e as TextOptions, U as UrlEvidence, f as UrlOptions, V as ValueEvidence } from './submission-input-0OOGaq8c.js';
4
- export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantPrincipal, c as ParticipantSession, Q as QuestInteraction, d as QuestRewardView, e as QuestView, S as Session, s as sessionMember } from './pages-D3titw5B.js';
4
+ export { A as AccountConnection, a as AuthProvider, T as TextEvidence, b as TextOptions, U as UrlEvidence, c as UrlOptions, V as ValueEvidence } from './submission-input-CccwAl5Z.js';
5
+ export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantPrincipal, c as ParticipantSession, S as Session, s as sessionMember } from './pages-KYK1L60W.js';
6
+ export { K as KnownPointEntryKind, P as PointBalance, a as PointBalances, b as PointEntry, c as PointEntryKind, d as PointHistoryPage, e as PointHistoryQuery, f as PointLedgerReference, Q as QuestInteraction, g as QuestRewardView, h as QuestView } from './catalog-C85V1NgW.js';
5
7
  export { C as CollectionPass } from './collection-BGneJ6Bk.js';
6
- export { P as PointLedgerReference } from './point-ledgers-iS00Z_v0.js';
7
- export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileReferral, e as ProfileSummary, f as ProfileUpdate, g as ProfileVisibility } from './profiles-DDMFBRKe.js';
8
- export { Q as QuizContent, S as StreakProgress } from './streaks-CwGReWGt.js';
9
- export { A as Attempt, E as Entitlement, M as MemberProgress, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, R as Reward, S as SubmissionEvidence, c as SubmitInput, T as TieredRewardReference } from './schema-Di3aLSiK.js';
10
- export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletSignInNetwork, e as WalletSignature, f as WalletSigner, g as WalletUnlinkInput } from './wallet-BGOfFkG9.js';
8
+ export { L as LeaderboardDefinition, a as LeaderboardPage, b as LeaderboardPlacement, c as LeaderboardQuery, R as ReferralDefinition } from './referrals-KQfP4pBf.js';
9
+ export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileReferral, e as ProfileSummary, f as ProfileUpdate, g as ProfileVisibility } from './profiles-BtOXMGcC.js';
10
+ export { Q as QuizContent, S as StreakProgress } from './streaks-CWyq8Px5.js';
11
+ export { A as Attempt, E as Entitlement, M as MemberProgress, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, R as Reward, S as SubmissionEvidence, c as SubmitInput, T as TieredRewardReference } from './schema-BF_TQsmT.js';
12
+ export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletSignInNetwork, e as WalletSignature, f as WalletSigner, g as WalletUnlinkInput } from './wallet-BtiG0Xhr.js';
11
13
  import 'zod';
package/dist/index.js CHANGED
@@ -5,20 +5,23 @@ import {
5
5
  import {
6
6
  QuestUpdatedError,
7
7
  createRelayClient
8
- } from "./chunk-X2F2RAR3.js";
9
- import "./chunk-QR7ZA2BJ.js";
8
+ } from "./chunk-EZWNGI5B.js";
9
+ import {
10
+ PointEntryKind
11
+ } from "./chunk-M64XHC42.js";
10
12
  import {
11
13
  RelayError,
12
14
  RelayErrorCode,
13
15
  RequestError,
14
16
  isRelayError,
15
17
  isRequestError
16
- } from "./chunk-PHU5VDLR.js";
18
+ } from "./chunk-OA2KMQVZ.js";
17
19
  import {
18
20
  sessionMember
19
- } from "./chunk-7Q4BGGT6.js";
20
- import "./chunk-YYD4QUBO.js";
21
+ } from "./chunk-FXYJ4OMX.js";
22
+ import "./chunk-CRNQP7NV.js";
21
23
  export {
24
+ PointEntryKind,
22
25
  QuestUpdatedError,
23
26
  RelayError,
24
27
  RelayErrorCode,
@@ -290,93 +290,6 @@ interface XReader {
290
290
  }): Promise<boolean>;
291
291
  }
292
292
 
293
- declare const observationInputSchema: z.ZodObject<{
294
- id: z.ZodString;
295
- source: z.ZodString;
296
- type: z.ZodString;
297
- member: z.ZodString;
298
- actor: z.ZodOptional<z.ZodObject<{
299
- provider: z.ZodString;
300
- subject: z.ZodString;
301
- }, z.core.$strict>>;
302
- occurredAt: z.ZodNumber;
303
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
304
- }, z.core.$strict>;
305
- declare const observationSchema: z.ZodObject<{
306
- id: z.ZodString;
307
- source: z.ZodString;
308
- type: z.ZodString;
309
- member: z.ZodString;
310
- actor: z.ZodOptional<z.ZodObject<{
311
- provider: z.ZodString;
312
- subject: z.ZodString;
313
- }, z.core.$strict>>;
314
- occurredAt: z.ZodNumber;
315
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
316
- receivedAt: z.ZodNumber;
317
- }, z.core.$strict>;
318
- type Observation = z.infer<typeof observationSchema>;
319
- declare const observationTriggerSchema: z.ZodObject<{
320
- source: z.ZodString;
321
- type: z.ZodString;
322
- }, z.core.$strict>;
323
- declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
324
- kind: z.ZodLiteral<"streak">;
325
- days: z.ZodNumber;
326
- timeZone: z.ZodString;
327
- }, z.core.$strict>, z.ZodObject<{
328
- kind: z.ZodLiteral<"once">;
329
- }, z.core.$strict>, z.ZodObject<{
330
- kind: z.ZodLiteral<"keyed">;
331
- }, z.core.$strict>], "kind">;
332
- declare const completionKeySchema: z.ZodString;
333
- declare const budgetSchema: z.ZodObject<{
334
- id: z.ZodString;
335
- scope: z.ZodEnum<{
336
- member: "member";
337
- project: "project";
338
- }>;
339
- period: z.ZodEnum<{
340
- day: "day";
341
- lifetime: "lifetime";
342
- week: "week";
343
- }>;
344
- limit: z.ZodNumber;
345
- cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
346
- balance: z.ZodString;
347
- }, z.core.$strict>]>;
348
- }, z.core.$strict>;
349
- type Budget = z.infer<typeof budgetSchema>;
350
- declare const observationReceiptSchema: z.ZodObject<{
351
- id: z.ZodString;
352
- source: z.ZodString;
353
- attempts: z.ZodArray<z.ZodString>;
354
- receivedAt: z.ZodNumber;
355
- }, z.core.$strip>;
356
- declare const discordReactionSchema: z.ZodObject<{
357
- guildId: z.ZodString;
358
- channelId: z.ZodString;
359
- messageId: z.ZodString;
360
- userId: z.ZodString;
361
- messageAuthorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
362
- actorRoles: z.ZodDefault<z.ZodArray<z.ZodString>>;
363
- emoji: z.ZodObject<{
364
- id: z.ZodNullable<z.ZodString>;
365
- name: z.ZodString;
366
- }, z.core.$strip>;
367
- messagePublishedAt: z.ZodNumber;
368
- }, z.core.$strict>;
369
- declare const discordMessageSchema: z.ZodObject<{
370
- guildId: z.ZodString;
371
- channelId: z.ZodString;
372
- messageId: z.ZodString;
373
- userId: z.ZodString;
374
- content: z.ZodNullable<z.ZodString>;
375
- replyTo: z.ZodNullable<z.ZodString>;
376
- publishedAt: z.ZodNumber;
377
- }, z.core.$strict>;
378
- type DiscordMessage = z.infer<typeof discordMessageSchema>;
379
-
380
293
  declare const integrationProviderSchema: z.ZodEnum<{
381
294
  discord: "discord";
382
295
  }>;
@@ -407,4 +320,4 @@ declare const projectIntegrationSchema: z.ZodObject<{
407
320
  }, z.core.$strip>;
408
321
  type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
409
322
 
410
- export { settingsFieldsSchema as A, type Budget as B, settingsValuesSchema as C, type DiscordMessage as D, xConnectionSchema as E, xIdSchema as F, xPostSchema as G, xProfileSchema as H, type IntegerSettings as I, xRequestSchema as J, type Observation as O, type ProjectIntegration as P, type ResourceSource as R, type Setting as S, type XReader as X, type IntegrationProvider as a, type ResourceOption as b, type SettingField as c, type SettingsValues as d, type XConnection as e, type XPost as f, type XProfile as g, budgetSchema as h, compatibleSettingKinds as i, completionKeySchema as j, completionPolicySchema as k, discordMessageSchema as l, discordReactionSchema as m, discordServerSchema as n, observationTriggerSchema as o, integrationProviderSchema as p, missingResourceSettings as q, observationInputSchema as r, observationReceiptSchema as s, observationSchema as t, parseSettings as u, projectIntegrationSchema as v, resourceOptionsSchema as w, resourceRequestSchema as x, resourceSourceSchema as y, settingFieldSchema as z };
323
+ export { type IntegerSettings as I, type ProjectIntegration as P, type ResourceOption as R, type Setting as S, type XConnection as X, type IntegrationProvider as a, type ResourceSource as b, type SettingField as c, type SettingsValues as d, type XPost as e, type XProfile as f, type XReader as g, compatibleSettingKinds as h, discordServerSchema as i, integrationProviderSchema as j, projectIntegrationSchema as k, resourceRequestSchema as l, missingResourceSettings as m, resourceSourceSchema as n, settingsFieldsSchema as o, parseSettings as p, settingsValuesSchema as q, resourceOptionsSchema as r, settingFieldSchema as s, xIdSchema as t, xPostSchema as u, xProfileSchema as v, xRequestSchema as w, xConnectionSchema as x };
@@ -1,7 +1,8 @@
1
- import { j as PublishedRelease } from './schema-Di3aLSiK.js';
1
+ import { f as PublishedRelease } from './schema-BF_TQsmT.js';
2
+ export { i as identityIntegrationInputSchema, a as identityIntegrationSchema, b as identityIntegrationSecretSchema, p as participantExchangeSchema } from './identity-integration-CBR8l3ju.js';
3
+ import { c as ImageFields, g as ImageRequest } from './images-BG4pdO4y.js';
2
4
  import { z } from 'zod';
3
- import { s as ImageFields, w as ImageRequest } from './images-BTgk6OmC.js';
4
- export { aT as TrackerDataBudget, aU as schemaCheckedReader, aV as trackerDataBatchSteps, aW as trackerDataIssue, aX as trackerDataIssues, aY as trackerDataPathTypes, aZ as trackerDataRecordSteps, a_ as whereSchemaIssue } from './images-BTgk6OmC.js';
5
+ export { ax as TrackerDataBudget, ay as schemaCheckedReader, az as trackerDataBatchSteps, aA as trackerDataIssue, aB as trackerDataIssues, aC as trackerDataPathTypes, aD as trackerDataRecordSteps, aE as whereSchemaIssue } from './trackers-W7nRdRr7.js';
5
6
 
6
7
  /** Older releases did not record ownership. Preserve every value, including defaults. */
7
8
  declare function questConfiguration(release: PublishedRelease): {
@@ -26,40 +27,6 @@ declare function questConfiguration(release: PublishedRelease): {
26
27
  preserved: string[];
27
28
  };
28
29
 
29
- declare const identityIntegrationInputSchema: z.ZodObject<{
30
- name: z.ZodString;
31
- origin: z.ZodString;
32
- }, z.core.$strict>;
33
- declare const identityIntegrationSchema: z.ZodObject<{
34
- organization: z.ZodString;
35
- project: z.ZodString;
36
- environment: z.ZodEnum<{
37
- test: "test";
38
- live: "live";
39
- }>;
40
- id: z.ZodString;
41
- name: z.ZodString;
42
- origin: z.ZodString;
43
- expiresAt: z.ZodNumber;
44
- }, z.core.$strict>;
45
- declare const identityIntegrationSecretSchema: z.ZodObject<{
46
- organization: z.ZodString;
47
- project: z.ZodString;
48
- environment: z.ZodEnum<{
49
- test: "test";
50
- live: "live";
51
- }>;
52
- id: z.ZodString;
53
- name: z.ZodString;
54
- origin: z.ZodString;
55
- expiresAt: z.ZodNumber;
56
- token: z.ZodString;
57
- }, z.core.$strict>;
58
- declare const participantExchangeSchema: z.ZodObject<{
59
- subject: z.ZodString;
60
- previousToken: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strict>;
62
-
63
30
  /** Every declared field is present with its declared type or null; nothing else is returned. */
64
31
  declare function parseImageExtraction(raw: ImageFields, value: unknown): {
65
32
  values: Record<string, string | number | boolean | null>;
@@ -91,6 +58,8 @@ declare function parseImageResult(request: ImageRequest, value: unknown): {
91
58
 
92
59
  /** Content and engagement reads and the content enrollment and claim writes. */
93
60
  declare function isContentParticipantRoute(path: string, method: string): boolean;
61
+ /** The member's own point balances and the history of one ledger (`me.balances`, `me.pointHistory`). */
62
+ declare function isPointsParticipantRoute(path: string, method: string): boolean;
94
63
  /**
95
64
  * The profile routes, with their methods: the member's own profile, and the reads keyed by a
96
65
  * public profile ID.
@@ -118,4 +87,4 @@ declare function isWalletSignInRoute(path: string): boolean;
118
87
  */
119
88
  declare const sequenceCursorSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
120
89
 
121
- export { identityIntegrationInputSchema, identityIntegrationSchema, identityIntegrationSecretSchema, isContentParticipantRoute, isLegacyWalletRoute, isProfileParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, parseImageExtraction, parseImageResult, participantExchangeSchema, questConfiguration, sequenceCursorSchema };
90
+ export { isContentParticipantRoute, isLegacyWalletRoute, isPointsParticipantRoute, isProfileParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, parseImageExtraction, parseImageResult, questConfiguration, sequenceCursorSchema };
package/dist/internal.js CHANGED
@@ -1,22 +1,24 @@
1
1
  import {
2
- imageComparisonSchema,
3
- imageExtractionSchema,
4
- imageFieldsSchema,
5
- imageInspectionSchema,
6
- imageSightingsSchema
7
- } from "./chunk-4LBUTHD6.js";
2
+ identityIntegrationInputSchema,
3
+ identityIntegrationSchema,
4
+ identityIntegrationSecretSchema,
5
+ parseImageExtraction,
6
+ parseImageResult,
7
+ participantExchangeSchema,
8
+ questConfiguration,
9
+ sequenceCursorSchema
10
+ } from "./chunk-MNQI35OG.js";
11
+ import "./chunk-II7DRZSL.js";
8
12
  import {
9
13
  isContentParticipantRoute,
10
14
  isLegacyWalletRoute,
15
+ isPointsParticipantRoute,
11
16
  isProfileParticipantRoute,
12
17
  isWalletParticipantRoute,
13
18
  isWalletSignInRoute
14
- } from "./chunk-ZWY3R6B3.js";
15
- import {
16
- authScopeSchema
17
- } from "./chunk-7Q4BGGT6.js";
19
+ } from "./chunk-6A2V4L3T.js";
20
+ import "./chunk-FXYJ4OMX.js";
18
21
  import {
19
- photoResultSchema,
20
22
  schemaCheckedReader,
21
23
  trackerDataBatchSteps,
22
24
  trackerDataIssue,
@@ -24,89 +26,14 @@ import {
24
26
  trackerDataPathTypes,
25
27
  trackerDataRecordSteps,
26
28
  whereSchemaIssue
27
- } from "./chunk-YYD4QUBO.js";
28
-
29
- // src/configuration.ts
30
- function questConfiguration(release) {
31
- return release.configuration ?? {
32
- defaults: Object.fromEntries(
33
- Object.entries(release.fields).map(([key, field]) => [
34
- key,
35
- field.default
36
- ])
37
- ),
38
- overrides: { ...release.values },
39
- preserved: Object.keys(release.values)
40
- };
41
- }
42
-
43
- // src/identity-integration.ts
44
- import { z } from "zod";
45
- var identityIntegrationInputSchema = z.object({
46
- name: z.string().trim().min(1).max(80),
47
- origin: z.string().url().refine((value) => {
48
- const url = new URL(value);
49
- return url.protocol === "https:" && url.origin === value;
50
- }, "Use an exact HTTPS application origin")
51
- }).strict();
52
- var identityIntegrationSchema = authScopeSchema.extend({
53
- id: z.string().uuid(),
54
- name: z.string(),
55
- origin: z.string(),
56
- expiresAt: z.number()
57
- });
58
- var identityIntegrationSecretSchema = identityIntegrationSchema.extend(
59
- {
60
- token: z.string()
61
- }
62
- );
63
- var participantExchangeSchema = z.object({
64
- subject: z.string().min(1).max(200),
65
- previousToken: z.string().max(200).optional()
66
- }).strict();
67
-
68
- // src/image-results.ts
69
- function parseImageExtraction(raw, value) {
70
- const result = imageExtractionSchema.parse(value);
71
- const fields = imageFieldsSchema.parse(raw);
72
- for (const [key, field] of Object.entries(fields)) {
73
- const extracted = result.values[key];
74
- if (extracted === void 0) {
75
- throw new Error("Image extraction omitted " + key);
76
- }
77
- if (extracted !== null && typeof extracted !== field.type) {
78
- throw new Error("Image extraction returned the wrong type for " + key);
79
- }
80
- }
81
- if (Object.keys(result.values).some((key) => !Object.hasOwn(fields, key))) {
82
- throw new Error("Image extraction returned an undeclared field");
83
- }
84
- return result;
85
- }
86
- function parseImageResult(request, value) {
87
- switch (request.operation) {
88
- case "inspect":
89
- return imageInspectionSchema.parse(value);
90
- case "compare":
91
- return imageComparisonSchema.parse(value);
92
- case "review":
93
- return photoResultSchema.parse(value);
94
- case "extract":
95
- return parseImageExtraction(request.fields, value);
96
- case "seen":
97
- return imageSightingsSchema.parse(value);
98
- }
99
- }
100
-
101
- // src/sequence-cursor.ts
102
- import { z as z2 } from "zod";
103
- var sequenceCursorSchema = z2.string().regex(/^[1-9][0-9]{0,15}$/, "Invalid cursor").transform(Number).pipe(z2.number().int().positive().safe());
29
+ } from "./chunk-CRNQP7NV.js";
104
30
  export {
105
31
  identityIntegrationInputSchema,
106
32
  identityIntegrationSchema,
107
33
  identityIntegrationSecretSchema,
108
34
  isContentParticipantRoute,
109
35
  isLegacyWalletRoute,
36
+ isPointsParticipantRoute,
110
37
  isProfileParticipantRoute,
111
38
  isWalletParticipantRoute,
112
39
  isWalletSignInRoute,