@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
package/dist/react/index.d.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { B as Badge,
|
|
2
|
-
import { b as ParticipantSession, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from '../participant-activity-
|
|
3
|
-
import { g as RelayError, R as RelayClient, m as SubmissionDraft } from '../client-
|
|
4
|
-
import { P as Page,
|
|
5
|
-
export { C as
|
|
1
|
+
import { B as Badge, c as MemberBadges, O as Offer, f as Redemption } from '../offers-DhAtss4_.js';
|
|
2
|
+
import { b as ParticipantSession, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from '../participant-activity-D-Drp24G.js';
|
|
3
|
+
import { g as RelayError, R as RelayClient, m as SubmissionDraft } from '../client-B-hbHX30.js';
|
|
4
|
+
import { P as Page, s as RewardDeliveryAction, e as CreatorAccountProvider, K as KnownConsentChannel, M as MemberConsent, n as QuestOutcomeQuery, l as QuestOutcome } from '../pages-B8q8Y_dQ.js';
|
|
5
|
+
export { C as ConsentChannel, b as ConsentSource, c as ConsentState, d as CreatorAccount, f as CreatorAccounts, g as KnownConsentSource, h as KnownConsentState } from '../pages-B8q8Y_dQ.js';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import { ReactNode } from 'react';
|
|
8
8
|
import * as z from 'zod';
|
|
9
9
|
import { z as z$1 } from 'zod';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
export {
|
|
13
|
-
import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, T as TelegramSignInOption, g as SignInWallet, D as DiscoveredWallet } from '../telegram-browser-
|
|
14
|
-
export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption, t as telegramMiniAppInitData } from '../telegram-browser-
|
|
15
|
-
import { m as WalletSigner, k as WalletSignInNetwork, L as LinkedWallet, g as ProfileUpdate, f as ProfileSummary, b as ProfileCompletion, e as ProfileReferral } from '../wallet-
|
|
16
|
-
|
|
17
|
-
import '../
|
|
18
|
-
import '../
|
|
10
|
+
import { l as collectionViewSchema, b as QuestView } from '../catalog--ZIlskAo.js';
|
|
11
|
+
import { E as Entitlement, b as AttemptStatus, V as AttemptCodeSource, c as AuthProvider, J as SignInProvider, A as AccountConnection, I as SignInAccountStatus, p as LeaderboardPlacement, dL as referralSummarySchema, o as LeaderboardPage, u as PointEntry, t as PointBalances, y as PointLedgerReference, U as TieredRewardReference } from '../accounts-CCqCKCVx.js';
|
|
12
|
+
export { S as SignInAccount, N as SignInProviderOption } from '../accounts-CCqCKCVx.js';
|
|
13
|
+
import { c as SignInMethods, C as CosmosChains, d as SignInOption, P as ProviderSignInOption, f as SignInUnavailable, T as TelegramSignInOption, g as SignInWallet, D as DiscoveredWallet } from '../telegram-browser-BCE7zdOb.js';
|
|
14
|
+
export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption, t as telegramMiniAppInitData } from '../telegram-browser-BCE7zdOb.js';
|
|
15
|
+
import { m as WalletSigner, k as WalletSignInNetwork, L as LinkedWallet, g as ProfileUpdate, f as ProfileSummary, b as ProfileCompletion, e as ProfileReferral } from '../wallet-DTO7SXj7.js';
|
|
16
|
+
export { T as TelegramAccountConnection, a as TelegramSignInMethods } from '../submission-input-DHGKhXfp.js';
|
|
17
|
+
import '../tracker-data-Hb1uQnk5.js';
|
|
18
|
+
import '../request-error-D_dUPLwo.js';
|
|
19
|
+
import '../action-9Xl0StBg.js';
|
|
20
|
+
import '../sign-in-providers-BkjcDsFF.js';
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* A query's identity: plain JSON values, outermost group first, such as
|
|
@@ -360,12 +362,14 @@ declare const relayKeys: {
|
|
|
360
362
|
readonly experience: readonly ["experience"];
|
|
361
363
|
/** `useMe`. */
|
|
362
364
|
readonly me: readonly ["me"];
|
|
363
|
-
/** `useAccounts`. */
|
|
365
|
+
/** `useAccounts`, `useAccount`, `useTelegramAccount`, `useCreatorAccounts`. */
|
|
364
366
|
readonly accounts: readonly ["accounts"];
|
|
365
367
|
/** `useWallets`. */
|
|
366
368
|
readonly wallets: readonly ["wallets"];
|
|
367
369
|
/** `useMyProfile`, `useProfile`, `useProfileCompletions`, `useProfileReferral`. */
|
|
368
370
|
readonly profiles: readonly ["profiles"];
|
|
371
|
+
/** `useConsent`. */
|
|
372
|
+
readonly consent: readonly ["consent"];
|
|
369
373
|
/** `useLeaderboard`, `useLeaderboardPlacement`, `useLeaderboardHistory`. */
|
|
370
374
|
readonly leaderboards: readonly ["leaderboards"];
|
|
371
375
|
/** `useReferralSummary`. */
|
|
@@ -759,12 +763,17 @@ declare function useDeliveries(options?: QueryOptions): MemberQuery<{
|
|
|
759
763
|
}>;
|
|
760
764
|
|
|
761
765
|
/**
|
|
762
|
-
* All a participant sees of a
|
|
763
|
-
*
|
|
766
|
+
* All a participant sees of a Discord role Domino grants for a quest. Attempts,
|
|
767
|
+
* errors, and role IDs stay out of the page.
|
|
764
768
|
*/
|
|
765
769
|
type RoleDelivery = {
|
|
766
770
|
quest: string;
|
|
767
771
|
status: string;
|
|
772
|
+
/**
|
|
773
|
+
* Raw rows from `me.rewardDeliveries()` carry it; only `grant-role` rows are
|
|
774
|
+
* roles. Rows without it count as roles.
|
|
775
|
+
*/
|
|
776
|
+
action?: RewardDeliveryAction;
|
|
768
777
|
revokedAt?: number | null;
|
|
769
778
|
reconciliation?: {
|
|
770
779
|
status: string;
|
|
@@ -775,8 +784,10 @@ type KnownRoleDeliveryStatus = "pending" | "failed" | "granted";
|
|
|
775
784
|
/** Where one quest's role deliveries stand, as a code an app can localize; open for new codes. */
|
|
776
785
|
type RoleDeliveryStatus = KnownRoleDeliveryStatus | (string & {});
|
|
777
786
|
/**
|
|
778
|
-
* Where one quest's roles stand, or null when it
|
|
779
|
-
*
|
|
787
|
+
* Where one quest's roles stand, or null when it grants no role. Takes rows from
|
|
788
|
+
* `useExperience` or raw `me.rewardDeliveries()` rows; announcement rows never
|
|
789
|
+
* count. This never changes whether the quest is completed: the role follows
|
|
790
|
+
* the completion.
|
|
780
791
|
* `failed` means Domino gave up; only the organizer can grant the role now.
|
|
781
792
|
*/
|
|
782
793
|
declare function roleDeliveryStatus(deliveries: readonly RoleDelivery[], quest: string): RoleDeliveryStatus | null;
|
|
@@ -787,7 +798,7 @@ declare function roleDeliveryLabel(status: RoleDeliveryStatus | null): "Role del
|
|
|
787
798
|
* The signed-in participant's quests and collections, polled for the whole app by one observer,
|
|
788
799
|
* which pauses while the tab is hidden. `data` holds `quests` and `collections`; `signed-out`
|
|
789
800
|
* means nobody is signed in. `deliveries` lists Discord roles earned from quests and whether each
|
|
790
|
-
* has arrived yet.
|
|
801
|
+
* has arrived yet; announcement (`post-message`) deliveries are left out.
|
|
791
802
|
*/
|
|
792
803
|
declare function useExperience(): MemberQuery<ExperienceData> & {
|
|
793
804
|
deliveries: readonly RoleDelivery[];
|
|
@@ -1017,6 +1028,7 @@ declare function useQuest(observed: QuestView): {
|
|
|
1017
1028
|
kind: "once";
|
|
1018
1029
|
} | {
|
|
1019
1030
|
kind: "keyed";
|
|
1031
|
+
across?: "members" | undefined;
|
|
1020
1032
|
};
|
|
1021
1033
|
progress: {
|
|
1022
1034
|
current: number;
|
|
@@ -1138,6 +1150,7 @@ declare function useQuest(observed: QuestView): {
|
|
|
1138
1150
|
};
|
|
1139
1151
|
release?: string | undefined;
|
|
1140
1152
|
} | undefined;
|
|
1153
|
+
codeSource?: AttemptCodeSource | null | undefined;
|
|
1141
1154
|
} | null;
|
|
1142
1155
|
release: string;
|
|
1143
1156
|
interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
|
|
@@ -1461,6 +1474,7 @@ declare function useQuestAction(observed: QuestView): {
|
|
|
1461
1474
|
kind: "once";
|
|
1462
1475
|
} | {
|
|
1463
1476
|
kind: "keyed";
|
|
1477
|
+
across?: "members" | undefined;
|
|
1464
1478
|
};
|
|
1465
1479
|
progress: {
|
|
1466
1480
|
current: number;
|
|
@@ -1582,6 +1596,7 @@ declare function useQuestAction(observed: QuestView): {
|
|
|
1582
1596
|
};
|
|
1583
1597
|
release?: string | undefined;
|
|
1584
1598
|
} | undefined;
|
|
1599
|
+
codeSource?: AttemptCodeSource | null | undefined;
|
|
1585
1600
|
} | null;
|
|
1586
1601
|
release: string;
|
|
1587
1602
|
interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
|
|
@@ -1865,14 +1880,26 @@ declare function useSignIn(): {
|
|
|
1865
1880
|
sendCode: (email: string) => Promise<void>;
|
|
1866
1881
|
verifyCode: (code: string) => Promise<void>;
|
|
1867
1882
|
startOver: () => void;
|
|
1868
|
-
|
|
1869
|
-
|
|
1883
|
+
/**
|
|
1884
|
+
* Leaves for the provider's consent screen: any of `providers().signInProviders`, Telegram
|
|
1885
|
+
* included.
|
|
1886
|
+
*/
|
|
1887
|
+
withProvider: (provider: SignInProvider) => Promise<void>;
|
|
1888
|
+
/**
|
|
1889
|
+
* Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. A
|
|
1890
|
+
* wallet that can watch its accounts, such as an EVM browser wallet, is followed: switching
|
|
1891
|
+
* to another account in it, or locking it, signs out.
|
|
1892
|
+
*/
|
|
1870
1893
|
withWallet: (signer: WalletSigner) => Promise<void>;
|
|
1871
|
-
/**
|
|
1894
|
+
/**
|
|
1895
|
+
* Leaves for Telegram Login, where the platform configured it.
|
|
1896
|
+
*
|
|
1897
|
+
* @deprecated Use `withProvider("telegram")`. Removed in 2.0.0.
|
|
1898
|
+
*/
|
|
1872
1899
|
withTelegram: () => Promise<void>;
|
|
1873
1900
|
/**
|
|
1874
1901
|
* Signs in, or signs up, inside a Telegram Mini App the project enabled, with its launch data
|
|
1875
|
-
* (`telegramMiniAppInitData()`).
|
|
1902
|
+
* (`telegramMiniAppInitData()` from `@domino-sdk/relay/telegram`).
|
|
1876
1903
|
*/
|
|
1877
1904
|
withTelegramMiniApp: (initData: string) => Promise<void>;
|
|
1878
1905
|
};
|
|
@@ -1909,8 +1936,18 @@ declare function useSignInOptions(input?: {
|
|
|
1909
1936
|
cosmos?: CosmosChains;
|
|
1910
1937
|
}): {
|
|
1911
1938
|
options: SignInOption[] | null;
|
|
1939
|
+
/**
|
|
1940
|
+
* Every sign-in provider the platform configured, Telegram included, in Relay's order: render
|
|
1941
|
+
* these in place of the `oauth` entries of `options`, which SDK 1.x keeps to `AuthProvider`.
|
|
1942
|
+
* Null while `options` is.
|
|
1943
|
+
*/
|
|
1944
|
+
signInProviders: ProviderSignInOption[] | null;
|
|
1912
1945
|
unavailable: SignInUnavailable[];
|
|
1913
|
-
/**
|
|
1946
|
+
/**
|
|
1947
|
+
* Telegram Login, to render beside `options`; null when the platform did not configure it.
|
|
1948
|
+
*
|
|
1949
|
+
* @deprecated Use the `"telegram"` entry of `signInProviders`. Removed in 2.0.0.
|
|
1950
|
+
*/
|
|
1914
1951
|
telegram: TelegramSignInOption | null;
|
|
1915
1952
|
/** Why the project's methods could not be read; the options are then email alone. */
|
|
1916
1953
|
methodsError: RelayError | null;
|
|
@@ -2006,11 +2043,87 @@ declare function useAccounts(): {
|
|
|
2006
2043
|
error: RelayError | null;
|
|
2007
2044
|
refresh(): Promise<void>;
|
|
2008
2045
|
};
|
|
2046
|
+
/**
|
|
2047
|
+
* The signed-in participant's account on one sign-in provider in `data`, any of
|
|
2048
|
+
* `providers().signInProviders`, Telegram included; null while Relay lists no such provider.
|
|
2049
|
+
* It behaves as `useAccounts()` does: `connect()` leaves for the provider's consent screen and
|
|
2050
|
+
* comes back linked, the account is read again when the window regains focus and after a
|
|
2051
|
+
* disconnect, and a failure lands in `actionError`.
|
|
2052
|
+
*/
|
|
2053
|
+
declare function useAccount(provider: SignInProvider): {
|
|
2054
|
+
connect: () => Promise<boolean>;
|
|
2055
|
+
disconnect: () => Promise<boolean>;
|
|
2056
|
+
isPending: boolean;
|
|
2057
|
+
actionError: RelayError | null;
|
|
2058
|
+
resetAction: () => void;
|
|
2059
|
+
retry: () => Promise<boolean>;
|
|
2060
|
+
settle: () => boolean;
|
|
2061
|
+
/** True when the account can be used to verify quests right now. */
|
|
2062
|
+
isConnected: boolean;
|
|
2063
|
+
status: "loading";
|
|
2064
|
+
data: undefined;
|
|
2065
|
+
error: null;
|
|
2066
|
+
refresh(): Promise<void>;
|
|
2067
|
+
} | {
|
|
2068
|
+
connect: () => Promise<boolean>;
|
|
2069
|
+
disconnect: () => Promise<boolean>;
|
|
2070
|
+
isPending: boolean;
|
|
2071
|
+
actionError: RelayError | null;
|
|
2072
|
+
resetAction: () => void;
|
|
2073
|
+
retry: () => Promise<boolean>;
|
|
2074
|
+
settle: () => boolean;
|
|
2075
|
+
/** True when the account can be used to verify quests right now. */
|
|
2076
|
+
isConnected: boolean;
|
|
2077
|
+
status: "error";
|
|
2078
|
+
data: undefined;
|
|
2079
|
+
error: RelayError;
|
|
2080
|
+
refresh(): Promise<void>;
|
|
2081
|
+
} | {
|
|
2082
|
+
connect: () => Promise<boolean>;
|
|
2083
|
+
disconnect: () => Promise<boolean>;
|
|
2084
|
+
isPending: boolean;
|
|
2085
|
+
actionError: RelayError | null;
|
|
2086
|
+
resetAction: () => void;
|
|
2087
|
+
retry: () => Promise<boolean>;
|
|
2088
|
+
settle: () => boolean;
|
|
2089
|
+
/** True when the account can be used to verify quests right now. */
|
|
2090
|
+
isConnected: boolean;
|
|
2091
|
+
status: "signed-out";
|
|
2092
|
+
data: undefined;
|
|
2093
|
+
error: null;
|
|
2094
|
+
refresh(): Promise<void>;
|
|
2095
|
+
} | {
|
|
2096
|
+
connect: () => Promise<boolean>;
|
|
2097
|
+
disconnect: () => Promise<boolean>;
|
|
2098
|
+
isPending: boolean;
|
|
2099
|
+
actionError: RelayError | null;
|
|
2100
|
+
resetAction: () => void;
|
|
2101
|
+
retry: () => Promise<boolean>;
|
|
2102
|
+
settle: () => boolean;
|
|
2103
|
+
/** True when the account can be used to verify quests right now. */
|
|
2104
|
+
isConnected: boolean;
|
|
2105
|
+
status: "ready";
|
|
2106
|
+
data: {
|
|
2107
|
+
provider: SignInProvider;
|
|
2108
|
+
configured: boolean;
|
|
2109
|
+
status: SignInAccountStatus;
|
|
2110
|
+
subject: string | null;
|
|
2111
|
+
revision: number;
|
|
2112
|
+
} | null;
|
|
2113
|
+
error: RelayError | null;
|
|
2114
|
+
refresh(): Promise<void>;
|
|
2115
|
+
};
|
|
2009
2116
|
/**
|
|
2010
2117
|
* The signed-in participant's Telegram account in `data`. Telegram is not one of `useAccounts()`'s
|
|
2011
2118
|
* providers in SDK 1.x, so it has this hook of its own, with the same behavior: `connect()` leaves
|
|
2012
2119
|
* for Telegram Login, `connectMiniApp(initData)` links the user who opened a Telegram Mini App,
|
|
2013
2120
|
* and a failure lands in `actionError`.
|
|
2121
|
+
*
|
|
2122
|
+
* @deprecated Use `useAccount("telegram")`, which reads, connects and disconnects the same account.
|
|
2123
|
+
* Inside a Mini App, link it with `withTelegram(relay).telegram.miniApp.connect(initData)` from
|
|
2124
|
+
* `@domino-sdk/relay/telegram`, then call
|
|
2125
|
+
* `invalidate([relayKeys.accounts, relayKeys.experience])` from `useInvalidate()`, as
|
|
2126
|
+
* `connectMiniApp` does. Removed in 2.0.0.
|
|
2014
2127
|
*/
|
|
2015
2128
|
declare function useTelegramAccount(): {
|
|
2016
2129
|
connect: () => Promise<boolean>;
|
|
@@ -2393,6 +2506,76 @@ declare function useProfileCompletions(profile: string, options?: {
|
|
|
2393
2506
|
limit?: number;
|
|
2394
2507
|
}): PagedQuery<ProfileCompletion>;
|
|
2395
2508
|
|
|
2509
|
+
/**
|
|
2510
|
+
* The signed-in member's marketing consent in `data`, one entry per channel they chose on, and
|
|
2511
|
+
* the changes to it. Show the checkbox in your app and pass its label as `wording`: Relay records
|
|
2512
|
+
* the exact text with its own time. A channel missing from `data` has no record, which is not the
|
|
2513
|
+
* same as withdrawn.
|
|
2514
|
+
*
|
|
2515
|
+
* `grant` and `withdraw` never reject: they resolve true once saved, `isPending` is true while one
|
|
2516
|
+
* runs, and a failure lands in `actionError` until `resetAction()`. Each change is bound to the
|
|
2517
|
+
* session the consent was read with.
|
|
2518
|
+
*
|
|
2519
|
+
* @experimental A minor release can change the consent API.
|
|
2520
|
+
*/
|
|
2521
|
+
declare function useConsent(): {
|
|
2522
|
+
/** Records the member's opt-in on `channel`, with the wording they saw. */
|
|
2523
|
+
grant: (channel: KnownConsentChannel, wording: string) => Promise<boolean>;
|
|
2524
|
+
/** Records the member's opt-out on `channel`, with the wording they saw if there was any. */
|
|
2525
|
+
withdraw: (channel: KnownConsentChannel, wording?: string) => Promise<boolean>;
|
|
2526
|
+
isPending: boolean;
|
|
2527
|
+
actionError: RelayError | null;
|
|
2528
|
+
resetAction: () => void;
|
|
2529
|
+
retry: () => Promise<boolean>;
|
|
2530
|
+
settle: () => boolean;
|
|
2531
|
+
status: "loading";
|
|
2532
|
+
data: undefined;
|
|
2533
|
+
error: null;
|
|
2534
|
+
refresh(): Promise<void>;
|
|
2535
|
+
} | {
|
|
2536
|
+
/** Records the member's opt-in on `channel`, with the wording they saw. */
|
|
2537
|
+
grant: (channel: KnownConsentChannel, wording: string) => Promise<boolean>;
|
|
2538
|
+
/** Records the member's opt-out on `channel`, with the wording they saw if there was any. */
|
|
2539
|
+
withdraw: (channel: KnownConsentChannel, wording?: string) => Promise<boolean>;
|
|
2540
|
+
isPending: boolean;
|
|
2541
|
+
actionError: RelayError | null;
|
|
2542
|
+
resetAction: () => void;
|
|
2543
|
+
retry: () => Promise<boolean>;
|
|
2544
|
+
settle: () => boolean;
|
|
2545
|
+
status: "error";
|
|
2546
|
+
data: undefined;
|
|
2547
|
+
error: RelayError;
|
|
2548
|
+
refresh(): Promise<void>;
|
|
2549
|
+
} | {
|
|
2550
|
+
/** Records the member's opt-in on `channel`, with the wording they saw. */
|
|
2551
|
+
grant: (channel: KnownConsentChannel, wording: string) => Promise<boolean>;
|
|
2552
|
+
/** Records the member's opt-out on `channel`, with the wording they saw if there was any. */
|
|
2553
|
+
withdraw: (channel: KnownConsentChannel, wording?: string) => Promise<boolean>;
|
|
2554
|
+
isPending: boolean;
|
|
2555
|
+
actionError: RelayError | null;
|
|
2556
|
+
resetAction: () => void;
|
|
2557
|
+
retry: () => Promise<boolean>;
|
|
2558
|
+
settle: () => boolean;
|
|
2559
|
+
status: "signed-out";
|
|
2560
|
+
data: undefined;
|
|
2561
|
+
error: null;
|
|
2562
|
+
refresh(): Promise<void>;
|
|
2563
|
+
} | {
|
|
2564
|
+
/** Records the member's opt-in on `channel`, with the wording they saw. */
|
|
2565
|
+
grant: (channel: KnownConsentChannel, wording: string) => Promise<boolean>;
|
|
2566
|
+
/** Records the member's opt-out on `channel`, with the wording they saw if there was any. */
|
|
2567
|
+
withdraw: (channel: KnownConsentChannel, wording?: string) => Promise<boolean>;
|
|
2568
|
+
isPending: boolean;
|
|
2569
|
+
actionError: RelayError | null;
|
|
2570
|
+
resetAction: () => void;
|
|
2571
|
+
retry: () => Promise<boolean>;
|
|
2572
|
+
settle: () => boolean;
|
|
2573
|
+
status: "ready";
|
|
2574
|
+
data: MemberConsent[];
|
|
2575
|
+
error: RelayError | null;
|
|
2576
|
+
refresh(): Promise<void>;
|
|
2577
|
+
};
|
|
2578
|
+
|
|
2396
2579
|
type ReferralSummary = z$1.infer<typeof referralSummarySchema>;
|
|
2397
2580
|
/**
|
|
2398
2581
|
* Keeps an invitation code from the landing URL (`?ref=CODE` by default)
|
|
@@ -2429,7 +2612,8 @@ type Invitation = {
|
|
|
2429
2612
|
* signed in. Render it once near the app root so the code survives sign-in.
|
|
2430
2613
|
*
|
|
2431
2614
|
* Domino rejects self-referrals, cycles, codes from another project, and
|
|
2432
|
-
* invitations accepted after the participant
|
|
2615
|
+
* invitations accepted after the participant completed a quest other than a
|
|
2616
|
+
* referral program's qualifying quest. Show the
|
|
2433
2617
|
* reason; `accept(code)` also serves a manual "Have a code?" input. Once
|
|
2434
2618
|
* accepted, the referral summary and referral progress are read again.
|
|
2435
2619
|
*/
|
|
@@ -2529,4 +2713,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
|
|
|
2529
2713
|
*/
|
|
2530
2714
|
declare function useTieredRewards(): Query<TieredRewardReference[]>;
|
|
2531
2715
|
|
|
2532
|
-
export { type Collection, CosmosChains, CreatorAccountProvider, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberQueryOptions, type MemberSnapshot, type Mutation, type MutationContext, type MutationOptions, type MutationStatus, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestActionState, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, type RelayActionResult, RelayClient, type RelayPolling, RelayProvider, type RelayQueryOptions, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, TelegramSignInOption, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isCoolingDown, isFinished, progressOf, questActionState, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useCreatorAccounts, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardHistory, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileBadges, useProfileCompletions, useProfileReferral, useQuest, useQuestAction, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTelegramAccount, useTieredRewards, useWalletDiscovery, useWallets };
|
|
2716
|
+
export { type Collection, CosmosChains, CreatorAccountProvider, DiscoveredWallet, type ExperienceData, type Invitation, KnownConsentChannel, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, MemberConsent, type MemberPagedQuery, type MemberQuery, type MemberQueryOptions, type MemberSnapshot, type Mutation, type MutationContext, type MutationOptions, type MutationStatus, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, ProviderSignInOption, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestActionState, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, type RelayActionResult, RelayClient, type RelayPolling, RelayProvider, type RelayQueryOptions, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInProvider, SignInUnavailable, SignInWallet, TelegramSignInOption, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isCoolingDown, isFinished, progressOf, questActionState, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccount, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useConsent, useCreatorAccounts, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardHistory, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileBadges, useProfileCompletions, useProfileReferral, useQuest, useQuestAction, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTelegramAccount, useTieredRewards, useWalletDiscovery, useWallets };
|