@domino-sdk/relay 0.28.0 → 0.29.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/authoring.d.ts +11 -3
- package/dist/authoring.js +5 -3
- package/dist/browser.d.ts +205 -189
- package/dist/browser.js +6 -6
- package/dist/{chunk-ZP43MHO3.js → chunk-5LLU7UUV.js} +42 -10
- package/dist/{chunk-IXLY3A7B.js → chunk-BE5V6RFD.js} +8 -0
- package/dist/{chunk-AL5GXMKI.js → chunk-LAKQCIHX.js} +1 -1
- package/dist/{chunk-D6BX627V.js → chunk-MRKFRCCI.js} +43 -50
- package/dist/{chunk-NHSA6ATH.js → chunk-MVCKCDNR.js} +2 -2
- package/dist/{chunk-AKB266O5.js → chunk-YKS6P4IP.js} +13 -2
- package/dist/index.d.ts +557 -494
- package/dist/index.js +20 -8
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +201 -38
- package/dist/react/index.js +139 -18
- package/dist/schema.d.ts +27 -1
- package/dist/schema.js +3 -1
- package/dist/{submission-input-D3t8WKOk.d.ts → submission-input-C0cOmO4Q.d.ts} +15 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
xPostSchema,
|
|
73
73
|
xProfileSchema,
|
|
74
74
|
xRequestSchema
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-5LLU7UUV.js";
|
|
76
76
|
import {
|
|
77
77
|
defineEngagementReward,
|
|
78
78
|
defineLeaderboard,
|
|
@@ -100,6 +100,7 @@ import {
|
|
|
100
100
|
leaderboardExclusionSchema,
|
|
101
101
|
leaderboardGroupSchema,
|
|
102
102
|
leaderboardPageSchema,
|
|
103
|
+
leaderboardPlacementSchema,
|
|
103
104
|
leaderboardPreviewSchema,
|
|
104
105
|
leaderboardQuerySchema,
|
|
105
106
|
leaderboardRowSchema,
|
|
@@ -121,7 +122,7 @@ import {
|
|
|
121
122
|
referralManagementSchema,
|
|
122
123
|
referralRelationshipSchema,
|
|
123
124
|
referralSummarySchema
|
|
124
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-YKS6P4IP.js";
|
|
125
126
|
import {
|
|
126
127
|
WALLETS_PER_CHAIN,
|
|
127
128
|
authScopeSchema,
|
|
@@ -156,7 +157,7 @@ import {
|
|
|
156
157
|
walletSignInNetworksSchema,
|
|
157
158
|
walletSignatureSchema,
|
|
158
159
|
walletUnlinkInputSchema
|
|
159
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-LAKQCIHX.js";
|
|
160
161
|
import {
|
|
161
162
|
AVATAR_UPLOAD_LIMIT,
|
|
162
163
|
avatarProviderSchema,
|
|
@@ -167,15 +168,19 @@ import {
|
|
|
167
168
|
managedProfileSchema,
|
|
168
169
|
ownProfileSchema,
|
|
169
170
|
profileAvatarSchema,
|
|
171
|
+
profileCompletionPageSchema,
|
|
172
|
+
profileCompletionQuerySchema,
|
|
173
|
+
profileCompletionSchema,
|
|
174
|
+
profileDefaultProviderSchema,
|
|
170
175
|
profileDefaultsSchema,
|
|
171
176
|
profileModerationSchema,
|
|
177
|
+
profileReferralSchema,
|
|
172
178
|
profileSettingsInputSchema,
|
|
173
179
|
profileSettingsSchema,
|
|
174
180
|
profileSummarySchema,
|
|
175
181
|
profileUpdateSchema,
|
|
176
|
-
profileVisibilitySchema
|
|
177
|
-
|
|
178
|
-
} from "./chunk-D6BX627V.js";
|
|
182
|
+
profileVisibilitySchema
|
|
183
|
+
} from "./chunk-MRKFRCCI.js";
|
|
179
184
|
import {
|
|
180
185
|
accountConnectionSchema,
|
|
181
186
|
admittedContentSchema,
|
|
@@ -255,6 +260,7 @@ import {
|
|
|
255
260
|
questAvailabilitySchema,
|
|
256
261
|
questDescriptionSchema,
|
|
257
262
|
questPresentationSchema,
|
|
263
|
+
questProfileSchema,
|
|
258
264
|
questSettingsInputSchema,
|
|
259
265
|
quizAnswersSchema,
|
|
260
266
|
quizChoiceSchema,
|
|
@@ -333,7 +339,7 @@ import {
|
|
|
333
339
|
xContentBodySchema,
|
|
334
340
|
xPostId,
|
|
335
341
|
xTweetSchema
|
|
336
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-BE5V6RFD.js";
|
|
337
343
|
export {
|
|
338
344
|
AVATAR_UPLOAD_LIMIT,
|
|
339
345
|
QuestUpdatedError,
|
|
@@ -468,6 +474,7 @@ export {
|
|
|
468
474
|
leaderboardExclusionSchema,
|
|
469
475
|
leaderboardGroupSchema,
|
|
470
476
|
leaderboardPageSchema,
|
|
477
|
+
leaderboardPlacementSchema,
|
|
471
478
|
leaderboardPreviewSchema,
|
|
472
479
|
leaderboardQuerySchema,
|
|
473
480
|
leaderboardRowSchema,
|
|
@@ -510,8 +517,13 @@ export {
|
|
|
510
517
|
prerequisiteSchema,
|
|
511
518
|
principalSchema,
|
|
512
519
|
profileAvatarSchema,
|
|
520
|
+
profileCompletionPageSchema,
|
|
521
|
+
profileCompletionQuerySchema,
|
|
522
|
+
profileCompletionSchema,
|
|
523
|
+
profileDefaultProviderSchema,
|
|
513
524
|
profileDefaultsSchema,
|
|
514
525
|
profileModerationSchema,
|
|
526
|
+
profileReferralSchema,
|
|
515
527
|
profileSettingsInputSchema,
|
|
516
528
|
profileSettingsSchema,
|
|
517
529
|
profileSummarySchema,
|
|
@@ -520,7 +532,6 @@ export {
|
|
|
520
532
|
projectCatalogArtifactSchema,
|
|
521
533
|
projectDeploymentSchema,
|
|
522
534
|
projectIntegrationSchema,
|
|
523
|
-
publicProfileSchema,
|
|
524
535
|
publishDeploymentSchema,
|
|
525
536
|
publishQuestDraftSchema,
|
|
526
537
|
publishedImageSchema,
|
|
@@ -540,6 +551,7 @@ export {
|
|
|
540
551
|
questInstanceSchema,
|
|
541
552
|
questInteraction,
|
|
542
553
|
questPresentationSchema,
|
|
554
|
+
questProfileSchema,
|
|
543
555
|
questPublicationPreviewSchema,
|
|
544
556
|
questRewardViewSchema,
|
|
545
557
|
questSettingsInputSchema,
|
package/dist/portal-proxy.js
CHANGED
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
exchangeResultSchema,
|
|
3
3
|
isWalletParticipantRoute,
|
|
4
4
|
isWalletSignInRoute
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LAKQCIHX.js";
|
|
6
6
|
import {
|
|
7
7
|
isProfileParticipantRoute
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MRKFRCCI.js";
|
|
9
9
|
import {
|
|
10
10
|
isContentParticipantRoute
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BE5V6RFD.js";
|
|
12
12
|
|
|
13
13
|
// src/portal-proxy.ts
|
|
14
14
|
async function proxyParticipant(request, upstream) {
|
package/dist/react/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { ProfileUpdate, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission, SubmissionDraft,
|
|
5
|
+
import { ProfileUpdate, ProfileCompletionQuery, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission, SubmissionDraft, ProfileCompletion, ProfileSummary, PointLedgerReference } from '../index.js';
|
|
6
6
|
export { avatarSrc, defaultAvatar, walletAvatarSeed } from '../index.js';
|
|
7
|
-
import { H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, L as LinkedWallet, N as WalletSigner, P as walletChallengeInputSchema, Q as walletProofSchema, R as AuthProvider, V as WalletSignature, Y as engagementPageQuerySchema, Z as contentQualificationQuerySchema, _ as contentAdmissionQuerySchema, $ as contentEnrollmentInputSchema, a0 as contentReleaseInputSchema, a1 as AccountConnection, a2 as WalletSignInNetwork, a3 as referralSummarySchema, a4 as LeaderboardPage } from '../submission-input-
|
|
7
|
+
import { H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, L as LinkedWallet, N as WalletSigner, P as walletChallengeInputSchema, Q as walletProofSchema, R as AuthProvider, V as WalletSignature, Y as engagementPageQuerySchema, Z as contentQualificationQuerySchema, _ as contentAdmissionQuerySchema, $ as contentEnrollmentInputSchema, a0 as contentReleaseInputSchema, a1 as AccountConnection, a2 as WalletSignInNetwork, a3 as referralSummarySchema, a4 as LeaderboardPage } from '../submission-input-C0cOmO4Q.js';
|
|
8
8
|
import { SubmitInput, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema, TieredRewardReference } from '../schema.js';
|
|
9
9
|
import { createBrowserRelayClient, SignInMethods, CosmosChains, SignInOption, SignInUnavailable, SignInWallet, DiscoveredWallet } from '../browser.js';
|
|
10
10
|
export { EmailSignInOption, OAuthSignInOption, SignInIcon, WalletSignInOption } from '../browser.js';
|
|
@@ -385,6 +385,15 @@ declare function useRelay(): {
|
|
|
385
385
|
}[];
|
|
386
386
|
nextCursor: string | null;
|
|
387
387
|
}>;
|
|
388
|
+
placement: (board: string, profile: string) => Promise<{
|
|
389
|
+
leaderboard: string;
|
|
390
|
+
title: string;
|
|
391
|
+
profile: string;
|
|
392
|
+
rank: number | null;
|
|
393
|
+
score: number | null;
|
|
394
|
+
total: number;
|
|
395
|
+
key?: string | undefined;
|
|
396
|
+
}>;
|
|
388
397
|
};
|
|
389
398
|
profiles: {
|
|
390
399
|
mine: () => Promise<{
|
|
@@ -404,7 +413,7 @@ declare function useRelay(): {
|
|
|
404
413
|
seed: string;
|
|
405
414
|
};
|
|
406
415
|
displayName: string | null;
|
|
407
|
-
avatarChoice: "default" | "account" | "
|
|
416
|
+
avatarChoice: "default" | "account" | "upload" | "generated";
|
|
408
417
|
avatarProvider: "x" | "discord" | "google" | null;
|
|
409
418
|
hidden: boolean;
|
|
410
419
|
locked: boolean;
|
|
@@ -434,7 +443,7 @@ declare function useRelay(): {
|
|
|
434
443
|
seed: string;
|
|
435
444
|
};
|
|
436
445
|
displayName: string | null;
|
|
437
|
-
avatarChoice: "default" | "account" | "
|
|
446
|
+
avatarChoice: "default" | "account" | "upload" | "generated";
|
|
438
447
|
avatarProvider: "x" | "discord" | "google" | null;
|
|
439
448
|
hidden: boolean;
|
|
440
449
|
locked: boolean;
|
|
@@ -465,7 +474,7 @@ declare function useRelay(): {
|
|
|
465
474
|
seed: string;
|
|
466
475
|
};
|
|
467
476
|
displayName: string | null;
|
|
468
|
-
avatarChoice: "default" | "account" | "
|
|
477
|
+
avatarChoice: "default" | "account" | "upload" | "generated";
|
|
469
478
|
avatarProvider: "x" | "discord" | "google" | null;
|
|
470
479
|
hidden: boolean;
|
|
471
480
|
locked: boolean;
|
|
@@ -492,36 +501,28 @@ declare function useRelay(): {
|
|
|
492
501
|
source: "generated";
|
|
493
502
|
seed: string;
|
|
494
503
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
title: string;
|
|
499
|
-
rank: number;
|
|
500
|
-
score: number;
|
|
501
|
-
total: number;
|
|
502
|
-
key?: string | undefined;
|
|
503
|
-
}[] | null;
|
|
504
|
-
quests: {
|
|
504
|
+
}>;
|
|
505
|
+
completions: (profile: string, options?: ProfileCompletionQuery) => Promise<{
|
|
506
|
+
items: {
|
|
505
507
|
quest: string;
|
|
506
508
|
title: string;
|
|
507
509
|
completions: number;
|
|
508
510
|
lastCompletedAt: number | null;
|
|
509
511
|
key?: string | undefined;
|
|
510
|
-
}[]
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
} | null;
|
|
512
|
+
}[];
|
|
513
|
+
nextCursor: string | null;
|
|
514
|
+
}>;
|
|
515
|
+
referral: (profile: string, program: string) => Promise<{
|
|
516
|
+
program: string;
|
|
517
|
+
title: string;
|
|
518
|
+
invited: number;
|
|
519
|
+
qualified: number;
|
|
520
|
+
milestones: {
|
|
521
|
+
id: string;
|
|
522
|
+
count: number;
|
|
523
|
+
reached: boolean;
|
|
524
|
+
}[];
|
|
525
|
+
key?: string | undefined;
|
|
525
526
|
}>;
|
|
526
527
|
};
|
|
527
528
|
quests: {
|
|
@@ -2337,6 +2338,9 @@ declare function useRelay(): {
|
|
|
2337
2338
|
metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
|
|
2338
2339
|
maxAgeMs: number;
|
|
2339
2340
|
} | undefined;
|
|
2341
|
+
profile?: {
|
|
2342
|
+
visible: boolean;
|
|
2343
|
+
} | undefined;
|
|
2340
2344
|
};
|
|
2341
2345
|
}[]>;
|
|
2342
2346
|
template: () => Promise<{
|
|
@@ -2540,6 +2544,9 @@ declare function useRelay(): {
|
|
|
2540
2544
|
metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
|
|
2541
2545
|
maxAgeMs: number;
|
|
2542
2546
|
} | undefined;
|
|
2547
|
+
profile?: {
|
|
2548
|
+
visible: boolean;
|
|
2549
|
+
} | undefined;
|
|
2543
2550
|
};
|
|
2544
2551
|
}>;
|
|
2545
2552
|
snapshot: () => Promise<{
|
|
@@ -2748,6 +2755,9 @@ declare function useRelay(): {
|
|
|
2748
2755
|
metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
|
|
2749
2756
|
maxAgeMs: number;
|
|
2750
2757
|
} | undefined;
|
|
2758
|
+
profile?: {
|
|
2759
|
+
visible: boolean;
|
|
2760
|
+
} | undefined;
|
|
2751
2761
|
key?: string | undefined;
|
|
2752
2762
|
origin?: {
|
|
2753
2763
|
typeVersion: string;
|
|
@@ -3131,6 +3141,9 @@ declare function useRelay(): {
|
|
|
3131
3141
|
metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
|
|
3132
3142
|
maxAgeMs: number;
|
|
3133
3143
|
} | undefined;
|
|
3144
|
+
profile?: {
|
|
3145
|
+
visible: boolean;
|
|
3146
|
+
} | undefined;
|
|
3134
3147
|
key?: string | undefined;
|
|
3135
3148
|
origin?: {
|
|
3136
3149
|
typeVersion: string;
|
|
@@ -3362,6 +3375,9 @@ declare function useRelay(): {
|
|
|
3362
3375
|
metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
|
|
3363
3376
|
maxAgeMs: number;
|
|
3364
3377
|
} | undefined;
|
|
3378
|
+
profile?: {
|
|
3379
|
+
visible: boolean;
|
|
3380
|
+
} | undefined;
|
|
3365
3381
|
key?: string | undefined;
|
|
3366
3382
|
origin?: {
|
|
3367
3383
|
typeVersion: string;
|
|
@@ -4581,8 +4597,8 @@ type OAuthProvider = AuthProvider;
|
|
|
4581
4597
|
declare function useSignInMethods(): SignInMethods | null;
|
|
4582
4598
|
/**
|
|
4583
4599
|
* The signed-in member and the seed of their generated avatar, or null while signed out or
|
|
4584
|
-
* loading: `<img src={defaultAvatar(me.avatarSeed)} />`. The seed
|
|
4585
|
-
*
|
|
4600
|
+
* loading: `<img src={defaultAvatar(me.avatarSeed)} />`. The seed is derived from the member and
|
|
4601
|
+
* reveals nothing about them; linking wallets or accounts does not change it.
|
|
4586
4602
|
*/
|
|
4587
4603
|
declare function useMe(): {
|
|
4588
4604
|
member: string;
|
|
@@ -4744,7 +4760,7 @@ declare function useMyProfile(): {
|
|
|
4744
4760
|
seed: string;
|
|
4745
4761
|
};
|
|
4746
4762
|
displayName: string | null;
|
|
4747
|
-
avatarChoice: "default" | "account" | "
|
|
4763
|
+
avatarChoice: "default" | "account" | "upload" | "generated";
|
|
4748
4764
|
avatarProvider: "x" | "discord" | "google" | null;
|
|
4749
4765
|
hidden: boolean;
|
|
4750
4766
|
locked: boolean;
|
|
@@ -4763,6 +4779,22 @@ declare function useMyProfile(): {
|
|
|
4763
4779
|
/** Uploads a JPEG, PNG or WebP of at most 5 MB as the avatar; resolves true once saved. */
|
|
4764
4780
|
uploadAvatar: (file: Blob) => Promise<boolean>;
|
|
4765
4781
|
};
|
|
4782
|
+
/**
|
|
4783
|
+
* A read keyed by a profile. `missing` is the uniform 404: a profile (or board, or program) that
|
|
4784
|
+
* is missing, hidden by its member, or not visible to this viewer, on purpose indistinguishable.
|
|
4785
|
+
*/
|
|
4786
|
+
type ProfileReadState<T> = {
|
|
4787
|
+
status: "loading";
|
|
4788
|
+
} | {
|
|
4789
|
+
status: "error";
|
|
4790
|
+
message: string;
|
|
4791
|
+
} | {
|
|
4792
|
+
status: "missing";
|
|
4793
|
+
} | {
|
|
4794
|
+
status: "ready";
|
|
4795
|
+
value: T;
|
|
4796
|
+
stale: string | null;
|
|
4797
|
+
};
|
|
4766
4798
|
type ProfileState = {
|
|
4767
4799
|
status: "loading";
|
|
4768
4800
|
} | {
|
|
@@ -4774,12 +4806,13 @@ type ProfileState = {
|
|
|
4774
4806
|
status: "missing";
|
|
4775
4807
|
} | {
|
|
4776
4808
|
status: "ready";
|
|
4777
|
-
profile:
|
|
4809
|
+
profile: ProfileSummary;
|
|
4778
4810
|
stale: string | null;
|
|
4779
4811
|
};
|
|
4780
4812
|
/**
|
|
4781
|
-
* A profile
|
|
4782
|
-
* when the participant signs in
|
|
4813
|
+
* A profile's name and avatar by its public ID (`relay.profiles.get`), read again every
|
|
4814
|
+
* `intervalMs` (default 60 seconds) while the page is visible and when the participant signs in
|
|
4815
|
+
* or out.
|
|
4783
4816
|
*/
|
|
4784
4817
|
declare function useProfile(id: string, options?: {
|
|
4785
4818
|
intervalMs?: number;
|
|
@@ -4796,9 +4829,139 @@ declare function useProfile(id: string, options?: {
|
|
|
4796
4829
|
} | {
|
|
4797
4830
|
refresh: () => Promise<void>;
|
|
4798
4831
|
status: "ready";
|
|
4799
|
-
profile:
|
|
4832
|
+
profile: ProfileSummary;
|
|
4800
4833
|
stale: string | null;
|
|
4801
4834
|
};
|
|
4835
|
+
/**
|
|
4836
|
+
* A profile's current rank and score on one board (`relay.leaderboards.placement`), read again
|
|
4837
|
+
* every `intervalMs` (default 30 seconds) while the page is visible. Signed-out visitors get an
|
|
4838
|
+
* error for boards without public access.
|
|
4839
|
+
*/
|
|
4840
|
+
declare function useLeaderboardPlacement(board: string, profile: string, options?: {
|
|
4841
|
+
intervalMs?: number;
|
|
4842
|
+
}): {
|
|
4843
|
+
refresh: () => Promise<void>;
|
|
4844
|
+
status: "loading";
|
|
4845
|
+
} | {
|
|
4846
|
+
refresh: () => Promise<void>;
|
|
4847
|
+
status: "error";
|
|
4848
|
+
message: string;
|
|
4849
|
+
} | {
|
|
4850
|
+
refresh: () => Promise<void>;
|
|
4851
|
+
status: "missing";
|
|
4852
|
+
} | {
|
|
4853
|
+
refresh: () => Promise<void>;
|
|
4854
|
+
status: "ready";
|
|
4855
|
+
value: {
|
|
4856
|
+
leaderboard: string;
|
|
4857
|
+
title: string;
|
|
4858
|
+
profile: string;
|
|
4859
|
+
rank: number | null;
|
|
4860
|
+
score: number | null;
|
|
4861
|
+
total: number;
|
|
4862
|
+
key?: string | undefined;
|
|
4863
|
+
};
|
|
4864
|
+
stale: string | null;
|
|
4865
|
+
};
|
|
4866
|
+
/**
|
|
4867
|
+
* A profile's progress in one referral program (`relay.profiles.referral`), read again every
|
|
4868
|
+
* `intervalMs` (default 60 seconds) while the page is visible. Needs a signed-in participant.
|
|
4869
|
+
*/
|
|
4870
|
+
declare function useProfileReferral(profile: string, program: string, options?: {
|
|
4871
|
+
intervalMs?: number;
|
|
4872
|
+
}): {
|
|
4873
|
+
refresh: () => Promise<void>;
|
|
4874
|
+
status: "loading";
|
|
4875
|
+
} | {
|
|
4876
|
+
refresh: () => Promise<void>;
|
|
4877
|
+
status: "error";
|
|
4878
|
+
message: string;
|
|
4879
|
+
} | {
|
|
4880
|
+
refresh: () => Promise<void>;
|
|
4881
|
+
status: "missing";
|
|
4882
|
+
} | {
|
|
4883
|
+
refresh: () => Promise<void>;
|
|
4884
|
+
status: "ready";
|
|
4885
|
+
value: {
|
|
4886
|
+
program: string;
|
|
4887
|
+
title: string;
|
|
4888
|
+
invited: number;
|
|
4889
|
+
qualified: number;
|
|
4890
|
+
milestones: {
|
|
4891
|
+
id: string;
|
|
4892
|
+
count: number;
|
|
4893
|
+
reached: boolean;
|
|
4894
|
+
}[];
|
|
4895
|
+
key?: string | undefined;
|
|
4896
|
+
};
|
|
4897
|
+
stale: string | null;
|
|
4898
|
+
};
|
|
4899
|
+
type ProfileCompletionsState = {
|
|
4900
|
+
status: "loading";
|
|
4901
|
+
} | {
|
|
4902
|
+
status: "error";
|
|
4903
|
+
message: string;
|
|
4904
|
+
} | {
|
|
4905
|
+
status: "missing";
|
|
4906
|
+
} | {
|
|
4907
|
+
status: "ready";
|
|
4908
|
+
items: ProfileCompletion[];
|
|
4909
|
+
/** More completions to load with `loadMore()`. */
|
|
4910
|
+
more: boolean;
|
|
4911
|
+
/** Loading the next page. */
|
|
4912
|
+
loading: boolean;
|
|
4913
|
+
/** Why the last `loadMore()` failed, until the next succeeds. */
|
|
4914
|
+
error: string | null;
|
|
4915
|
+
};
|
|
4916
|
+
/**
|
|
4917
|
+
* A profile's completions of quests that show on profiles (`relay.profiles.completions`), most
|
|
4918
|
+
* recently completed first, `limit` quests at a time. `loadMore()` appends the next page;
|
|
4919
|
+
* `refresh()` starts again from the first, as signing in or out and a profile change in this tab
|
|
4920
|
+
* do.
|
|
4921
|
+
*/
|
|
4922
|
+
declare function useProfileCompletions(profile: string, options?: {
|
|
4923
|
+
limit?: number;
|
|
4924
|
+
}): {
|
|
4925
|
+
refresh: () => Promise<void>;
|
|
4926
|
+
/**
|
|
4927
|
+
* Appends the next page; does nothing while one loads, while the first page reloads, or when
|
|
4928
|
+
* there is none.
|
|
4929
|
+
*/
|
|
4930
|
+
loadMore: () => Promise<void>;
|
|
4931
|
+
status: "loading";
|
|
4932
|
+
} | {
|
|
4933
|
+
refresh: () => Promise<void>;
|
|
4934
|
+
/**
|
|
4935
|
+
* Appends the next page; does nothing while one loads, while the first page reloads, or when
|
|
4936
|
+
* there is none.
|
|
4937
|
+
*/
|
|
4938
|
+
loadMore: () => Promise<void>;
|
|
4939
|
+
status: "error";
|
|
4940
|
+
message: string;
|
|
4941
|
+
} | {
|
|
4942
|
+
refresh: () => Promise<void>;
|
|
4943
|
+
/**
|
|
4944
|
+
* Appends the next page; does nothing while one loads, while the first page reloads, or when
|
|
4945
|
+
* there is none.
|
|
4946
|
+
*/
|
|
4947
|
+
loadMore: () => Promise<void>;
|
|
4948
|
+
status: "missing";
|
|
4949
|
+
} | {
|
|
4950
|
+
refresh: () => Promise<void>;
|
|
4951
|
+
/**
|
|
4952
|
+
* Appends the next page; does nothing while one loads, while the first page reloads, or when
|
|
4953
|
+
* there is none.
|
|
4954
|
+
*/
|
|
4955
|
+
loadMore: () => Promise<void>;
|
|
4956
|
+
status: "ready";
|
|
4957
|
+
items: ProfileCompletion[];
|
|
4958
|
+
/** More completions to load with `loadMore()`. */
|
|
4959
|
+
more: boolean;
|
|
4960
|
+
/** Loading the next page. */
|
|
4961
|
+
loading: boolean;
|
|
4962
|
+
/** Why the last `loadMore()` failed, until the next succeeds. */
|
|
4963
|
+
error: string | null;
|
|
4964
|
+
};
|
|
4802
4965
|
|
|
4803
4966
|
type ReferralSummary = z.infer<typeof referralSummarySchema>;
|
|
4804
4967
|
/**
|
|
@@ -5060,4 +5223,4 @@ declare function useTieredRewards(): {
|
|
|
5060
5223
|
}[];
|
|
5061
5224
|
};
|
|
5062
5225
|
|
|
5063
|
-
export { type Collection, CosmosChains, DiscoveredWallet, type Experience, type Invitation, type LeaderboardState, type OAuthProvider, PENDING_POLL_MS, PROFILE_CHANGED, type PointLedgersState, type ProfileState, type QuestInput, type QuestNotice, type QuestStatus, type QuestTone, RETRY_DELAYS_MS, type ReferencesState, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, type TieredRewardsState, canRepeat, canSubmit, captureReferralCode, completionCountLabel, completionMark, hasPending, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, roleDeliveryLabel, runsSilently, sanitizeDeliveries, useAccounts, useExperience, useInvitation, useLeaderboard, useMe, useMyProfile, usePointLedgers, useProfile, useQuest, useReferralSummary, useRelay, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets, visibleQuests, watchRoleDeliveries };
|
|
5226
|
+
export { type Collection, CosmosChains, DiscoveredWallet, type Experience, type Invitation, type LeaderboardState, type OAuthProvider, PENDING_POLL_MS, PROFILE_CHANGED, type PointLedgersState, type ProfileCompletionsState, type ProfileReadState, type ProfileState, type QuestInput, type QuestNotice, type QuestStatus, type QuestTone, RETRY_DELAYS_MS, type ReferencesState, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, type TieredRewardsState, canRepeat, canSubmit, captureReferralCode, completionCountLabel, completionMark, hasPending, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, roleDeliveryLabel, runsSilently, sanitizeDeliveries, useAccounts, useExperience, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMyProfile, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useReferralSummary, useRelay, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets, visibleQuests, watchRoleDeliveries };
|