@domino-sdk/relay 1.61.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 +156 -8
- package/README.md +3 -2
- package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-CCqCKCVx.d.ts} +3127 -1764
- package/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{integrations-B3y36OaB.d.ts → analytics-BwAKLi7O.d.ts} +347 -57
- package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-Cm-5G0PC.d.ts} +1 -1
- package/dist/authoring.d.ts +130 -42
- package/dist/authoring.js +112 -37
- package/dist/{automatic-outcomes-If88LR9f.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/{announcements-CHx3-HBw.d.ts → capability-error-DFMwSuSf.d.ts} +161 -4
- package/dist/{pages-K7-KjSXw.d.ts → catalog--ZIlskAo.d.ts} +39 -561
- package/dist/{chunk-DYXDZFKA.js → chunk-3KLC4AMA.js} +37 -11
- package/dist/{chunk-XBV2CK2H.js → chunk-3PYYGFSB.js} +14 -2
- package/dist/{chunk-RHBS5FJL.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-5I54XBK2.js → chunk-E6IKQHTX.js} +2 -2
- package/dist/chunk-FWLQ5XCS.js +21 -0
- package/dist/{chunk-SKGTNTLF.js → chunk-GKIFABGN.js} +150 -61
- package/dist/chunk-GTDW453U.js +522 -0
- package/dist/{chunk-VURRFVNP.js → chunk-HTZHBTIL.js} +69 -27
- package/dist/chunk-K2KS3JLY.js +188 -0
- package/dist/{chunk-ZDJLPN4L.js → chunk-MK425RXJ.js} +3143 -3209
- package/dist/{chunk-L77O64I4.js → chunk-QYPMPWVX.js} +1 -1
- package/dist/chunk-UAKYDVT3.js +565 -0
- package/dist/{chunk-DHXDBAJF.js → chunk-UPQPUJOU.js} +36 -123
- package/dist/{chunk-24I4R732.js → chunk-UW5232GG.js} +34 -19
- package/dist/chunk-WSBYWVTZ.js +717 -0
- package/dist/{chunk-PPB7HALD.js → chunk-XJFYAXET.js} +9 -8
- package/dist/{chunk-7A4J67ZL.js → chunk-XNKSSE32.js} +1 -1
- package/dist/{chunk-QEAS4ZGS.js → chunk-Y322OTCH.js} +1 -1
- package/dist/{client-C51w7fMb.d.ts → client-B-hbHX30.d.ts} +109 -40
- package/dist/{deployments-kWoHFaqj.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-BoV4ryUc.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 +206 -26
- package/dist/react/index.js +153 -25
- 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 +126 -75
- package/dist/server/index.d.ts +14 -12
- package/dist/server/index.js +2137 -1633
- package/dist/sign-in-providers-BkjcDsFF.d.ts +39 -0
- package/dist/submission-input-DHGKhXfp.d.ts +342 -0
- package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-BCE7zdOb.d.ts} +46 -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-BrX9pIGN.d.ts → transport-DkhX2Cbs.d.ts} +5764 -2217
- package/dist/{wallet-CIqFoxdm.d.ts → wallet-DTO7SXj7.d.ts} +20 -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-3Y3L2F54.js +0 -982
- package/dist/chunk-EN3M5Z4J.js +0 -13
- package/dist/chunk-QNUHWK7R.js +0 -602
- package/dist/chunk-SE4PFJPT.js +0 -247
- package/dist/groups-CqcA2Ycs.d.ts +0 -2827
- package/dist/runtime/chunks/5QVFB4TU.js +0 -1
- package/dist/submission-input-C54Q8yAD.d.ts +0 -146
- package/dist/x-D1PGi8Sq.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,18 +1880,26 @@ declare function useSignIn(): {
|
|
|
1865
1880
|
sendCode: (email: string) => Promise<void>;
|
|
1866
1881
|
verifyCode: (code: string) => Promise<void>;
|
|
1867
1882
|
startOver: () => void;
|
|
1868
|
-
|
|
1883
|
+
/**
|
|
1884
|
+
* Leaves for the provider's consent screen: any of `providers().signInProviders`, Telegram
|
|
1885
|
+
* included.
|
|
1886
|
+
*/
|
|
1887
|
+
withProvider: (provider: SignInProvider) => Promise<void>;
|
|
1869
1888
|
/**
|
|
1870
1889
|
* Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. A
|
|
1871
1890
|
* wallet that can watch its accounts, such as an EVM browser wallet, is followed: switching
|
|
1872
1891
|
* to another account in it, or locking it, signs out.
|
|
1873
1892
|
*/
|
|
1874
1893
|
withWallet: (signer: WalletSigner) => Promise<void>;
|
|
1875
|
-
/**
|
|
1894
|
+
/**
|
|
1895
|
+
* Leaves for Telegram Login, where the platform configured it.
|
|
1896
|
+
*
|
|
1897
|
+
* @deprecated Use `withProvider("telegram")`. Removed in 2.0.0.
|
|
1898
|
+
*/
|
|
1876
1899
|
withTelegram: () => Promise<void>;
|
|
1877
1900
|
/**
|
|
1878
1901
|
* Signs in, or signs up, inside a Telegram Mini App the project enabled, with its launch data
|
|
1879
|
-
* (`telegramMiniAppInitData()`).
|
|
1902
|
+
* (`telegramMiniAppInitData()` from `@domino-sdk/relay/telegram`).
|
|
1880
1903
|
*/
|
|
1881
1904
|
withTelegramMiniApp: (initData: string) => Promise<void>;
|
|
1882
1905
|
};
|
|
@@ -1913,8 +1936,18 @@ declare function useSignInOptions(input?: {
|
|
|
1913
1936
|
cosmos?: CosmosChains;
|
|
1914
1937
|
}): {
|
|
1915
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;
|
|
1916
1945
|
unavailable: SignInUnavailable[];
|
|
1917
|
-
/**
|
|
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
|
+
*/
|
|
1918
1951
|
telegram: TelegramSignInOption | null;
|
|
1919
1952
|
/** Why the project's methods could not be read; the options are then email alone. */
|
|
1920
1953
|
methodsError: RelayError | null;
|
|
@@ -2010,11 +2043,87 @@ declare function useAccounts(): {
|
|
|
2010
2043
|
error: RelayError | null;
|
|
2011
2044
|
refresh(): Promise<void>;
|
|
2012
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
|
+
};
|
|
2013
2116
|
/**
|
|
2014
2117
|
* The signed-in participant's Telegram account in `data`. Telegram is not one of `useAccounts()`'s
|
|
2015
2118
|
* providers in SDK 1.x, so it has this hook of its own, with the same behavior: `connect()` leaves
|
|
2016
2119
|
* for Telegram Login, `connectMiniApp(initData)` links the user who opened a Telegram Mini App,
|
|
2017
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.
|
|
2018
2127
|
*/
|
|
2019
2128
|
declare function useTelegramAccount(): {
|
|
2020
2129
|
connect: () => Promise<boolean>;
|
|
@@ -2397,6 +2506,76 @@ declare function useProfileCompletions(profile: string, options?: {
|
|
|
2397
2506
|
limit?: number;
|
|
2398
2507
|
}): PagedQuery<ProfileCompletion>;
|
|
2399
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
|
+
|
|
2400
2579
|
type ReferralSummary = z$1.infer<typeof referralSummarySchema>;
|
|
2401
2580
|
/**
|
|
2402
2581
|
* Keeps an invitation code from the landing URL (`?ref=CODE` by default)
|
|
@@ -2433,7 +2612,8 @@ type Invitation = {
|
|
|
2433
2612
|
* signed in. Render it once near the app root so the code survives sign-in.
|
|
2434
2613
|
*
|
|
2435
2614
|
* Domino rejects self-referrals, cycles, codes from another project, and
|
|
2436
|
-
* 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
|
|
2437
2617
|
* reason; `accept(code)` also serves a manual "Have a code?" input. Once
|
|
2438
2618
|
* accepted, the referral summary and referral progress are read again.
|
|
2439
2619
|
*/
|
|
@@ -2533,4 +2713,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
|
|
|
2533
2713
|
*/
|
|
2534
2714
|
declare function useTieredRewards(): Query<TieredRewardReference[]>;
|
|
2535
2715
|
|
|
2536
|
-
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 };
|