@domino-sdk/relay 1.6.0 → 1.9.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/action-9Xl0StBg.d.ts +33 -0
- package/dist/{activity-mPUN4v5Q.d.ts → activity-CCe1e_7a.d.ts} +115 -115
- package/dist/authoring.d.ts +45 -45
- package/dist/authoring.js +1 -1
- package/dist/{automatic-outcomes-DmuqzQiH.d.ts → automatic-outcomes-Dyk0VTUs.d.ts} +1 -1
- package/dist/browser.d.ts +7 -6
- package/dist/browser.js +5 -4
- package/dist/{chunk-C25TDFHN.js → chunk-2N464DDE.js} +1 -1
- package/dist/{chunk-GMPPLZKH.js → chunk-2V74CHDL.js} +191 -191
- package/dist/{chunk-6RBF3UDA.js → chunk-734LYHWP.js} +2 -2
- package/dist/chunk-ETPL6AAJ.js +98 -0
- package/dist/{chunk-ZOUEEK5L.js → chunk-FWSSMSIA.js} +49 -21
- package/dist/{chunk-BFZHJA2B.js → chunk-L3QFIRGO.js} +2 -2
- package/dist/{client-CQuTAjSs.d.ts → client-CbASImpi.d.ts} +42 -36
- package/dist/{groups-D08JtrZu.d.ts → groups-Dvmd4CYk.d.ts} +1 -1
- package/dist/{images-D7en0Awp.d.ts → images-Dekv3DYF.d.ts} +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +7 -3
- package/dist/internal.d.ts +5 -119
- package/dist/internal.js +1 -1
- package/dist/{offers-BENZl5l5.d.ts → offers-BEGVSOTD.d.ts} +2 -2
- package/dist/{pages-CBa-_u_n.d.ts → pages-HmS6eedC.d.ts} +38 -38
- package/dist/react/index.d.ts +197 -10
- package/dist/react/index.js +253 -111
- package/dist/referral-reward-kinds-Flbb1D2q.d.ts +171 -0
- package/dist/{schema-BPdHSCAc.d.ts → schema-BCuiO7eD.d.ts} +16 -16
- package/dist/schema.d.ts +8 -8
- package/dist/schema.js +3 -3
- package/dist/server/index.d.ts +592 -45
- package/dist/server/index.js +209 -49
- package/dist/{sign-in-options-FPKoZMfo.d.ts → sign-in-options-z3wsfizk.d.ts} +2 -2
- package/dist/{submission-input-BzIWutQi.d.ts → submission-input-Bs14jIsu.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/identity-integration-BPovus6e.d.ts +0 -58
- /package/dist/{chunk-QGLHZ2E5.js → chunk-5ECM6AWV.js} +0 -0
package/dist/react/index.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { b as ParticipantSession, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from '../participant-activity-DkL3nY5a.js';
|
|
2
|
-
import { g as RelayError, R as RelayClient, S as SubmissionDraft } from '../client-
|
|
3
|
-
import { P as Page, j as QuestView, g as QuestOutcomeQuery, e as QuestOutcome } from '../pages-
|
|
2
|
+
import { g as RelayError, R as RelayClient, S as SubmissionDraft } from '../client-CbASImpi.js';
|
|
3
|
+
import { P as Page, j as QuestView, g as QuestOutcomeQuery, e as QuestOutcome } from '../pages-HmS6eedC.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import { E as Entitlement, a as AttemptStatus, T as TieredRewardReference } from '../schema-
|
|
7
|
-
import { a as AuthProvider, A as AccountConnection } from '../submission-input-
|
|
8
|
-
import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, g as SignInWallet, D as DiscoveredWallet } from '../sign-in-options-
|
|
9
|
-
export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption } from '../sign-in-options-
|
|
6
|
+
import { E as Entitlement, a as AttemptStatus, T as TieredRewardReference } from '../schema-BCuiO7eD.js';
|
|
7
|
+
import { a as AuthProvider, A as AccountConnection } from '../submission-input-Bs14jIsu.js';
|
|
8
|
+
import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, g as SignInWallet, D as DiscoveredWallet } from '../sign-in-options-z3wsfizk.js';
|
|
9
|
+
export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption } from '../sign-in-options-z3wsfizk.js';
|
|
10
10
|
import { f as WalletSigner, d as WalletSignInNetwork, L as LinkedWallet } from '../wallet-YssWxGg8.js';
|
|
11
|
-
import { f as LeaderboardPlacement, b5 as referralSummarySchema, e as LeaderboardPage, i as PointBalances, j as PointEntry, n as PointLedgerReference } from '../groups-
|
|
11
|
+
import { f as LeaderboardPlacement, b5 as referralSummarySchema, e as LeaderboardPage, i as PointBalances, j as PointEntry, n as PointLedgerReference } from '../groups-Dvmd4CYk.js';
|
|
12
12
|
import { f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-D2aFcOxu.js';
|
|
13
13
|
import { z } from 'zod';
|
|
14
|
-
import { O as Offer
|
|
14
|
+
import { O as Offer } from '../offers-BEGVSOTD.js';
|
|
15
15
|
import '../request-error-D_dUPLwo.js';
|
|
16
|
+
import '../action-9Xl0StBg.js';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* A query's identity: plain JSON values, outermost group first, such as
|
|
@@ -143,6 +144,26 @@ declare function useActivity(options?: {
|
|
|
143
144
|
intervalMs?: number;
|
|
144
145
|
}): MemberQuery<ParticipantActivity>;
|
|
145
146
|
|
|
147
|
+
type RelayActionResult<T> = {
|
|
148
|
+
ok: true;
|
|
149
|
+
value: T;
|
|
150
|
+
} | {
|
|
151
|
+
ok: false;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* One logical mutation at a time, with a key and exact callback retained across uncertain errors.
|
|
155
|
+
* `run` and `retry` never reject; their result distinguishes success from failure, including a
|
|
156
|
+
* successful null value. A failure appears in `error`. Pass a client or
|
|
157
|
+
* session as `scope` to isolate actions when the signed-in member or project changes.
|
|
158
|
+
*/
|
|
159
|
+
declare function useRelayAction<T = unknown>(scope?: unknown): {
|
|
160
|
+
run: (task?: (actionId: string) => Promise<T>) => Promise<RelayActionResult<T>>;
|
|
161
|
+
retry: () => Promise<RelayActionResult<T>>;
|
|
162
|
+
settle: () => boolean;
|
|
163
|
+
busy: boolean;
|
|
164
|
+
error: RelayError | null;
|
|
165
|
+
};
|
|
166
|
+
|
|
146
167
|
type Collection = {
|
|
147
168
|
id: string;
|
|
148
169
|
/** The collection's authoring key, when it has one. */
|
|
@@ -1226,6 +1247,8 @@ declare function useAccounts(): {
|
|
|
1226
1247
|
disconnect: (provider: AuthProvider) => Promise<boolean>;
|
|
1227
1248
|
busy: boolean;
|
|
1228
1249
|
actionError: RelayError | null;
|
|
1250
|
+
retry: () => Promise<boolean>;
|
|
1251
|
+
settle: () => boolean;
|
|
1229
1252
|
isConnected: (provider: AuthProvider) => boolean;
|
|
1230
1253
|
status: "loading";
|
|
1231
1254
|
data: undefined;
|
|
@@ -1236,6 +1259,8 @@ declare function useAccounts(): {
|
|
|
1236
1259
|
disconnect: (provider: AuthProvider) => Promise<boolean>;
|
|
1237
1260
|
busy: boolean;
|
|
1238
1261
|
actionError: RelayError | null;
|
|
1262
|
+
retry: () => Promise<boolean>;
|
|
1263
|
+
settle: () => boolean;
|
|
1239
1264
|
isConnected: (provider: AuthProvider) => boolean;
|
|
1240
1265
|
status: "error";
|
|
1241
1266
|
data: undefined;
|
|
@@ -1246,6 +1271,8 @@ declare function useAccounts(): {
|
|
|
1246
1271
|
disconnect: (provider: AuthProvider) => Promise<boolean>;
|
|
1247
1272
|
busy: boolean;
|
|
1248
1273
|
actionError: RelayError | null;
|
|
1274
|
+
retry: () => Promise<boolean>;
|
|
1275
|
+
settle: () => boolean;
|
|
1249
1276
|
isConnected: (provider: AuthProvider) => boolean;
|
|
1250
1277
|
status: "signed-out";
|
|
1251
1278
|
data: undefined;
|
|
@@ -1256,6 +1283,8 @@ declare function useAccounts(): {
|
|
|
1256
1283
|
disconnect: (provider: AuthProvider) => Promise<boolean>;
|
|
1257
1284
|
busy: boolean;
|
|
1258
1285
|
actionError: RelayError | null;
|
|
1286
|
+
retry: () => Promise<boolean>;
|
|
1287
|
+
settle: () => boolean;
|
|
1259
1288
|
isConnected: (provider: AuthProvider) => boolean;
|
|
1260
1289
|
status: "ready";
|
|
1261
1290
|
data: {
|
|
@@ -1283,6 +1312,8 @@ declare function useWallets(): {
|
|
|
1283
1312
|
unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<boolean>;
|
|
1284
1313
|
busy: boolean;
|
|
1285
1314
|
actionError: RelayError | null;
|
|
1315
|
+
retry: () => Promise<boolean>;
|
|
1316
|
+
settle: () => boolean;
|
|
1286
1317
|
status: "loading";
|
|
1287
1318
|
data: undefined;
|
|
1288
1319
|
error: null;
|
|
@@ -1293,6 +1324,8 @@ declare function useWallets(): {
|
|
|
1293
1324
|
unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<boolean>;
|
|
1294
1325
|
busy: boolean;
|
|
1295
1326
|
actionError: RelayError | null;
|
|
1327
|
+
retry: () => Promise<boolean>;
|
|
1328
|
+
settle: () => boolean;
|
|
1296
1329
|
status: "error";
|
|
1297
1330
|
data: undefined;
|
|
1298
1331
|
error: RelayError;
|
|
@@ -1303,6 +1336,8 @@ declare function useWallets(): {
|
|
|
1303
1336
|
unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<boolean>;
|
|
1304
1337
|
busy: boolean;
|
|
1305
1338
|
actionError: RelayError | null;
|
|
1339
|
+
retry: () => Promise<boolean>;
|
|
1340
|
+
settle: () => boolean;
|
|
1306
1341
|
status: "signed-out";
|
|
1307
1342
|
data: undefined;
|
|
1308
1343
|
error: null;
|
|
@@ -1313,6 +1348,8 @@ declare function useWallets(): {
|
|
|
1313
1348
|
unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<boolean>;
|
|
1314
1349
|
busy: boolean;
|
|
1315
1350
|
actionError: RelayError | null;
|
|
1351
|
+
retry: () => Promise<boolean>;
|
|
1352
|
+
settle: () => boolean;
|
|
1316
1353
|
status: "ready";
|
|
1317
1354
|
data: {
|
|
1318
1355
|
chain: "solana" | "eip155" | "cosmos";
|
|
@@ -1367,6 +1404,8 @@ declare function useMyProfile(): {
|
|
|
1367
1404
|
uploadAvatar: (file: Blob) => Promise<boolean>;
|
|
1368
1405
|
busy: boolean;
|
|
1369
1406
|
actionError: RelayError | null;
|
|
1407
|
+
retry: () => Promise<boolean>;
|
|
1408
|
+
settle: () => boolean;
|
|
1370
1409
|
status: "loading";
|
|
1371
1410
|
data: undefined;
|
|
1372
1411
|
error: null;
|
|
@@ -1377,6 +1416,8 @@ declare function useMyProfile(): {
|
|
|
1377
1416
|
uploadAvatar: (file: Blob) => Promise<boolean>;
|
|
1378
1417
|
busy: boolean;
|
|
1379
1418
|
actionError: RelayError | null;
|
|
1419
|
+
retry: () => Promise<boolean>;
|
|
1420
|
+
settle: () => boolean;
|
|
1380
1421
|
status: "error";
|
|
1381
1422
|
data: undefined;
|
|
1382
1423
|
error: RelayError;
|
|
@@ -1387,6 +1428,8 @@ declare function useMyProfile(): {
|
|
|
1387
1428
|
uploadAvatar: (file: Blob) => Promise<boolean>;
|
|
1388
1429
|
busy: boolean;
|
|
1389
1430
|
actionError: RelayError | null;
|
|
1431
|
+
retry: () => Promise<boolean>;
|
|
1432
|
+
settle: () => boolean;
|
|
1390
1433
|
status: "signed-out";
|
|
1391
1434
|
data: undefined;
|
|
1392
1435
|
error: null;
|
|
@@ -1397,6 +1440,8 @@ declare function useMyProfile(): {
|
|
|
1397
1440
|
uploadAvatar: (file: Blob) => Promise<boolean>;
|
|
1398
1441
|
busy: boolean;
|
|
1399
1442
|
actionError: RelayError | null;
|
|
1443
|
+
retry: () => Promise<boolean>;
|
|
1444
|
+
settle: () => boolean;
|
|
1400
1445
|
status: "ready";
|
|
1401
1446
|
data: {
|
|
1402
1447
|
id: string;
|
|
@@ -1562,7 +1607,149 @@ declare function useQuestOutcomes(query?: Omit<QuestOutcomeQuery, "cursor">): Me
|
|
|
1562
1607
|
declare function useOffers(): Query<Offer[]>;
|
|
1563
1608
|
/** Redeem an offer, then refresh offers and point balances. */
|
|
1564
1609
|
declare function useRedeemOffer(): {
|
|
1565
|
-
redeem: (offer: string) => Promise<
|
|
1610
|
+
redeem: (offer: string) => Promise<{
|
|
1611
|
+
status: "fulfilled";
|
|
1612
|
+
id: string;
|
|
1613
|
+
offer: string;
|
|
1614
|
+
member: string;
|
|
1615
|
+
reservation: string;
|
|
1616
|
+
price: {
|
|
1617
|
+
kind: "points";
|
|
1618
|
+
balance: string;
|
|
1619
|
+
amount: number;
|
|
1620
|
+
};
|
|
1621
|
+
reward: {
|
|
1622
|
+
kind: "tier";
|
|
1623
|
+
reward: {
|
|
1624
|
+
id: string;
|
|
1625
|
+
title: string;
|
|
1626
|
+
tiers: {
|
|
1627
|
+
id: string;
|
|
1628
|
+
title: string;
|
|
1629
|
+
}[];
|
|
1630
|
+
inventory: {
|
|
1631
|
+
kind: "untracked";
|
|
1632
|
+
};
|
|
1633
|
+
fulfillment: {
|
|
1634
|
+
kind: "staff-handover";
|
|
1635
|
+
} | {
|
|
1636
|
+
kind: "automatic";
|
|
1637
|
+
};
|
|
1638
|
+
};
|
|
1639
|
+
tier: string;
|
|
1640
|
+
};
|
|
1641
|
+
entitlement: string;
|
|
1642
|
+
revision: number;
|
|
1643
|
+
redeemedAt: number;
|
|
1644
|
+
} | {
|
|
1645
|
+
status: "canceled";
|
|
1646
|
+
canceledAt: number;
|
|
1647
|
+
reason: string;
|
|
1648
|
+
id: string;
|
|
1649
|
+
offer: string;
|
|
1650
|
+
member: string;
|
|
1651
|
+
reservation: string;
|
|
1652
|
+
price: {
|
|
1653
|
+
kind: "points";
|
|
1654
|
+
balance: string;
|
|
1655
|
+
amount: number;
|
|
1656
|
+
};
|
|
1657
|
+
reward: {
|
|
1658
|
+
kind: "tier";
|
|
1659
|
+
reward: {
|
|
1660
|
+
id: string;
|
|
1661
|
+
title: string;
|
|
1662
|
+
tiers: {
|
|
1663
|
+
id: string;
|
|
1664
|
+
title: string;
|
|
1665
|
+
}[];
|
|
1666
|
+
inventory: {
|
|
1667
|
+
kind: "untracked";
|
|
1668
|
+
};
|
|
1669
|
+
fulfillment: {
|
|
1670
|
+
kind: "staff-handover";
|
|
1671
|
+
} | {
|
|
1672
|
+
kind: "automatic";
|
|
1673
|
+
};
|
|
1674
|
+
};
|
|
1675
|
+
tier: string;
|
|
1676
|
+
};
|
|
1677
|
+
entitlement: string;
|
|
1678
|
+
revision: number;
|
|
1679
|
+
redeemedAt: number;
|
|
1680
|
+
} | null>;
|
|
1681
|
+
retry: () => Promise<{
|
|
1682
|
+
status: "fulfilled";
|
|
1683
|
+
id: string;
|
|
1684
|
+
offer: string;
|
|
1685
|
+
member: string;
|
|
1686
|
+
reservation: string;
|
|
1687
|
+
price: {
|
|
1688
|
+
kind: "points";
|
|
1689
|
+
balance: string;
|
|
1690
|
+
amount: number;
|
|
1691
|
+
};
|
|
1692
|
+
reward: {
|
|
1693
|
+
kind: "tier";
|
|
1694
|
+
reward: {
|
|
1695
|
+
id: string;
|
|
1696
|
+
title: string;
|
|
1697
|
+
tiers: {
|
|
1698
|
+
id: string;
|
|
1699
|
+
title: string;
|
|
1700
|
+
}[];
|
|
1701
|
+
inventory: {
|
|
1702
|
+
kind: "untracked";
|
|
1703
|
+
};
|
|
1704
|
+
fulfillment: {
|
|
1705
|
+
kind: "staff-handover";
|
|
1706
|
+
} | {
|
|
1707
|
+
kind: "automatic";
|
|
1708
|
+
};
|
|
1709
|
+
};
|
|
1710
|
+
tier: string;
|
|
1711
|
+
};
|
|
1712
|
+
entitlement: string;
|
|
1713
|
+
revision: number;
|
|
1714
|
+
redeemedAt: number;
|
|
1715
|
+
} | {
|
|
1716
|
+
status: "canceled";
|
|
1717
|
+
canceledAt: number;
|
|
1718
|
+
reason: string;
|
|
1719
|
+
id: string;
|
|
1720
|
+
offer: string;
|
|
1721
|
+
member: string;
|
|
1722
|
+
reservation: string;
|
|
1723
|
+
price: {
|
|
1724
|
+
kind: "points";
|
|
1725
|
+
balance: string;
|
|
1726
|
+
amount: number;
|
|
1727
|
+
};
|
|
1728
|
+
reward: {
|
|
1729
|
+
kind: "tier";
|
|
1730
|
+
reward: {
|
|
1731
|
+
id: string;
|
|
1732
|
+
title: string;
|
|
1733
|
+
tiers: {
|
|
1734
|
+
id: string;
|
|
1735
|
+
title: string;
|
|
1736
|
+
}[];
|
|
1737
|
+
inventory: {
|
|
1738
|
+
kind: "untracked";
|
|
1739
|
+
};
|
|
1740
|
+
fulfillment: {
|
|
1741
|
+
kind: "staff-handover";
|
|
1742
|
+
} | {
|
|
1743
|
+
kind: "automatic";
|
|
1744
|
+
};
|
|
1745
|
+
};
|
|
1746
|
+
tier: string;
|
|
1747
|
+
};
|
|
1748
|
+
entitlement: string;
|
|
1749
|
+
revision: number;
|
|
1750
|
+
redeemedAt: number;
|
|
1751
|
+
} | null>;
|
|
1752
|
+
settle: () => boolean;
|
|
1566
1753
|
busy: boolean;
|
|
1567
1754
|
error: RelayError | null;
|
|
1568
1755
|
};
|
|
@@ -1584,4 +1771,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
|
|
|
1584
1771
|
*/
|
|
1585
1772
|
declare function useTieredRewards(): Query<TieredRewardReference[]>;
|
|
1586
1773
|
|
|
1587
|
-
export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberSnapshot, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, RelayClient, RelayProvider, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayPages, useRelayQuery, useSession, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };
|
|
1774
|
+
export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberSnapshot, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, type RelayActionResult, RelayClient, RelayProvider, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayPages, useRelayQuery, useSession, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };
|