@domino-sdk/relay 1.11.0 → 1.14.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/README.md +1 -0
- package/build.mjs +15 -0
- package/dist/accounts-5ciAkCMP.d.ts +147 -0
- package/dist/{activity-CNiPDPK6.d.ts → activity-D_R3J-gU.d.ts} +115 -115
- package/dist/attempt-captures-DZldPZJc.d.ts +285 -0
- package/dist/authoring.d.ts +49 -47
- package/dist/authoring.js +8 -6
- package/dist/{automatic-outcomes-kPIDv6X_.d.ts → automatic-outcomes-6lJGnSDe.d.ts} +1 -1
- package/dist/browser.d.ts +8 -7
- package/dist/browser.js +9 -8
- package/dist/capability-error-oTd3eYFH.d.ts +151 -0
- package/dist/chunk-2UAVZCMH.js +314 -0
- package/dist/{chunk-GXT4S5IK.js → chunk-46C33ASD.js} +37 -4
- package/dist/{chunk-ULU5ZF6R.js → chunk-4OLQYRSA.js} +1 -1
- package/dist/chunk-5TS3OAWS.js +470 -0
- package/dist/{chunk-CFTTECZZ.js → chunk-6DD7DVNQ.js} +2 -2
- package/dist/{chunk-DG4QQUH7.js → chunk-C3CB4WIQ.js} +1 -1
- package/dist/{chunk-GKTD36JW.js → chunk-LLMJ2SUT.js} +7 -3
- package/dist/chunk-NIYCAW2I.js +79 -0
- package/dist/{chunk-TV2GYBDZ.js → chunk-PT5STHFH.js} +1 -1
- package/dist/chunk-UJACD6K2.js +987 -0
- package/dist/{chunk-U4KTGJWU.js → chunk-VBHFJH3P.js} +82 -30
- package/dist/chunk-W335CWYJ.js +53 -0
- package/dist/{chunk-7JHREQ2D.js → chunk-XMBM2XD5.js} +1 -1
- package/dist/{chunk-FISNMJN3.js → chunk-ZGH6NEG6.js} +1 -1
- package/dist/{chunk-UIBDEAP2.js → chunk-ZLYBUM7K.js} +158 -59
- package/dist/{client-Dz14Kuu8.d.ts → client-BTd_CyX3.d.ts} +26 -6
- package/dist/{groups-BK8ts2yK.d.ts → groups-4Jb3uYFO.d.ts} +1 -1
- package/dist/{images-aw6W7vFZ.d.ts → images-D5kpqHxv.d.ts} +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +10 -8
- package/dist/{capability-error-ty3SqD_b.d.ts → integrations-Cr9EhGI_.d.ts} +1 -149
- package/dist/internal.d.ts +32 -5
- package/dist/internal.js +12 -7
- package/dist/{offers-C2FANzrG.d.ts → offers-BFI5t-e-.d.ts} +2 -2
- package/dist/{pages-tSpttGrI.d.ts → pages-nIoMT9J3.d.ts} +2 -1
- package/dist/{participant-activity-DkL3nY5a.d.ts → participant-activity-DYdUUhw2.d.ts} +1 -0
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +246 -177
- package/dist/react/index.js +956 -385
- package/dist/{referral-reward-kinds-M3f0PdiR.d.ts → referral-reward-kinds-DnvQXL8L.d.ts} +100 -3
- package/dist/{schema-DEM8y8Fm.d.ts → schema-K-Pg5lPz.d.ts} +1 -1
- package/dist/schema.d.ts +316 -314
- package/dist/schema.js +19 -17
- package/dist/server/index.d.ts +2546 -377
- package/dist/server/index.js +973 -987
- package/dist/{sign-in-options-rPCsFr7w.d.ts → sign-in-options-DBjMzgnu.d.ts} +2 -2
- package/dist/submission-input-CPIsJt-_.d.ts +146 -0
- package/dist/testing.d.ts +641 -0
- package/dist/testing.js +1282 -0
- package/package.json +6 -2
- package/dist/chunk-DJOGMLYT.js +0 -171
- package/dist/chunk-KLF7XABH.js +0 -1295
- package/dist/submission-input-BbBJTVlT.d.ts +0 -290
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-
|
|
2
|
-
import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, _ as questExperienceSchema, l as RewardDeliveryAction, F as contentQualificationQuerySchema } from './pages-
|
|
3
|
-
import { M as MissingPrerequisite, V as ValueEvidence
|
|
1
|
+
import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-4Jb3uYFO.js';
|
|
2
|
+
import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, _ as questExperienceSchema, l as RewardDeliveryAction, F as contentQualificationQuerySchema } from './pages-nIoMT9J3.js';
|
|
3
|
+
import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-CPIsJt-_.js';
|
|
4
4
|
import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-D_dUPLwo.js';
|
|
5
|
-
import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, c6 as submitSchema, b8 as contentPerformanceQuerySchema } from './schema-
|
|
6
|
-
import { b as ParticipantSession, d as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-
|
|
5
|
+
import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, c6 as submitSchema, b8 as contentPerformanceQuerySchema } from './schema-K-Pg5lPz.js';
|
|
6
|
+
import { b as ParticipantSession, d as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-DYdUUhw2.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { c as createRelayAction, O as OptionalActionId } from './action-9Xl0StBg.js';
|
|
9
|
+
import { a as AuthProvider } from './accounts-5ciAkCMP.js';
|
|
9
10
|
import { F as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-BHMVj0kM.js';
|
|
10
11
|
import { y as walletAddressInputSchema, I as walletSignatureSchema, L as LinkedWallet, f as WalletSigner } from './wallet-CDyo-U4n.js';
|
|
11
12
|
|
|
@@ -3174,6 +3175,8 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3174
3175
|
observe: (listener: (value: ProgressObservation<z.infer<typeof questExperienceSchema>>) => void, observeOptions?: {
|
|
3175
3176
|
intervalMs?: number;
|
|
3176
3177
|
maxBackoffMs?: number;
|
|
3178
|
+
/** The wait after a first failure, doubling up to `maxBackoffMs`. */
|
|
3179
|
+
retryMs?: number;
|
|
3177
3180
|
}) => ProgressObserver;
|
|
3178
3181
|
};
|
|
3179
3182
|
campaigns: {
|
|
@@ -3392,6 +3395,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3392
3395
|
activity: {
|
|
3393
3396
|
list: (query?: {
|
|
3394
3397
|
cursor?: string;
|
|
3398
|
+
start?: "latest";
|
|
3395
3399
|
limit?: number;
|
|
3396
3400
|
}, options?: RelayRequestOptions) => Promise<{
|
|
3397
3401
|
member: string;
|
|
@@ -3460,6 +3464,14 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3460
3464
|
}>;
|
|
3461
3465
|
observe: (listener: (event: RelayEvent) => void, options?: {
|
|
3462
3466
|
cursor?: string;
|
|
3467
|
+
/**
|
|
3468
|
+
* Where to begin without a `cursor`, including after the session changes (the cursor
|
|
3469
|
+
* resets then): from the first event (the default), or `latest` to receive only events
|
|
3470
|
+
* that happen from now on.
|
|
3471
|
+
*/
|
|
3472
|
+
start?: "latest";
|
|
3473
|
+
/** The member's session, already read: the first poll reads the feed straight away. */
|
|
3474
|
+
session?: ParticipantSession;
|
|
3463
3475
|
intervalMs?: number;
|
|
3464
3476
|
maxBackoffMs?: number;
|
|
3465
3477
|
onState?: (state: ProgressObservation<ParticipantActivity>) => void;
|
|
@@ -3473,6 +3485,8 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3473
3485
|
observeProgress: (listener: (value: ProgressObservation) => void, observeOptions?: {
|
|
3474
3486
|
intervalMs?: number;
|
|
3475
3487
|
maxBackoffMs?: number;
|
|
3488
|
+
/** The wait after a first failure, doubling up to `maxBackoffMs`. */
|
|
3489
|
+
retryMs?: number;
|
|
3476
3490
|
}) => ProgressObserver;
|
|
3477
3491
|
submission: {
|
|
3478
3492
|
(quest: string, options?: {
|
|
@@ -3483,7 +3497,13 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
3483
3497
|
}): Promise<PhotoSubmission>;
|
|
3484
3498
|
(quest: string, options: {
|
|
3485
3499
|
input: "quiz";
|
|
3486
|
-
release
|
|
3500
|
+
release
|
|
3501
|
+
/**
|
|
3502
|
+
* Options every participant client method takes as its last argument.
|
|
3503
|
+
*
|
|
3504
|
+
* @compat input
|
|
3505
|
+
*/
|
|
3506
|
+
?: string;
|
|
3487
3507
|
recoverPrevious?: boolean;
|
|
3488
3508
|
repeatable?: boolean;
|
|
3489
3509
|
}): Promise<QuizSubmission>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { R as RelayAction, c as createRelayAction } from './action-9Xl0StBg.js';
|
|
2
|
-
export { C as ClaimSubmission, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, l as RelayResponseOptions, S as SubmissionDraft, m as SubmissionStatus, n as SubmissionStore, V as ValueSubmission, o as createRelayClient, p as isRelayError } from './client-
|
|
2
|
+
export { C as ClaimSubmission, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, l as RelayResponseOptions, S as SubmissionDraft, m as SubmissionStatus, n as SubmissionStore, V as ValueSubmission, o as createRelayClient, p as isRelayError } from './client-BTd_CyX3.js';
|
|
3
3
|
export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-D_dUPLwo.js';
|
|
4
|
-
export { A as Attempt, a as AttemptStatus, E as Entitlement, b as EvaluatorProgress, K as KnownAttemptStatus, c as KnownTrackerSkipCode, M as MemberProgress, Q as QuestBudgetView, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, R as Reward, S as SubmissionEvidence, g as SubmitInput, T as TieredRewardReference, h as TrackerSkipCode } from './schema-
|
|
4
|
+
export { A as Attempt, a as AttemptStatus, E as Entitlement, b as EvaluatorProgress, K as KnownAttemptStatus, c as KnownTrackerSkipCode, M as MemberProgress, Q as QuestBudgetView, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, R as Reward, S as SubmissionEvidence, g as SubmitInput, T as TieredRewardReference, h as TrackerSkipCode } from './schema-K-Pg5lPz.js';
|
|
5
5
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
6
|
-
export { A as AccountConnection, a as AuthProvider
|
|
7
|
-
export { E as ExchangeInput, M as MemberSummary, P as ParticipantActivity, a as ParticipantPrincipal, b as ParticipantSession, R as RelayEvent, S as Session, s as sessionMember } from './participant-activity-
|
|
8
|
-
export { P as Page, a as PageQuery, Q as QuestClaimInput, b as QuestEnrollment, c as QuestEnrollmentInput, d as QuestInteraction, e as QuestOutcome, f as QuestOutcomePage, g as QuestOutcomeQuery, h as QuestOutcomeState, i as QuestRewardView, j as QuestView, R as ResponseResult, U as UnsupportedResponse } from './pages-
|
|
9
|
-
export { A as AvailabilityWindow, C as CampaignDefinition, a as CampaignEnrollment, b as CampaignEnrollmentInput, c as CampaignView, d as CampaignWithdrawalInput, K as KnownPointEntryKind, L as LeaderboardDefinition, e as LeaderboardPage, f as LeaderboardPlacement, g as LeaderboardQuery, M as MemberCampaignEnrollmentInput, h as MemberCampaignWithdrawalInput, P as PointBalance, i as PointBalances, j as PointEntry, k as PointEntryKind, l as PointHistoryPage, m as PointHistoryQuery, n as PointLedgerReference, o as ProjectGroup, p as ProjectGroupReference, R as ReferralDefinition } from './groups-
|
|
10
|
-
export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-
|
|
11
|
-
export { O as Offer, a as OfferDefinition, b as OfferPrice, R as RedeemOfferInput, c as Redemption } from './offers-
|
|
6
|
+
export { A as AccountConnection, a as AuthProvider } from './accounts-5ciAkCMP.js';
|
|
7
|
+
export { E as ExchangeInput, M as MemberSummary, P as ParticipantActivity, a as ParticipantPrincipal, b as ParticipantSession, R as RelayEvent, S as Session, s as sessionMember } from './participant-activity-DYdUUhw2.js';
|
|
8
|
+
export { P as Page, a as PageQuery, Q as QuestClaimInput, b as QuestEnrollment, c as QuestEnrollmentInput, d as QuestInteraction, e as QuestOutcome, f as QuestOutcomePage, g as QuestOutcomeQuery, h as QuestOutcomeState, i as QuestRewardView, j as QuestView, R as ResponseResult, U as UnsupportedResponse } from './pages-nIoMT9J3.js';
|
|
9
|
+
export { A as AvailabilityWindow, C as CampaignDefinition, a as CampaignEnrollment, b as CampaignEnrollmentInput, c as CampaignView, d as CampaignWithdrawalInput, K as KnownPointEntryKind, L as LeaderboardDefinition, e as LeaderboardPage, f as LeaderboardPlacement, g as LeaderboardQuery, M as MemberCampaignEnrollmentInput, h as MemberCampaignWithdrawalInput, P as PointBalance, i as PointBalances, j as PointEntry, k as PointEntryKind, l as PointHistoryPage, m as PointHistoryQuery, n as PointLedgerReference, o as ProjectGroup, p as ProjectGroupReference, R as ReferralDefinition } from './groups-4Jb3uYFO.js';
|
|
10
|
+
export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-6lJGnSDe.js';
|
|
11
|
+
export { O as Offer, a as OfferDefinition, b as OfferPrice, R as RedeemOfferInput, c as Redemption } from './offers-BFI5t-e-.js';
|
|
12
|
+
export { M as MissingPrerequisite, P as Prerequisite, T as TextEvidence, a as TextOptions, U as UrlEvidence, b as UrlOptions, V as ValueEvidence } from './submission-input-CPIsJt-_.js';
|
|
12
13
|
export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileReferral, e as ProfileSummary, f as ProfileUpdate, g as ProfileVisibility } from './profiles-BHMVj0kM.js';
|
|
13
14
|
export { Q as QuizContent, S as StreakProgress } from './streaks-CWyq8Px5.js';
|
|
14
15
|
export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletSignInNetwork, e as WalletSignature, f as WalletSigner, g as WalletUnlinkInput } from './wallet-CDyo-U4n.js';
|
package/dist/index.js
CHANGED
|
@@ -5,31 +5,33 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
QuestUpdatedError,
|
|
7
7
|
createRelayClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VBHFJH3P.js";
|
|
9
9
|
import {
|
|
10
10
|
createRelayAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XMBM2XD5.js";
|
|
12
12
|
import {
|
|
13
13
|
QuestOutcomeState
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LLMJ2SUT.js";
|
|
15
|
+
import {
|
|
16
|
+
PointEntryKind
|
|
17
|
+
} from "./chunk-UJACD6K2.js";
|
|
15
18
|
import {
|
|
16
|
-
PointEntryKind,
|
|
17
19
|
RelayError,
|
|
18
20
|
RelayErrorCode,
|
|
19
21
|
isRelayError
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2UAVZCMH.js";
|
|
21
23
|
import "./chunk-6QJ3LADK.js";
|
|
22
24
|
import {
|
|
23
25
|
RequestError,
|
|
24
26
|
isRequestError
|
|
25
27
|
} from "./chunk-NPGENI7K.js";
|
|
26
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-C3CB4WIQ.js";
|
|
27
29
|
import {
|
|
28
30
|
sessionMember
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PT5STHFH.js";
|
|
30
32
|
import {
|
|
31
33
|
AttemptStatus
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-46C33ASD.js";
|
|
33
35
|
export {
|
|
34
36
|
AttemptStatus,
|
|
35
37
|
PointEntryKind,
|
|
@@ -218,86 +218,6 @@ declare function parseSettings(fields: Record<string, SettingField>, input: unkn
|
|
|
218
218
|
declare function missingResourceSettings(fields: Record<string, SettingField>, values: SettingsValues): string[];
|
|
219
219
|
declare function compatibleSettingKinds(previous: SettingField, next: SettingField): boolean;
|
|
220
220
|
|
|
221
|
-
declare const xIdSchema: z.ZodString;
|
|
222
|
-
declare const xConnectionSchema: z.ZodObject<{
|
|
223
|
-
userId: z.ZodString;
|
|
224
|
-
}, z.core.$strip>;
|
|
225
|
-
declare const xProfileSchema: z.ZodObject<{
|
|
226
|
-
id: z.ZodString;
|
|
227
|
-
username: z.ZodString;
|
|
228
|
-
name: z.ZodString;
|
|
229
|
-
bio: z.ZodNullable<z.ZodString>;
|
|
230
|
-
profileImageUrl: z.ZodNullable<z.ZodString>;
|
|
231
|
-
followersCount: z.ZodNullable<z.ZodNumber>;
|
|
232
|
-
verified: z.ZodNullable<z.ZodBoolean>;
|
|
233
|
-
}, z.core.$strip>;
|
|
234
|
-
declare const xPostSchema: z.ZodObject<{
|
|
235
|
-
id: z.ZodString;
|
|
236
|
-
userId: z.ZodString;
|
|
237
|
-
content: z.ZodString;
|
|
238
|
-
createdAt: z.ZodISODateTime;
|
|
239
|
-
author: z.ZodObject<{
|
|
240
|
-
id: z.ZodString;
|
|
241
|
-
username: z.ZodString;
|
|
242
|
-
name: z.ZodString;
|
|
243
|
-
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
244
|
-
}, z.core.$loose>;
|
|
245
|
-
likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
246
|
-
replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
247
|
-
retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
248
|
-
quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
249
|
-
viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
250
|
-
bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
251
|
-
isReply: z.ZodBoolean;
|
|
252
|
-
isRetweet: z.ZodBoolean;
|
|
253
|
-
isQuoteTweet: z.ZodBoolean;
|
|
254
|
-
quotedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
255
|
-
inReplyToUserId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
256
|
-
inReplyToStatusId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
257
|
-
retweetedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
258
|
-
media: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
|
|
259
|
-
type: string;
|
|
260
|
-
url: string;
|
|
261
|
-
}[], unknown>>;
|
|
262
|
-
}, z.core.$loose>;
|
|
263
|
-
declare const xRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
264
|
-
operation: z.ZodLiteral<"connection">;
|
|
265
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
266
|
-
operation: z.ZodLiteral<"profile">;
|
|
267
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
-
operation: z.ZodLiteral<"post">;
|
|
269
|
-
postId: z.ZodString;
|
|
270
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
271
|
-
operation: z.ZodLiteral<"follows">;
|
|
272
|
-
userId: z.ZodString;
|
|
273
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
274
|
-
operation: z.ZodLiteral<"reposted">;
|
|
275
|
-
postId: z.ZodString;
|
|
276
|
-
}, z.core.$strict>], "operation">;
|
|
277
|
-
type XConnection = z.infer<typeof xConnectionSchema>;
|
|
278
|
-
type XProfile = z.infer<typeof xProfileSchema>;
|
|
279
|
-
type XPost = z.infer<typeof xPostSchema>;
|
|
280
|
-
/**
|
|
281
|
-
* Reads the member's linked X account and public X data. The account is pinned at the attempt's
|
|
282
|
-
* first X read: later links and unlinks do not change the attempt. `connection()`, `profile()`,
|
|
283
|
-
* `follows()` and `reposted()` resolve to `null` when the member has no linked X account;
|
|
284
|
-
* `post()` reads any public post and resolves to `null` when it does not exist. Provider failures
|
|
285
|
-
* throw `CapabilityError` with code `"provider-unavailable"`.
|
|
286
|
-
*/
|
|
287
|
-
interface XReader {
|
|
288
|
-
connection(): Promise<XConnection | null>;
|
|
289
|
-
profile(): Promise<XProfile | null>;
|
|
290
|
-
post(input: {
|
|
291
|
-
postId: string;
|
|
292
|
-
}): Promise<XPost | null>;
|
|
293
|
-
follows(input: {
|
|
294
|
-
userId: string;
|
|
295
|
-
}): Promise<boolean | null>;
|
|
296
|
-
reposted(input: {
|
|
297
|
-
postId: string;
|
|
298
|
-
}): Promise<boolean | null>;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
221
|
declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
302
222
|
kind: z.ZodLiteral<"streak">;
|
|
303
223
|
days: z.ZodNumber;
|
|
@@ -389,72 +309,4 @@ declare const projectIntegrationSchema: z.ZodObject<{
|
|
|
389
309
|
}, z.core.$strip>;
|
|
390
310
|
type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
|
|
391
311
|
|
|
392
|
-
|
|
393
|
-
* Why an evaluator capability could not answer:
|
|
394
|
-
*
|
|
395
|
-
* - `not-linked`: the call needs a member account that is not linked, and its result cannot be
|
|
396
|
-
* null, such as an image check of the member's X profile picture. Readers of the member's own
|
|
397
|
-
* accounts return `null` instead.
|
|
398
|
-
* - `provider-unavailable`: the provider (X, Discord, a chain RPC, AI review) did not answer, or
|
|
399
|
-
* the project's integration cannot reach it.
|
|
400
|
-
* - `author-error`: the call cannot be answered as written: invalid input, an undeclared
|
|
401
|
-
* integration, an unknown tracker, a chain Relay does not read, a wallet the member never
|
|
402
|
-
* linked, or an image that does not exist.
|
|
403
|
-
*
|
|
404
|
-
* Later versions can add codes. Treat an unknown code as a failure its `message` explains.
|
|
405
|
-
*/
|
|
406
|
-
declare const capabilityErrorCodes: readonly ["not-linked", "provider-unavailable", "author-error"];
|
|
407
|
-
/** @compat open */
|
|
408
|
-
type KnownCapabilityErrorCode = (typeof capabilityErrorCodes)[number];
|
|
409
|
-
/** A known code, or one a newer Relay added. */
|
|
410
|
-
type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
|
|
411
|
-
/**
|
|
412
|
-
* A capability failure as it crosses the sandbox boundary and as Relay captures it. Open, so a
|
|
413
|
-
* newer Relay can add codes and fields without breaking an older evaluator or Worker.
|
|
414
|
-
*/
|
|
415
|
-
declare const capabilityFailureSchema: z.ZodObject<{
|
|
416
|
-
code: z.ZodString;
|
|
417
|
-
message: z.ZodString;
|
|
418
|
-
/**
|
|
419
|
-
* True when Relay retries the attempt if the error reaches it uncaught, and calls the provider
|
|
420
|
-
* again. A failure that is not retryable is captured (or follows from the attempt's pinned
|
|
421
|
-
* inputs), so every run of the attempt sees it again. A retryable failure that quest code
|
|
422
|
-
* handles and moves past is final for the attempt; one that escapes the evaluation is retried.
|
|
423
|
-
*/
|
|
424
|
-
retryable: z.ZodBoolean;
|
|
425
|
-
}, z.core.$loose>;
|
|
426
|
-
type CapabilityFailure = z.infer<typeof capabilityFailureSchema>;
|
|
427
|
-
/**
|
|
428
|
-
* Thrown by an evaluator capability (`ctx.x`, `ctx.discord`, `ctx.wallet`, `ctx.trackers`,
|
|
429
|
-
* `ctx.images`, `ctx.review`) that could not answer. A capability whose subject is missing (an
|
|
430
|
-
* account the member has not linked, a deleted post or message) returns `null` instead of
|
|
431
|
-
* throwing.
|
|
432
|
-
*
|
|
433
|
-
* Catch it to decide yourself; rethrow anything else. An uncaught retryable error makes Relay
|
|
434
|
-
* retry the attempt later; an uncaught one that is not retryable fails it.
|
|
435
|
-
*
|
|
436
|
-
* ```ts
|
|
437
|
-
* try {
|
|
438
|
-
* return (await ctx.x.follows({ userId })) ? decision.accept() : decision.reject({ reason })
|
|
439
|
-
* } catch (error) {
|
|
440
|
-
* if (error instanceof CapabilityError && error.code === "provider-unavailable")
|
|
441
|
-
* return decision.review({ reason: "X is unavailable" })
|
|
442
|
-
* throw error
|
|
443
|
-
* }
|
|
444
|
-
* ```
|
|
445
|
-
*/
|
|
446
|
-
declare class CapabilityError extends Error {
|
|
447
|
-
readonly code: CapabilityErrorCode;
|
|
448
|
-
readonly retryable: boolean;
|
|
449
|
-
constructor(code: CapabilityErrorCode, message: string, options?: {
|
|
450
|
-
retryable?: boolean;
|
|
451
|
-
});
|
|
452
|
-
static [Symbol.hasInstance](value: unknown): boolean;
|
|
453
|
-
/**
|
|
454
|
-
* The error for a captured or transported failure. A code this SDK does not know is never
|
|
455
|
-
* retryable: nothing tells it a retry would help.
|
|
456
|
-
*/
|
|
457
|
-
static from(failure: CapabilityFailure): CapabilityError;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
export { settingsFieldsSchema as A, type Budget as B, CapabilityError as C, settingsValuesSchema as D, type EvaluatorIntegrationProvider as E, xConnectionSchema as F, xIdSchema as G, xPostSchema as H, type IntegrationModule as I, xProfileSchema as J, type KnownCapabilityErrorCode as K, xRequestSchema as L, type ProjectIntegration as P, type ResourceSource as R, type Setting as S, type XReader as X, type IntegerSettings as a, type CapabilityErrorCode as b, capabilityErrorCodes as c, type CapabilityFailure as d, type IntegrationProvider as e, type ResourceOption as f, type SettingField as g, type SettingsValues as h, type XConnection as i, type XPost as j, type XProfile as k, budgetSchema as l, capabilityFailureSchema as m, compatibleSettingKinds as n, completionKeySchema as o, completionPolicySchema as p, discordServerSchema as q, evaluatorIntegrationProviderSchema as r, integrationProviderSchema as s, missingResourceSettings as t, parseSettings as u, projectIntegrationSchema as v, resourceOptionsSchema as w, resourceRequestSchema as x, resourceSourceSchema as y, settingFieldSchema as z };
|
|
312
|
+
export { type Budget as B, type EvaluatorIntegrationProvider as E, type IntegrationModule as I, type ProjectIntegration as P, type ResourceSource as R, type Setting as S, type IntegerSettings as a, type IntegrationProvider as b, type ResourceOption as c, type SettingField as d, type SettingsValues as e, budgetSchema as f, compatibleSettingKinds as g, completionKeySchema as h, completionPolicySchema as i, discordServerSchema as j, evaluatorIntegrationProviderSchema as k, integrationProviderSchema as l, missingResourceSettings as m, projectIntegrationSchema as n, resourceRequestSchema as o, parseSettings as p, resourceSourceSchema as q, resourceOptionsSchema as r, settingFieldSchema as s, settingsFieldsSchema as t, settingsValuesSchema as u };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import { M as ManagementCallOptions } from './referral-reward-kinds-DnvQXL8L.js';
|
|
2
|
+
export { I as IdentityKindClaim, P as ParticipantRoute, R as REFERRAL_INTEGRATION_REWARD_ERROR, c as containsReferralIntegrationReward, i as identityIntegrationInputSchema, a as identityIntegrationSchema, b as identityIntegrationSecretSchema, d as identityKindClaimSchema, e as isIntegrationParticipantPath, f as isParticipantRoute, p as parseImageExtraction, g as parseImageResult, h as participantExchangeSchema, j as participantRoutePattern, k as participantRoutes, q as questConfiguration, s as sequenceCursorSchema, l as sourceDataSchema, m as sourceRoles, v as validateQuestShape } from './referral-reward-kinds-DnvQXL8L.js';
|
|
3
|
+
export { E as Extracted } from './images-D5kpqHxv.js';
|
|
4
|
+
import { z } from 'zod';
|
|
3
5
|
import { b as RequestErrorKind } from './request-error-D_dUPLwo.js';
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
+
export { a5 as TrackerDataBudget, a6 as schemaCheckedReader, a7 as trackerDataBatchSteps, a8 as trackerDataIssue, a9 as trackerDataIssues, aa as trackerDataPathTypes, ab as trackerDataRecordSteps, ac as whereSchemaIssue } from './schema-K-Pg5lPz.js';
|
|
7
|
+
|
|
8
|
+
/** What `managementTransport` sends with: the management client's options, plus its own. */
|
|
9
|
+
type ManagementTransportOptions = {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
getToken?: () => Promise<string | null>;
|
|
12
|
+
organization?: string;
|
|
13
|
+
project?: string;
|
|
14
|
+
environment?: "test" | "live";
|
|
15
|
+
timeout?: number;
|
|
16
|
+
/** The `X-Domino-Client` identity; the SDK's own by default. */
|
|
17
|
+
client?: string;
|
|
18
|
+
/** fetch's redirect mode. With `"error"`, a redirect fails the call without being followed. */
|
|
19
|
+
redirect?: RequestInit["redirect"];
|
|
20
|
+
};
|
|
21
|
+
/** `raw` takes a fetch init plus the call's `timeout`. */
|
|
22
|
+
type RawInit = RequestInit & {
|
|
23
|
+
timeout?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Sends management requests for one scope and credential. `exchange` is a JSON call parsed with
|
|
27
|
+
* `schema` (the body as it came when `schema` is undefined); `raw` answers the `Response`.
|
|
28
|
+
*/
|
|
29
|
+
declare function managementTransport(options: ManagementTransportOptions): {
|
|
30
|
+
raw: (path: string, init?: RawInit) => Promise<Response>;
|
|
31
|
+
exchange: <T>(path: string, schema: z.ZodType<T> | undefined, input: unknown, method: string, call: ManagementCallOptions | undefined, replaySafe: boolean, tolerant?: boolean) => Promise<T>;
|
|
32
|
+
};
|
|
6
33
|
|
|
7
34
|
/** The management client's and the CLI's default deadline per call. */
|
|
8
35
|
declare const MANAGEMENT_TIMEOUT = 30000;
|
|
@@ -49,4 +76,4 @@ type Rules = {
|
|
|
49
76
|
*/
|
|
50
77
|
declare function retrying<T>(life: Lifetime, rules: Rules, attempt: () => Promise<T>): Promise<T>;
|
|
51
78
|
|
|
52
|
-
export { type AttemptFailure, type Lifetime, MANAGEMENT_TIMEOUT, lifetime, retryAfter, retrying };
|
|
79
|
+
export { type AttemptFailure, type Lifetime, MANAGEMENT_TIMEOUT, type ManagementTransportOptions, lifetime, managementTransport, retryAfter, retrying };
|
package/dist/internal.js
CHANGED
|
@@ -5,18 +5,21 @@ import {
|
|
|
5
5
|
identityIntegrationSchema,
|
|
6
6
|
identityIntegrationSecretSchema,
|
|
7
7
|
identityKindClaimSchema,
|
|
8
|
-
|
|
9
|
-
parseImageResult,
|
|
8
|
+
managementTransport,
|
|
10
9
|
participantExchangeSchema,
|
|
11
10
|
questConfiguration,
|
|
12
11
|
sequenceCursorSchema
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import
|
|
12
|
+
} from "./chunk-5TS3OAWS.js";
|
|
13
|
+
import {
|
|
14
|
+
parseImageExtraction,
|
|
15
|
+
parseImageResult
|
|
16
|
+
} from "./chunk-W335CWYJ.js";
|
|
17
|
+
import "./chunk-ZGH6NEG6.js";
|
|
15
18
|
import {
|
|
16
19
|
sourceDataSchema,
|
|
17
20
|
sourceRoles,
|
|
18
21
|
validateQuestShape
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4OLQYRSA.js";
|
|
20
23
|
import {
|
|
21
24
|
isIntegrationParticipantPath,
|
|
22
25
|
isParticipantRoute,
|
|
@@ -30,7 +33,8 @@ import {
|
|
|
30
33
|
retrying
|
|
31
34
|
} from "./chunk-6QJ3LADK.js";
|
|
32
35
|
import "./chunk-NPGENI7K.js";
|
|
33
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-C3CB4WIQ.js";
|
|
37
|
+
import "./chunk-PT5STHFH.js";
|
|
34
38
|
import {
|
|
35
39
|
schemaCheckedReader,
|
|
36
40
|
trackerDataBatchSteps,
|
|
@@ -39,7 +43,7 @@ import {
|
|
|
39
43
|
trackerDataPathTypes,
|
|
40
44
|
trackerDataRecordSteps,
|
|
41
45
|
whereSchemaIssue
|
|
42
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-46C33ASD.js";
|
|
43
47
|
export {
|
|
44
48
|
MANAGEMENT_TIMEOUT,
|
|
45
49
|
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
@@ -51,6 +55,7 @@ export {
|
|
|
51
55
|
isIntegrationParticipantPath,
|
|
52
56
|
isParticipantRoute,
|
|
53
57
|
lifetime,
|
|
58
|
+
managementTransport,
|
|
54
59
|
parseImageExtraction,
|
|
55
60
|
parseImageResult,
|
|
56
61
|
participantExchangeSchema,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { q as AuthoringIdentity } from './groups-
|
|
1
|
+
import { i as ResourceHandle } from './schema-K-Pg5lPz.js';
|
|
2
|
+
import { q as AuthoringIdentity } from './groups-4Jb3uYFO.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const offerPriceSchema: z.ZodObject<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as AttemptStatus, bL as questDescriptionSchema, h as TrackerSkipCode } from './schema-
|
|
2
|
+
import { a as AttemptStatus, bL as questDescriptionSchema, h as TrackerSkipCode } from './schema-K-Pg5lPz.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The delivery actions this SDK knows. `RewardDelivery.action` is an open string: Relay can add
|
|
@@ -4727,6 +4727,7 @@ type ResponseSchema<T> = z.ZodType<T> & {
|
|
|
4727
4727
|
/**
|
|
4728
4728
|
* A separate reader for a known wire shape. Input schemas are never mutated. Object fields
|
|
4729
4729
|
* are stripped at every depth; collection quotas do not constrain a server response.
|
|
4730
|
+
* Child shapes convert on first parse or schema introspection, sharing each converted node.
|
|
4730
4731
|
*/
|
|
4731
4732
|
declare function responseShape<S extends z.core.$ZodType>(schema: S): S;
|
|
4732
4733
|
/** The original wire entity. No action is inferred from its unknown variant. */
|
|
@@ -264,6 +264,7 @@ declare const relayEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.
|
|
|
264
264
|
}>>]>;
|
|
265
265
|
declare const participantActivityQuerySchema: z.ZodObject<{
|
|
266
266
|
cursor: z.ZodOptional<z.ZodString>;
|
|
267
|
+
start: z.ZodOptional<z.ZodLiteral<"latest">>;
|
|
267
268
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
268
269
|
}, z.core.$strict>;
|
|
269
270
|
declare const participantActivitySchema: z.ZodObject<{
|
package/dist/portal-proxy.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-AXRMT33W.js";
|
|
4
4
|
import {
|
|
5
5
|
clientIdentity
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C3CB4WIQ.js";
|
|
7
7
|
import {
|
|
8
8
|
exchangeResultSchema
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-PT5STHFH.js";
|
|
10
|
+
import "./chunk-46C33ASD.js";
|
|
11
11
|
|
|
12
12
|
// src/portal-proxy.ts
|
|
13
13
|
var statusCode = (status) => ({
|