@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
|
@@ -1,47 +1,57 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y322OTCH.js";
|
|
5
5
|
import {
|
|
6
|
+
setPluginTransport
|
|
7
|
+
} from "./chunk-6WCIWXUV.js";
|
|
8
|
+
import {
|
|
9
|
+
authProvidersSchema,
|
|
6
10
|
collectionPassSchema,
|
|
11
|
+
consentInputSchema,
|
|
7
12
|
creatorAccountProviderSchema,
|
|
8
13
|
creatorAccountsSchema,
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
memberConsentListSchema,
|
|
15
|
+
memberConsentSchema,
|
|
11
16
|
participantDeliveriesSchema,
|
|
12
17
|
participantEntitlementsSchema,
|
|
13
18
|
questClaimInputSchema,
|
|
14
19
|
questEnrollmentInputSchema,
|
|
15
20
|
questEnrollmentSchema,
|
|
16
|
-
questExperienceSchema,
|
|
17
21
|
questOutcomePageSchema,
|
|
18
22
|
questOutcomeQuerySchema,
|
|
19
23
|
questOutcomeSchema,
|
|
20
24
|
rewardDeliveriesSchema,
|
|
21
25
|
rewardDeliveryQuerySchema
|
|
22
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CICDIBOF.js";
|
|
27
|
+
import {
|
|
28
|
+
participantActivityQuerySchema,
|
|
29
|
+
participantActivitySchema,
|
|
30
|
+
questExperienceSchema
|
|
31
|
+
} from "./chunk-D26YNACF.js";
|
|
23
32
|
import {
|
|
24
|
-
badgeSchema,
|
|
25
33
|
engagementBoundaryPageSchema,
|
|
26
34
|
engagementPageQuerySchema,
|
|
27
35
|
engagementPageSchema,
|
|
28
|
-
leaderboardDefinitionResponseSchema,
|
|
29
|
-
leaderboardHistoryPageSchema,
|
|
30
|
-
leaderboardHistoryQuerySchema,
|
|
31
|
-
leaderboardPageSchema,
|
|
32
|
-
leaderboardPlacementSchema,
|
|
33
|
-
leaderboardQuerySchema,
|
|
34
|
-
memberBadgesSchema,
|
|
35
36
|
offerSchema,
|
|
36
37
|
redemptionSchema,
|
|
37
38
|
referralAcceptSchema,
|
|
38
39
|
referralDefinitionSchema,
|
|
39
40
|
referralHistorySchema,
|
|
40
41
|
referralSummarySchema
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GTDW453U.js";
|
|
42
43
|
import {
|
|
43
44
|
AVATAR_UPLOAD_LIMIT,
|
|
44
45
|
avatarUploadTypes,
|
|
46
|
+
badgeCatalogSchema,
|
|
47
|
+
badgeSchema,
|
|
48
|
+
leaderboardDefinitionResponseSchema,
|
|
49
|
+
leaderboardHistoryPageSchema,
|
|
50
|
+
leaderboardHistoryQuerySchema,
|
|
51
|
+
leaderboardPageSchema,
|
|
52
|
+
leaderboardPlacementSchema,
|
|
53
|
+
leaderboardQuerySchema,
|
|
54
|
+
memberBadgesSchema,
|
|
45
55
|
ownProfileSchema,
|
|
46
56
|
pointBalancesSchema,
|
|
47
57
|
pointHistoryPageSchema,
|
|
@@ -52,66 +62,65 @@ import {
|
|
|
52
62
|
profileReferralSchema,
|
|
53
63
|
profileSummarySchema,
|
|
54
64
|
profileUpdateSchema
|
|
55
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WSBYWVTZ.js";
|
|
56
66
|
import {
|
|
57
67
|
PARTICIPANT_TIMEOUT,
|
|
68
|
+
clientIdentity,
|
|
58
69
|
lifetime,
|
|
59
70
|
retryAfter,
|
|
60
71
|
retrying,
|
|
61
72
|
validTimeout
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import {
|
|
64
|
-
clientIdentity
|
|
65
|
-
} from "./chunk-N7YOS4ZU.js";
|
|
73
|
+
} from "./chunk-3PYYGFSB.js";
|
|
66
74
|
import {
|
|
67
75
|
exchangeResultSchema,
|
|
68
76
|
exchangeSchema,
|
|
69
77
|
memberSummarySchema,
|
|
70
78
|
participantSessionSchema,
|
|
71
79
|
sessionMember
|
|
72
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-XJFYAXET.js";
|
|
73
81
|
import {
|
|
74
|
-
RelayError,
|
|
75
|
-
RelayErrorCode,
|
|
76
82
|
accountConnectionSchema,
|
|
77
83
|
attemptSchema,
|
|
78
|
-
authProviderSchema,
|
|
79
84
|
campaignEnrollmentInputSchema,
|
|
80
85
|
campaignEnrollmentSchema,
|
|
81
86
|
campaignWithdrawalInputSchema,
|
|
82
|
-
clientError,
|
|
83
87
|
contentPerformancePageSchema,
|
|
84
88
|
contentPerformanceQuerySchema,
|
|
85
89
|
contentQualificationPageSchema,
|
|
86
90
|
contentQualificationQuerySchema,
|
|
87
91
|
evidenceSchema,
|
|
88
92
|
identifier,
|
|
89
|
-
isRelayError,
|
|
90
|
-
isRequestError,
|
|
91
93
|
knownResponse,
|
|
92
94
|
linkedWalletSchema,
|
|
93
95
|
memberProgressSchema,
|
|
94
96
|
missingPrerequisiteSchema,
|
|
95
97
|
pageQuerySchema,
|
|
96
|
-
parseInput,
|
|
97
98
|
questSubmissionResultSchema,
|
|
98
99
|
questSubmissionSchema,
|
|
99
100
|
quizEvidenceSchema,
|
|
101
|
+
signInAccountSchema,
|
|
102
|
+
signInProviderInputSchema,
|
|
100
103
|
submissionEvidenceSchema,
|
|
101
104
|
submitSchema,
|
|
102
105
|
telegramAccountConnectionSchema,
|
|
103
106
|
telegramMiniAppSignInSchema,
|
|
104
|
-
telegramSignInMethodsSchema,
|
|
105
107
|
tieredRewardReferenceSchema,
|
|
106
108
|
validateSubmissionValue,
|
|
107
109
|
valueEvidenceSchema,
|
|
108
110
|
walletAddressInput,
|
|
109
111
|
walletAddressInputSchema,
|
|
110
112
|
walletMessageChallengeSchema,
|
|
111
|
-
walletSignInNetworksSchema,
|
|
112
113
|
walletSignatureSchema,
|
|
113
114
|
walletUnlinkInputSchema
|
|
114
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-MK425RXJ.js";
|
|
116
|
+
import {
|
|
117
|
+
RelayError,
|
|
118
|
+
RelayErrorCode,
|
|
119
|
+
clientError,
|
|
120
|
+
isRelayError,
|
|
121
|
+
isRequestError,
|
|
122
|
+
parseInput
|
|
123
|
+
} from "./chunk-K2KS3JLY.js";
|
|
115
124
|
|
|
116
125
|
// src/legacy-submissions.ts
|
|
117
126
|
import * as z from "zod";
|
|
@@ -1113,7 +1122,7 @@ function questActions(submission, latest) {
|
|
|
1113
1122
|
|
|
1114
1123
|
// src/client.ts
|
|
1115
1124
|
var authStartSchema = z2.strictObject({
|
|
1116
|
-
provider:
|
|
1125
|
+
provider: signInProviderInputSchema,
|
|
1117
1126
|
mode: z2.enum(["sign-in", "connect"])
|
|
1118
1127
|
});
|
|
1119
1128
|
var emailVerificationSchema = z2.strictObject({
|
|
@@ -1593,7 +1602,26 @@ function relayClient(options) {
|
|
|
1593
1602
|
}
|
|
1594
1603
|
const ok = z2.object({ ok: z2.literal(true) });
|
|
1595
1604
|
const acknowledged = z2.object({ ok: z2.boolean() });
|
|
1596
|
-
|
|
1605
|
+
const pluginProofSchema = z2.string().min(1, "Pass the vendor's signed proof").max(8192);
|
|
1606
|
+
const signInMethod = (path, field) => {
|
|
1607
|
+
const body2 = (proof, mode) => ({
|
|
1608
|
+
[field]: parseInput(pluginProofSchema, proof),
|
|
1609
|
+
mode
|
|
1610
|
+
});
|
|
1611
|
+
return {
|
|
1612
|
+
signIn: (proof, requestOptions) => changeSession(
|
|
1613
|
+
() => request(path, participantSessionSchema, {
|
|
1614
|
+
json: body2(proof, "sign-in"),
|
|
1615
|
+
options: requestOptions
|
|
1616
|
+
})
|
|
1617
|
+
),
|
|
1618
|
+
connect: async (proof, requestOptions) => request(path, acknowledged, {
|
|
1619
|
+
json: body2(proof, "connect"),
|
|
1620
|
+
options: requestOptions
|
|
1621
|
+
})
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
const client = {
|
|
1597
1625
|
/** Owns one action key across uncertain writes. Reuse the helper until a definite answer. */
|
|
1598
1626
|
action: createRelayAction,
|
|
1599
1627
|
/** A JSON call using an explicit tolerant response schema from `@domino-sdk/relay/schema`. */
|
|
@@ -1682,7 +1710,17 @@ function relayClient(options) {
|
|
|
1682
1710
|
})
|
|
1683
1711
|
},
|
|
1684
1712
|
badges: {
|
|
1685
|
-
|
|
1713
|
+
/**
|
|
1714
|
+
* The project's active badge catalog, as an array.
|
|
1715
|
+
*
|
|
1716
|
+
* @deprecated Use `catalog`, which answers `{ items }` like `me.badges`. Removed in 2.0.0.
|
|
1717
|
+
*/
|
|
1718
|
+
list: (options2) => request("/v1/badges", z2.array(badgeSchema), { options: options2 }),
|
|
1719
|
+
/**
|
|
1720
|
+
* The project's active badge catalog, oldest definition first, in `items`. Archived badges
|
|
1721
|
+
* are left out. Open to signed-out visitors.
|
|
1722
|
+
*/
|
|
1723
|
+
catalog: (options2) => request("/v1/badges/catalog", badgeCatalogSchema, { options: options2 })
|
|
1686
1724
|
},
|
|
1687
1725
|
pointLedgers: {
|
|
1688
1726
|
/**
|
|
@@ -1925,6 +1963,34 @@ function relayClient(options) {
|
|
|
1925
1963
|
);
|
|
1926
1964
|
}
|
|
1927
1965
|
},
|
|
1966
|
+
/**
|
|
1967
|
+
* The signed-in member's marketing consent, per channel. The app shows the checkbox and sends
|
|
1968
|
+
* the wording beside it; Relay records the choice with its own time, and only members who
|
|
1969
|
+
* opted in reach the project's destinations.
|
|
1970
|
+
*
|
|
1971
|
+
* @experimental A minor release can change the consent API.
|
|
1972
|
+
*/
|
|
1973
|
+
consent: {
|
|
1974
|
+
/**
|
|
1975
|
+
* The member's current consent on each channel they chose on. A channel missing from the
|
|
1976
|
+
* list has no record, which is not the same as withdrawn.
|
|
1977
|
+
*/
|
|
1978
|
+
get: (requestOptions) => request("/v1/me/consent", memberConsentListSchema, {
|
|
1979
|
+
options: requestOptions
|
|
1980
|
+
}),
|
|
1981
|
+
/**
|
|
1982
|
+
* Grants (`granted: true`, with the `wording` the member saw) or withdraws one channel.
|
|
1983
|
+
* Repeating the current state and wording records nothing and answers the current state.
|
|
1984
|
+
*/
|
|
1985
|
+
set: async (value, requestOptions) => {
|
|
1986
|
+
const body2 = parseInput(consentInputSchema, withActionId(value));
|
|
1987
|
+
return request("/v1/me/consent", memberConsentSchema, {
|
|
1988
|
+
json: body2,
|
|
1989
|
+
options: requestOptions,
|
|
1990
|
+
operationId: body2.actionId
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1928
1994
|
/** The signed-in member's linked Solana, EVM and Cosmos wallets for this project. */
|
|
1929
1995
|
wallets: {
|
|
1930
1996
|
list: (requestOptions) => request(
|
|
@@ -1979,27 +2045,9 @@ function relayClient(options) {
|
|
|
1979
2045
|
}
|
|
1980
2046
|
},
|
|
1981
2047
|
auth: {
|
|
1982
|
-
providers: (requestOptions) => request(
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
providers: z2.array(
|
|
1986
|
-
z2.object({
|
|
1987
|
-
provider: authProviderSchema,
|
|
1988
|
-
configured: z2.boolean()
|
|
1989
|
-
})
|
|
1990
|
-
),
|
|
1991
|
-
email: z2.boolean(),
|
|
1992
|
-
/** The wallet sign-in this project enabled. */
|
|
1993
|
-
wallets: walletSignInNetworksSchema,
|
|
1994
|
-
demo: z2.boolean(),
|
|
1995
|
-
/**
|
|
1996
|
-
* Telegram's sign-in, which is not one of `providers` in SDK 1.x. Absent from Relay
|
|
1997
|
-
* versions without Telegram.
|
|
1998
|
-
*/
|
|
1999
|
-
telegram: telegramSignInMethodsSchema.optional()
|
|
2000
|
-
}),
|
|
2001
|
-
{ options: requestOptions }
|
|
2002
|
-
),
|
|
2048
|
+
providers: (requestOptions) => request("/v1/auth/providers", authProvidersSchema, {
|
|
2049
|
+
options: requestOptions
|
|
2050
|
+
}),
|
|
2003
2051
|
start: authStart,
|
|
2004
2052
|
emailStart: async (email2, requestOptions) => request("/v1/auth/email/start", z2.object({ challenge: z2.string() }), {
|
|
2005
2053
|
json: {
|
|
@@ -2064,12 +2112,15 @@ function relayClient(options) {
|
|
|
2064
2112
|
},
|
|
2065
2113
|
/**
|
|
2066
2114
|
* Telegram sign-in and the member's Telegram account. Telegram is not an `AuthProvider` in
|
|
2067
|
-
* SDK 1.x, so `accounts()`, `start()` and `disconnect()`
|
|
2115
|
+
* SDK 1.x, so `accounts()` leaves it out; `signInAccounts()`, `start()` and `disconnect()`
|
|
2116
|
+
* take it like any other sign-in provider. Mini App sign-in is Telegram's own.
|
|
2068
2117
|
*/
|
|
2069
2118
|
telegram: {
|
|
2070
2119
|
/**
|
|
2071
2120
|
* Leaves for Telegram Login when the platform configured it (`providers().telegram.login`):
|
|
2072
2121
|
* `"sign-in"` signs in, or signs up; `"connect"` links Telegram to the signed-in member.
|
|
2122
|
+
*
|
|
2123
|
+
* @deprecated Use `auth.start({ provider: "telegram", mode })`. Removed in 2.0.0.
|
|
2073
2124
|
*/
|
|
2074
2125
|
start: async (mode, requestOptions) => request("/v1/auth/start", z2.object({ url: z2.string() }), {
|
|
2075
2126
|
json: {
|
|
@@ -2078,13 +2129,21 @@ function relayClient(options) {
|
|
|
2078
2129
|
},
|
|
2079
2130
|
options: requestOptions
|
|
2080
2131
|
}),
|
|
2081
|
-
/**
|
|
2132
|
+
/**
|
|
2133
|
+
* The member's Telegram account.
|
|
2134
|
+
*
|
|
2135
|
+
* @deprecated Use the `"telegram"` entry of `auth.signInAccounts()`. Removed in 2.0.0.
|
|
2136
|
+
*/
|
|
2082
2137
|
account: (requestOptions) => request(
|
|
2083
2138
|
"/v1/auth/accounts/telegram",
|
|
2084
2139
|
telegramAccountConnectionSchema,
|
|
2085
2140
|
{ options: requestOptions }
|
|
2086
2141
|
),
|
|
2087
|
-
/**
|
|
2142
|
+
/**
|
|
2143
|
+
* Unlinks the member's Telegram account, as `disconnect()` does for the other providers.
|
|
2144
|
+
*
|
|
2145
|
+
* @deprecated Use `auth.disconnect("telegram")`. Removed in 2.0.0.
|
|
2146
|
+
*/
|
|
2088
2147
|
disconnect: async (requestOptions) => request("/v1/auth/accounts/disconnect", acknowledged, {
|
|
2089
2148
|
json: { provider: "telegram" },
|
|
2090
2149
|
options: requestOptions
|
|
@@ -2094,6 +2153,9 @@ function relayClient(options) {
|
|
|
2094
2153
|
* (`providers().telegram.miniApp`). Pass the Mini App's signed launch data,
|
|
2095
2154
|
* `telegramMiniAppInitData()`. Relay checks Telegram's signature for the project's bot and
|
|
2096
2155
|
* accepts launch data at most five minutes old, once.
|
|
2156
|
+
*
|
|
2157
|
+
* @deprecated Use `relay.telegram.miniApp` from `@domino-sdk/relay/telegram`
|
|
2158
|
+
* (`withTelegram(relay)`). Removed in 2.0.0.
|
|
2097
2159
|
*/
|
|
2098
2160
|
miniApp: {
|
|
2099
2161
|
/** Signs in, or signs up, as the Telegram user who opened the Mini App. */
|
|
@@ -2144,12 +2206,20 @@ function relayClient(options) {
|
|
|
2144
2206
|
options: requestOptions
|
|
2145
2207
|
})
|
|
2146
2208
|
},
|
|
2147
|
-
/** The member's connected sign-in accounts, one per
|
|
2209
|
+
/** The member's connected sign-in accounts, one per `AuthProvider`. */
|
|
2148
2210
|
accounts: (requestOptions) => request("/v1/auth/accounts", z2.array(accountConnectionSchema), {
|
|
2149
2211
|
options: requestOptions
|
|
2150
2212
|
}),
|
|
2213
|
+
/**
|
|
2214
|
+
* The member's account on every sign-in provider the platform has, one entry each, Telegram
|
|
2215
|
+
* included: `accounts()` with an open `provider`, as `providers().signInProviders` lists them.
|
|
2216
|
+
*/
|
|
2217
|
+
signInAccounts: (requestOptions) => request("/v1/auth/sign-in-accounts", z2.array(signInAccountSchema), {
|
|
2218
|
+
options: requestOptions
|
|
2219
|
+
}),
|
|
2220
|
+
/** Unlinks the member's account on `provider`, any of `signInAccounts()`'s. */
|
|
2151
2221
|
disconnect: async (provider, requestOptions) => request("/v1/auth/accounts/disconnect", acknowledged, {
|
|
2152
|
-
json: { provider: parseInput(
|
|
2222
|
+
json: { provider: parseInput(signInProviderInputSchema, provider) },
|
|
2153
2223
|
options: requestOptions
|
|
2154
2224
|
}),
|
|
2155
2225
|
session: (requestOptions) => readSession(requestOptions),
|
|
@@ -2159,7 +2229,13 @@ function relayClient(options) {
|
|
|
2159
2229
|
options: requestOptions
|
|
2160
2230
|
})
|
|
2161
2231
|
),
|
|
2162
|
-
/**
|
|
2232
|
+
/**
|
|
2233
|
+
* @deprecated `POST /v1/auth/exchange` refuses this body with 400: the route takes
|
|
2234
|
+
* `{ subject, accounts?, previousToken? }` with an identity integration server key as the
|
|
2235
|
+
* bearer, which a participant client does not hold. A server signs a user in with
|
|
2236
|
+
* `exchangeParticipant` from `@domino-sdk/relay/portal-proxy`; a hosted app proxies with
|
|
2237
|
+
* `createParticipantBackend` from the same entry. Removed in 2.0.0.
|
|
2238
|
+
*/
|
|
2163
2239
|
exchange: async (value, requestOptions) => request("/v1/auth/exchange", exchangeResultSchema, {
|
|
2164
2240
|
json: parseInput(exchangeSchema, value),
|
|
2165
2241
|
options: requestOptions
|
|
@@ -2168,6 +2244,12 @@ function relayClient(options) {
|
|
|
2168
2244
|
me: {
|
|
2169
2245
|
badges: (options2) => request("/v1/me/badges", memberBadgesSchema, { options: options2 }),
|
|
2170
2246
|
activity: {
|
|
2247
|
+
/**
|
|
2248
|
+
* One page of the signed-in member's activity feed, oldest event first. A feed never
|
|
2249
|
+
* ends: every page, even an empty one, answers a `nextCursor` to read from next, so a
|
|
2250
|
+
* loop such as `paginate` never finishes on its own. Stop when a page comes back empty
|
|
2251
|
+
* or after as many events as you need, or follow the feed with `observe`.
|
|
2252
|
+
*/
|
|
2171
2253
|
list: async (query = {}, options2) => {
|
|
2172
2254
|
const parsed = parseInput(participantActivityQuerySchema, query);
|
|
2173
2255
|
return request(
|
|
@@ -2229,7 +2311,12 @@ function relayClient(options) {
|
|
|
2229
2311
|
* The signed-in member, the seed of their generated avatar (`defaultAvatar(avatarSeed)`), and
|
|
2230
2312
|
* their own verified sign-in email addresses: `email` (or null) and `emails`.
|
|
2231
2313
|
*/
|
|
2232
|
-
get: async (requestOptions) =>
|
|
2314
|
+
get: async (requestOptions) => {
|
|
2315
|
+
const me = await request("/v1/me", memberSummarySchema, {
|
|
2316
|
+
options: requestOptions
|
|
2317
|
+
});
|
|
2318
|
+
return { ...me, clock: me.clock ?? { now: Date.now(), offsetMs: 0 } };
|
|
2319
|
+
},
|
|
2233
2320
|
observeProgress: (listener, observeOptions) => {
|
|
2234
2321
|
const observer = observeProgress(
|
|
2235
2322
|
{
|
|
@@ -2396,6 +2483,8 @@ function relayClient(options) {
|
|
|
2396
2483
|
)
|
|
2397
2484
|
}
|
|
2398
2485
|
};
|
|
2486
|
+
setPluginTransport(client, { signInMethod });
|
|
2487
|
+
return client;
|
|
2399
2488
|
}
|
|
2400
2489
|
|
|
2401
2490
|
export {
|