@domino-sdk/relay 1.0.0-next.9 → 1.0.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.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-DeKJsRry.d.ts +9112 -0
  3. package/dist/authoring.d.ts +1027 -233
  4. package/dist/authoring.js +478 -277
  5. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser-DFe7sWSN.d.ts +4154 -0
  8. package/dist/browser.d.ts +11 -2613
  9. package/dist/browser.js +8 -6
  10. package/dist/{integrations-Ba5TtqTv.d.ts → capability-error-DNMwKmlL.d.ts} +124 -76
  11. package/dist/{chunk-PHU5VDLR.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-4LBUTHD6.js → chunk-BGGKNIRP.js} +1 -1
  14. package/dist/chunk-EYH5RDIE.js +496 -0
  15. package/dist/chunk-GQKYAQM6.js +84 -0
  16. package/dist/chunk-GUP7YRR4.js +42 -0
  17. package/dist/{chunk-X2F2RAR3.js → chunk-GZ6FJAXN.js} +380 -128
  18. package/dist/chunk-JON5SESL.js +2986 -0
  19. package/dist/chunk-MC6V6VMG.js +49 -0
  20. package/dist/chunk-NPGENI7K.js +37 -0
  21. package/dist/chunk-VFHHLN6A.js +284 -0
  22. package/dist/chunk-WJSSJ7AF.js +151 -0
  23. package/dist/{chunk-7Q4BGGT6.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-P6FK43GG.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CT4-S5vc.d.ts → client-XiuFnug_.d.ts} +2161 -615
  26. package/dist/{submission-input-0OOGaq8c.d.ts → groups-Ck-OxzjD.d.ts} +916 -1139
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/images-Dv-P5VBw.d.ts +234 -0
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -44
  32. package/dist/internal.js +43 -89
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-D3titw5B.d.ts → outcomes-kVB-Juzs.d.ts} +2157 -1448
  35. package/dist/pages-BBYD21IE.d.ts +359 -0
  36. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  37. package/dist/portal-proxy.js +22 -4
  38. package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
  39. package/dist/react/index.d.ts +3038 -1029
  40. package/dist/react/index.js +1627 -779
  41. package/dist/request-error-DWduJCGV.d.ts +62 -0
  42. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  43. package/dist/schema.d.ts +15 -4168
  44. package/dist/schema.js +310 -81
  45. package/dist/server/index.d.ts +81498 -0
  46. package/dist/server/index.js +2520 -0
  47. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  48. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  49. package/dist/vite.d.ts +1 -1
  50. package/dist/vite.js +1 -0
  51. package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
  52. package/package.json +8 -2
  53. package/dist/chunk-QR7ZA2BJ.js +0 -257
  54. package/dist/chunk-YYD4QUBO.js +0 -2348
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/images-BTgk6OmC.d.ts +0 -1564
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-Di3aLSiK.d.ts +0 -3532
@@ -0,0 +1,58 @@
1
+ import { O as OpenIdentityKind } from './schema-DfJzH2ci.js';
2
+ import { z } from 'zod';
3
+
4
+ declare const identityIntegrationInputSchema: z.ZodObject<{
5
+ name: z.ZodString;
6
+ origin: z.ZodString;
7
+ identityKind: z.ZodOptional<z.ZodTemplateLiteral<`app:${string}`>>;
8
+ adoptIdentitiesFrom: z.ZodOptional<z.ZodString>;
9
+ reason: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strict>;
11
+ /** An integration as responses return it: fields a newer Relay adds are ignored. */
12
+ declare const identityIntegrationSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ name: z.ZodString;
15
+ origin: z.ZodString;
16
+ expiresAt: z.ZodNumber;
17
+ identityKind: z.ZodDefault<z.ZodNullable<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
18
+ organization: z.ZodString;
19
+ project: z.ZodString;
20
+ environment: z.ZodEnum<{
21
+ test: "test";
22
+ live: "live";
23
+ }>;
24
+ }, z.core.$strip>;
25
+ declare const identityIntegrationSecretSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ name: z.ZodString;
28
+ origin: z.ZodString;
29
+ expiresAt: z.ZodNumber;
30
+ identityKind: z.ZodDefault<z.ZodNullable<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
31
+ organization: z.ZodString;
32
+ project: z.ZodString;
33
+ environment: z.ZodEnum<{
34
+ test: "test";
35
+ live: "live";
36
+ }>;
37
+ token: z.ZodString;
38
+ }, z.core.$strip>;
39
+ /**
40
+ * An `app:<name>` kind claimed in the project and environment, and the integration that owns its
41
+ * identities: the live one, or the disconnected one a new integration would adopt them from.
42
+ */
43
+ declare const identityKindClaimSchema: z.ZodObject<{
44
+ kind: z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>;
45
+ integration: z.ZodString;
46
+ integrationName: z.ZodString;
47
+ connected: z.ZodBoolean;
48
+ linked: z.ZodNumber;
49
+ unlinked: z.ZodNumber;
50
+ claimedAt: z.ZodNumber;
51
+ }, z.core.$strip>;
52
+ type IdentityKindClaim = z.infer<typeof identityKindClaimSchema>;
53
+ declare const participantExchangeSchema: z.ZodObject<{
54
+ subject: z.ZodString;
55
+ previousToken: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strict>;
57
+
58
+ export { type IdentityKindClaim as I, identityIntegrationSchema as a, identityIntegrationSecretSchema as b, identityKindClaimSchema as c, identityIntegrationInputSchema as i, participantExchangeSchema as p };
@@ -0,0 +1,234 @@
1
+ import { z } from 'zod';
2
+ import { P as PhotoResult } from './schema-DfJzH2ci.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 Extracted as E, 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,15 @@
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-XiuFnug_.js';
2
+ export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-DWduJCGV.js';
3
+ export { A as Attempt, a as AttemptStatus, E as Entitlement, b as EvaluatorProgress, K as KnownAttemptStatus, c as KnownTrackerSkipCode, M as MemberProgress, Q as QuestBudgetView, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, R as Reward, S as SubmissionEvidence, g as SubmitInput, T as TieredRewardReference, h as TrackerSkipCode } from './schema-DfJzH2ci.js';
2
4
  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';
5
- 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';
5
+ export { A as AccountConnection, a as AuthProvider, M as MissingPrerequisite, P as Prerequisite, T as TextEvidence, b as TextOptions, U as UrlEvidence, c as UrlOptions, V as ValueEvidence } from './submission-input-BZkm6ohU.js';
6
+ export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantActivity, c as ParticipantPrincipal, d as ParticipantSession, R as RelayEvent, S as Session, s as sessionMember } from './pages-BBYD21IE.js';
7
+ export { Q as QuestClaimInput, a as QuestEnrollment, b as QuestEnrollmentInput, c as QuestInteraction, d as QuestOutcome, e as QuestOutcomePage, f as QuestOutcomeQuery, g as QuestOutcomeState, h as QuestRewardView, i as QuestView } from './outcomes-kVB-Juzs.js';
8
+ export { A as AvailabilityWindow, C as CampaignDefinition, a as CampaignEnrollment, b as CampaignEnrollmentInput, c as CampaignView, d as CampaignWithdrawalInput, K as KnownPointEntryKind, L as LeaderboardDefinition, e as LeaderboardPage, f as LeaderboardPlacement, g as LeaderboardQuery, M as MemberCampaignEnrollmentInput, h as MemberCampaignWithdrawalInput, P as PointBalance, i as PointBalances, j as PointEntry, k as PointEntryKind, l as PointHistoryPage, m as PointHistoryQuery, n as PointLedgerReference, o as ProjectGroup, p as ProjectGroupReference, R as ReferralDefinition } from './groups-Ck-OxzjD.js';
9
+ export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-B1xrETxm.js';
10
+ export { O as Offer, a as OfferDefinition, b as OfferPrice, R as RedeemOfferInput, c as Redemption } from './offers-Cy-e4o5x.js';
11
+ 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-D2aFcOxu.js';
12
+ export { Q as QuizContent, S as StreakProgress } from './streaks-CWyq8Px5.js';
13
+ 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-YssWxGg8.js';
14
+ export { P as ParticipantDelivery } from './participant-rewards-3duLb8YJ.js';
11
15
  import 'zod';
package/dist/index.js CHANGED
@@ -5,20 +5,31 @@ import {
5
5
  import {
6
6
  QuestUpdatedError,
7
7
  createRelayClient
8
- } from "./chunk-X2F2RAR3.js";
9
- import "./chunk-QR7ZA2BJ.js";
8
+ } from "./chunk-GZ6FJAXN.js";
10
9
  import {
10
+ QuestOutcomeState
11
+ } from "./chunk-EYH5RDIE.js";
12
+ import {
13
+ PointEntryKind,
11
14
  RelayError,
12
15
  RelayErrorCode,
16
+ isRelayError
17
+ } from "./chunk-36HTX2BM.js";
18
+ import "./chunk-6QJ3LADK.js";
19
+ import {
13
20
  RequestError,
14
- isRelayError,
15
21
  isRequestError
16
- } from "./chunk-PHU5VDLR.js";
22
+ } from "./chunk-NPGENI7K.js";
17
23
  import {
18
24
  sessionMember
19
- } from "./chunk-7Q4BGGT6.js";
20
- import "./chunk-YYD4QUBO.js";
25
+ } from "./chunk-XFMSUPNS.js";
26
+ import {
27
+ AttemptStatus
28
+ } from "./chunk-JON5SESL.js";
21
29
  export {
30
+ AttemptStatus,
31
+ PointEntryKind,
32
+ QuestOutcomeState,
22
33
  QuestUpdatedError,
23
34
  RelayError,
24
35
  RelayErrorCode,
@@ -1,7 +1,10 @@
1
- import { j as PublishedRelease } from './schema-Di3aLSiK.js';
1
+ import { u as PublishedRelease, ad as TrackerSource, a1 as TrackerDataSchema, af as TrackerSourceResponse, w as QuestDescription } from './schema-DfJzH2ci.js';
2
+ export { cM as TrackerDataBudget, cN as schemaCheckedReader, cO as trackerDataBatchSteps, cP as trackerDataIssue, cQ as trackerDataIssues, cR as trackerDataPathTypes, cS as trackerDataRecordSteps, cT as whereSchemaIssue } from './schema-DfJzH2ci.js';
3
+ export { I as IdentityKindClaim, i as identityIntegrationInputSchema, a as identityIntegrationSchema, b as identityIntegrationSecretSchema, c as identityKindClaimSchema, p as participantExchangeSchema } from './identity-integration-GxAHdKR2.js';
4
+ import { c as ImageFields, g as ImageRequest } from './images-Dv-P5VBw.js';
5
+ export { E as Extracted } from './images-Dv-P5VBw.js';
6
+ import { b as RequestErrorKind } from './request-error-DWduJCGV.js';
2
7
  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
8
 
6
9
  /** Older releases did not record ownership. Preserve every value, including defaults. */
7
10
  declare function questConfiguration(release: PublishedRelease): {
@@ -26,40 +29,6 @@ declare function questConfiguration(release: PublishedRelease): {
26
29
  preserved: string[];
27
30
  };
28
31
 
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
32
  /** Every declared field is present with its declared type or null; nothing else is returned. */
64
33
  declare function parseImageExtraction(raw: ImageFields, value: unknown): {
65
34
  values: Record<string, string | number | boolean | null>;
@@ -89,8 +58,19 @@ declare function parseImageResult(request: ImageRequest, value: unknown): {
89
58
  firstSeenAt: number | null;
90
59
  };
91
60
 
92
- /** Content and engagement reads and the content enrollment and claim writes. */
61
+ /** Cursor polling of a participant's own committed activity. */
62
+ declare function isActivityParticipantRoute(path: string, method: string): boolean;
63
+ /** The signed-in participant's earned rewards and delivery states. */
64
+ declare function isRewardsParticipantRoute(path: string, method: string): boolean;
65
+ /** Content stage and engagement reads. */
93
66
  declare function isContentParticipantRoute(path: string, method: string): boolean;
67
+ /**
68
+ * The member's automatic-quest outcomes, campaign and quest enrollment, and historical claims.
69
+ */
70
+ declare function isQuestOutcomeParticipantRoute(path: string, method: string): boolean;
71
+ /** The member's own point balances and the history of one ledger (`me.balances`, `me.pointHistory`). */
72
+ declare function isPointsParticipantRoute(path: string, method: string): boolean;
73
+ declare function isOfferParticipantRoute(path: string, method: string): boolean;
94
74
  /**
95
75
  * The profile routes, with their methods: the member's own profile, and the reads keyed by a
96
76
  * public profile ID.
@@ -101,21 +81,79 @@ declare function isProfileParticipantRoute(path: string, method: string): boolea
101
81
  * another method on a wallet path with 405.
102
82
  */
103
83
  declare function isWalletParticipantRoute(path: string): boolean;
104
- /**
105
- * The single-wallet routes only 0.x clients call (`wallet.*`). The API still admits them for
106
- * those apps' proxies; v1 proxies do not forward them.
107
- */
108
- declare function isLegacyWalletRoute(path: string): boolean;
109
84
  /**
110
85
  * Wallet sign-in (`/v1/auth/wallet/start` and `/verify`). Hosted proxies admit it; identity
111
86
  * integrations do not, because their apps have their own login.
112
87
  */
113
88
  declare function isWalletSignInRoute(path: string): boolean;
114
89
 
90
+ /** The management client's and the CLI's default deadline per call. */
91
+ declare const MANAGEMENT_TIMEOUT = 30000;
92
+ /** One call's deadline and the caller's signal, shared by every attempt and the body read. */
93
+ type Lifetime = {
94
+ /** Aborts when the caller cancels or the deadline passes; pass it to `fetch`. */
95
+ readonly signal: AbortSignal;
96
+ readonly timeout: number;
97
+ /** Why the call ended early, if it did: the caller's signal wins over the deadline. */
98
+ ended(): "aborted" | "timeout" | undefined;
99
+ /** Milliseconds left before the deadline. */
100
+ remaining(): number;
101
+ /** The caller's abort reason, or the deadline's. */
102
+ reason(): unknown;
103
+ /** Stops the deadline once the call has everything it needs. */
104
+ end(): void;
105
+ };
106
+ declare function lifetime(timeout: number, caller?: AbortSignal): Lifetime;
107
+ /**
108
+ * The wait a `Retry-After` header asks for, in milliseconds: delay-seconds or an HTTP date.
109
+ * Undefined when the header is absent or unreadable.
110
+ */
111
+ declare function retryAfter(headers: Pick<Headers, "get">, now?: number): number | undefined;
112
+ /** What a failed attempt tells the retry loop. */
113
+ type AttemptFailure = {
114
+ kind: RequestErrorKind;
115
+ status?: number;
116
+ /** The attempt was a write that may have been applied. */
117
+ uncertain: boolean;
118
+ /** The server's `Retry-After`, in milliseconds. */
119
+ retryAfter?: number;
120
+ };
121
+ type Rules = {
122
+ /** The call is a read, or a write its route applies at most once (`retryDelay`). */
123
+ replaySafe: boolean;
124
+ /** Reads a failed attempt; undefined for an error that is not a request failure. */
125
+ describe?: (error: unknown) => AttemptFailure | undefined;
126
+ /** The error to throw when an earlier attempt may have applied the write. */
127
+ uncertain?: (error: unknown) => unknown;
128
+ };
129
+ /**
130
+ * Runs `attempt` until it succeeds or `retryDelay` says stop. A caller abort during a wait goes
131
+ * straight to the next attempt, which refuses to send and fails as `aborted`.
132
+ */
133
+ declare function retrying<T>(life: Lifetime, rules: Rules, attempt: () => Promise<T>): Promise<T>;
134
+
115
135
  /**
116
136
  * How Relay reads back a cursor it issued over a numeric position. Clients treat cursors as
117
137
  * opaque strings (`pageCursorSchema`); only the server parses them, so the format can change.
118
138
  */
119
139
  declare const sequenceCursorSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
120
140
 
121
- export { identityIntegrationInputSchema, identityIntegrationSchema, identityIntegrationSecretSchema, isContentParticipantRoute, isLegacyWalletRoute, isProfileParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, parseImageExtraction, parseImageResult, participantExchangeSchema, questConfiguration, sequenceCursorSchema };
141
+ /** The account roles a source's records can name: `author` and any others the source declares. */
142
+ declare function sourceRoles(source: TrackerSourceResponse): readonly string[];
143
+ /**
144
+ * The schema a source's record `data` matches: a custom source's declared schema, a Discord
145
+ * source's fixed one, or undefined for X (provider payloads) and untyped custom trackers.
146
+ */
147
+ declare function sourceDataSchema(source: TrackerSource): TrackerDataSchema | undefined;
148
+
149
+ /** Rules independent of published resources, permissions and another release. */
150
+ type QuestShape = Pick<QuestDescription, "trigger" | "performance"> & {
151
+ completion: Pick<QuestDescription["completion"], "kind">;
152
+ requires: readonly unknown[];
153
+ };
154
+ /** The same trigger/completion matrix for authoring, publication and graph validation. */
155
+ declare function validateQuestShape(description: QuestShape, options?: {
156
+ template?: boolean;
157
+ }): void;
158
+
159
+ export { type AttemptFailure, type Lifetime, MANAGEMENT_TIMEOUT, isActivityParticipantRoute, isContentParticipantRoute, isOfferParticipantRoute, isPointsParticipantRoute, isProfileParticipantRoute, isQuestOutcomeParticipantRoute, isRewardsParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, lifetime, parseImageExtraction, parseImageResult, questConfiguration, retryAfter, retrying, sequenceCursorSchema, sourceDataSchema, sourceRoles, validateQuestShape };