@domino-sdk/relay 1.62.0 → 1.65.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 +145 -0
- package/dist/{accounts-CCqCKCVx.d.ts → accounts-_lNsiR2k.d.ts} +42 -4
- package/dist/{attempt-captures-Cm-5G0PC.d.ts → attempt-captures-BqPggxTU.d.ts} +1 -1
- package/dist/authoring.d.ts +54 -20
- package/dist/authoring.js +60 -31
- package/dist/{automatic-outcomes-pAsOyIVp.d.ts → automatic-outcomes-BzAvfcpd.d.ts} +11 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +10 -10
- package/dist/browser.js +12 -13
- package/dist/capability-error-CuI_F7yM.d.ts +296 -0
- package/dist/{catalog--ZIlskAo.d.ts → catalog-ByZMRS7I.d.ts} +21 -10
- package/dist/{chunk-XNKSSE32.js → chunk-4NIV4NPV.js} +7 -7
- package/dist/chunk-7H4MRVQF.js +199 -0
- package/dist/{chunk-UPQPUJOU.js → chunk-CVQZ2YP7.js} +73 -202
- package/dist/{chunk-3PYYGFSB.js → chunk-DLABJSBO.js} +3 -3
- package/dist/{chunk-Y322OTCH.js → chunk-E22XSC4L.js} +1 -1
- package/dist/{chunk-E6IKQHTX.js → chunk-EDNKKVGU.js} +2 -2
- package/dist/{chunk-K2KS3JLY.js → chunk-EOUEAOWJ.js} +35 -4
- package/dist/{chunk-6WCIWXUV.js → chunk-EUEW2APU.js} +2 -2
- package/dist/{chunk-MK425RXJ.js → chunk-HNR6G3GV.js} +2335 -1538
- package/dist/{chunk-UW5232GG.js → chunk-KCUUHT2V.js} +5 -5
- package/dist/{chunk-CICDIBOF.js → chunk-MPTE7EIV.js} +76 -74
- package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
- package/dist/{chunk-GTDW453U.js → chunk-NG4GZ54I.js} +100 -114
- package/dist/chunk-R2KZFX6E.js +405 -0
- package/dist/{chunk-HTZHBTIL.js → chunk-RD3XJ4DH.js} +208 -376
- package/dist/{chunk-5TEYFX6X.js → chunk-SE7XHQFP.js} +2 -2
- package/dist/{chunk-CZFXGGEK.js → chunk-U66GUVSG.js} +2 -2
- package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
- package/dist/chunk-UZ765UGH.js +18 -0
- package/dist/{chunk-GKIFABGN.js → chunk-VBYOAT46.js} +100 -277
- package/dist/{chunk-QYPMPWVX.js → chunk-XVZ4YOF2.js} +43 -43
- package/dist/{chunk-3KLC4AMA.js → chunk-ZQ3IPCI6.js} +177 -176
- package/dist/chunk-ZXGBDLVB.js +1510 -0
- package/dist/{client-B-hbHX30.d.ts → client-D7IiwEq2.d.ts} +31 -62
- package/dist/{capability-error-DFMwSuSf.d.ts → dashboards-pVfclkyh.d.ts} +14 -294
- package/dist/{deployments-M4OHn7G3.d.ts → deployments-Cr1tfqrr.d.ts} +46 -3
- package/dist/{identity-integration-3mX6b5iH.d.ts → identity-integration-Ci2vGKtX.d.ts} +67 -2
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -13
- package/dist/internal.d.ts +27 -13
- package/dist/internal.js +46 -13
- package/dist/{analytics-BwAKLi7O.d.ts → limits-pE04y9O2.d.ts} +131 -3
- package/dist/{offers-DhAtss4_.d.ts → offers-Hw2P6tcK.d.ts} +3 -2
- package/dist/{participant-activity-D-Drp24G.d.ts → participant-activity-DXRq4s6K.d.ts} +1 -0
- package/dist/portal-proxy.d.ts +21 -3
- package/dist/portal-proxy.js +72 -22
- package/dist/react/index.d.ts +29 -15
- package/dist/react/index.js +52 -29
- package/dist/{pages-B8q8Y_dQ.d.ts → reward-deliveries-BCV8hznc.d.ts} +300 -233
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/6EBN6IZU.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +197 -19
- package/dist/schema.js +126 -124
- package/dist/server/index.d.ts +13 -13
- package/dist/server/index.js +5701 -6302
- package/dist/{sign-in-providers-BkjcDsFF.d.ts → sign-in-providers-BAkGjSXo.d.ts} +7 -2
- package/dist/{submission-input-DHGKhXfp.d.ts → submission-input-ChL1aYNH.d.ts} +3 -2
- package/dist/{telegram-browser-BCE7zdOb.d.ts → telegram-browser-K27t4TwM.d.ts} +5 -5
- package/dist/telegram.d.ts +9 -9
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +229 -27
- package/dist/testing.js +146 -105
- package/dist/{tracker-data-Hb1uQnk5.d.ts → tracker-data-Bl-qPIvZ.d.ts} +37 -9
- package/dist/{transport-DkhX2Cbs.d.ts → transport-DC1m73Tp.d.ts} +40211 -37736
- package/dist/{wallet-DTO7SXj7.d.ts → wallet-B7e06v4m.d.ts} +14 -4
- package/package.json +1 -1
- package/dist/chunk-D26YNACF.js +0 -320
- package/dist/chunk-UAKYDVT3.js +0 -565
- package/dist/chunk-WSBYWVTZ.js +0 -717
- package/dist/chunk-XJFYAXET.js +0 -87
- package/dist/runtime/chunks/Y4OAVXFR.js +0 -1
|
@@ -425,6 +425,8 @@ declare function walletAddressInput(signer: WalletSigner): Promise<WalletAddress
|
|
|
425
425
|
/**
|
|
426
426
|
* The most wallets of one chain family a member can have linked to one project at a time. Sign-in
|
|
427
427
|
* wallets do not count: signing in always links the wallet.
|
|
428
|
+
*
|
|
429
|
+
* @deprecated Use `limits.walletsPerChain`, which a 1.x release can raise.
|
|
428
430
|
*/
|
|
429
431
|
declare const WALLETS_PER_CHAIN = 5;
|
|
430
432
|
/** The wallet families a project can enable for sign-in, in their stored order. */
|
|
@@ -743,7 +745,11 @@ declare function isContractEvent(value: string): value is ContractEvent;
|
|
|
743
745
|
type WalletEventCondition = string | boolean | {
|
|
744
746
|
gte: string;
|
|
745
747
|
};
|
|
746
|
-
/**
|
|
748
|
+
/**
|
|
749
|
+
* The most logs one `ctx.wallet.events()` read may match before `where` filters them.
|
|
750
|
+
*
|
|
751
|
+
* @deprecated Use `limits.walletEventLogs`, which a 1.x release can raise.
|
|
752
|
+
*/
|
|
747
753
|
declare const maxWalletEventLogs = 1000;
|
|
748
754
|
/** How far before the evaluation `ctx.wallet.events()` may look back: 30 days. */
|
|
749
755
|
declare const maxWalletEventLookback: number;
|
|
@@ -769,7 +775,7 @@ type WalletEventsQuery = {
|
|
|
769
775
|
address?: string;
|
|
770
776
|
/**
|
|
771
777
|
* Return only the newest matching events, at most this many: from 1 to
|
|
772
|
-
* {@link
|
|
778
|
+
* {@link limits.walletEventLogs}. Relay reads back from the newest block and stops at its caps
|
|
773
779
|
* (1,000 logs, 3,000,000 blocks) instead of throwing, and the result's `complete` is false when
|
|
774
780
|
* older matching events may be left out. Without it, a read that reaches a cap throws
|
|
775
781
|
* `author-error`.
|
|
@@ -841,7 +847,11 @@ declare const solanaProgramIdlSchema: z.ZodObject<{
|
|
|
841
847
|
idl: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
842
848
|
}, z.core.$strict>;
|
|
843
849
|
type SolanaProgramIdl = z.infer<typeof solanaProgramIdlSchema>;
|
|
844
|
-
/**
|
|
850
|
+
/**
|
|
851
|
+
* The most transactions one `ctx.wallet.transactions()` read fetches per wallet.
|
|
852
|
+
*
|
|
853
|
+
* @deprecated Use `limits.walletTransactions`, which a 1.x release can raise.
|
|
854
|
+
*/
|
|
845
855
|
declare const maxWalletTransactions = 1000;
|
|
846
856
|
/** How far before the evaluation `ctx.wallet.transactions()` may look back: 30 days. */
|
|
847
857
|
declare const maxWalletTransactionLookback: number;
|
|
@@ -989,4 +999,4 @@ interface WalletReader {
|
|
|
989
999
|
transactions?(query: WalletTransactionsQuery): Promise<WalletTransactions | null>;
|
|
990
1000
|
}
|
|
991
1001
|
|
|
992
|
-
export { type WalletTransactions as $, type AvatarProvider as A, type
|
|
1002
|
+
export { type WalletTransactions as $, type AvatarProvider as A, type ContractFunction as B, type CosmosChain as C, type CosmosDenom as D, type EvmChainId as E, type NftCollectionParts as F, type NftStandard as G, type WalletBalance as H, type WalletBalanceChange as I, type WalletBalanceSample as J, type WalletCall as K, type LinkedWallet as L, type WalletCallArgument as M, type NftCollection as N, type OwnProfile as O, type ProfileAvatar as P, type WalletCallQuery as Q, type WalletDelegations as R, type SolanaIdlSource as S, type WalletDelegationsQuery as T, type WalletEventCondition as U, type WalletEventValue as V, type WalletAddressInput as W, type WalletEvents as X, type WalletEventsQuery as Y, type WalletNfts as Z, type WalletNftsQuery as _, type CosmosNetwork as a, walletDelegationsSchema as a$, type WalletTransactionsQuery as a0, cosmosDenomSchema as a1, cosmosNetworkSchema as a2, isContractCall as a3, isContractEvent as a4, isEvmChainId as a5, isNftCollection as a6, isSolanaProgram as a7, maxWalletEventLogs as a8, maxWalletEventLookback as a9, cosmosChain as aA, displayNameSchema as aB, evmAddressSchema as aC, evmChainIdSchema as aD, linkedWalletSchema as aE, managedProfileSchema as aF, ownProfileSchema as aG, profileAvatarSchema as aH, profileCompletionPageSchema as aI, profileCompletionQuerySchema as aJ, profileCompletionSchema as aK, profileDefaultProviderSchema as aL, profileDefaultsSchema as aM, profileModerationSchema as aN, profileReferralSchema as aO, profileSettingsInputSchema as aP, profileSettingsSchema as aQ, profileSummarySchema as aR, profileVisibilitySchema as aS, solanaAddressSchema as aT, solanaMainnet as aU, solanaProgramIdlSchema as aV, walletAddressInput as aW, walletBalanceSampleSchema as aX, walletBalanceSchema as aY, walletCallSchema as aZ, walletChainSchema as a_, maxWalletTransactionLookback as aa, maxWalletTransactions as ab, parseContractCall as ac, parseContractEvent as ad, parseContractFunction as ae, parseNftCollection as af, profileUpdateSchema as ag, walletAddressInputSchema as ah, walletSignatureSchema as ai, AVATAR_UPLOAD_LIMIT as aj, type AnchorIdl as ak, type KnownSolanaIdlSource as al, type ManagedProfile as am, type ProfileDefaultProvider as an, type ProfileDefaults as ao, type ProfileModeration as ap, type ProfileSettings as aq, type ProfileSettingsInput as ar, type SolanaProgramIdl as as, WALLETS_PER_CHAIN as at, anchorIdlSchema as au, avatarProviderSchema as av, avatarSeedSchema as aw, avatarUploadTypes as ax, caip10 as ay, cosmosAddressSchema as az, type ProfileCompletion as b, walletEventsSchema as b0, walletMessageChallengeSchema as b1, walletNftsSchema as b2, walletSignInFamilies as b3, walletSignInNetwork as b4, walletSignInNetworkSchema as b5, walletSignInNetworksSchema as b6, walletTransactionsSchema as b7, walletUnlinkInputSchema as b8, type ProfileCompletionPage as c, type ProfileCompletionQuery as d, type ProfileReferral as e, type ProfileSummary as f, type ProfileUpdate as g, type ProfileVisibility as h, type WalletChain as i, type WalletMessageChallenge as j, type WalletSignInNetwork as k, type WalletSignature as l, type WalletSigner as m, type WalletUnlinkInput as n, type WalletBalanceQuery as o, type ContractCall as p, type ContractEvent as q, type SolanaProgram as r, type WalletBalanceSourceQuery as s, type WalletTransaction as t, type WalletInstruction as u, type WalletReader as v, type ContractCallParts as w, type ContractCallReturnType as x, type ContractEventInput as y, type ContractEventParts as z };
|
package/package.json
CHANGED
package/dist/chunk-D26YNACF.js
DELETED
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
badgeSchema,
|
|
3
|
-
pointLedgerReferenceSchema
|
|
4
|
-
} from "./chunk-WSBYWVTZ.js";
|
|
5
|
-
import {
|
|
6
|
-
authoringIdentityShape,
|
|
7
|
-
entitlementSchema,
|
|
8
|
-
identifier,
|
|
9
|
-
mediaUrlSchema,
|
|
10
|
-
memberProgressSchema,
|
|
11
|
-
pageCursorSchema,
|
|
12
|
-
prerequisiteSchema,
|
|
13
|
-
publishedReleaseSchema,
|
|
14
|
-
questPresentationContentSchema,
|
|
15
|
-
questScaleLimits,
|
|
16
|
-
responseShape,
|
|
17
|
-
retryCooldownMsSchema,
|
|
18
|
-
reviewModeSchema,
|
|
19
|
-
sdkRuntimeReferenceSchema,
|
|
20
|
-
settingsValuesSchema,
|
|
21
|
-
storedQuestDescriptionSchema,
|
|
22
|
-
storedReviewModeSchema,
|
|
23
|
-
tieredRewardReferenceSchema
|
|
24
|
-
} from "./chunk-MK425RXJ.js";
|
|
25
|
-
|
|
26
|
-
// src/participant-activity.ts
|
|
27
|
-
import * as z from "zod";
|
|
28
|
-
var base = { id: z.string(), at: z.number() };
|
|
29
|
-
var attempt = {
|
|
30
|
-
...base,
|
|
31
|
-
quest: z.string(),
|
|
32
|
-
attempt: z.string(),
|
|
33
|
-
completion: z.string().nullable()
|
|
34
|
-
};
|
|
35
|
-
var kinds = [
|
|
36
|
-
"attempt.accepted",
|
|
37
|
-
"attempt.rejected",
|
|
38
|
-
"attempt.review",
|
|
39
|
-
"points.awarded",
|
|
40
|
-
"entitlement.granted",
|
|
41
|
-
"entitlement.collected",
|
|
42
|
-
"delivery.updated",
|
|
43
|
-
"referral.qualified"
|
|
44
|
-
];
|
|
45
|
-
var knownRelayEventSchema = z.discriminatedUnion("kind", [
|
|
46
|
-
z.object({ ...attempt, kind: z.literal("attempt.accepted") }),
|
|
47
|
-
z.object({ ...attempt, kind: z.literal("attempt.rejected") }),
|
|
48
|
-
z.object({ ...attempt, kind: z.literal("attempt.review") }),
|
|
49
|
-
z.object({
|
|
50
|
-
...base,
|
|
51
|
-
kind: z.literal("points.awarded"),
|
|
52
|
-
entry: z.string(),
|
|
53
|
-
ledger: z.string(),
|
|
54
|
-
amount: z.number(),
|
|
55
|
-
quest: z.string().nullable(),
|
|
56
|
-
completion: z.string().nullable()
|
|
57
|
-
}),
|
|
58
|
-
z.object({
|
|
59
|
-
...base,
|
|
60
|
-
kind: z.literal("entitlement.granted"),
|
|
61
|
-
entitlement: z.string(),
|
|
62
|
-
tier: z.string(),
|
|
63
|
-
status: z.string()
|
|
64
|
-
}),
|
|
65
|
-
z.object({
|
|
66
|
-
...base,
|
|
67
|
-
kind: z.literal("entitlement.collected"),
|
|
68
|
-
entitlement: z.string()
|
|
69
|
-
}),
|
|
70
|
-
z.object({
|
|
71
|
-
...base,
|
|
72
|
-
kind: z.literal("delivery.updated"),
|
|
73
|
-
delivery: z.string(),
|
|
74
|
-
quest: z.string(),
|
|
75
|
-
completion: z.string(),
|
|
76
|
-
status: z.string()
|
|
77
|
-
}),
|
|
78
|
-
z.object({
|
|
79
|
-
...base,
|
|
80
|
-
kind: z.literal("referral.qualified"),
|
|
81
|
-
program: z.string()
|
|
82
|
-
})
|
|
83
|
-
]);
|
|
84
|
-
var relayEventSchema = z.union([
|
|
85
|
-
knownRelayEventSchema,
|
|
86
|
-
z.object({
|
|
87
|
-
...base,
|
|
88
|
-
kind: z.string().refine((kind) => !kinds.includes(kind))
|
|
89
|
-
}).catchall(z.json()).transform(({ kind, ...event }) => ({
|
|
90
|
-
...event,
|
|
91
|
-
kind: "unknown",
|
|
92
|
-
reportedKind: kind
|
|
93
|
-
}))
|
|
94
|
-
]);
|
|
95
|
-
var participantActivityQuerySchema = z.object({
|
|
96
|
-
cursor: pageCursorSchema.optional(),
|
|
97
|
-
/** `latest` answers no events and the cursor of the newest one, to follow only what comes next. */
|
|
98
|
-
start: z.literal("latest").optional(),
|
|
99
|
-
limit: z.number().int().min(1).max(100).default(50)
|
|
100
|
-
}).strict().refine((query) => !(query.cursor && query.start), {
|
|
101
|
-
message: "Pass either cursor or start, not both"
|
|
102
|
-
});
|
|
103
|
-
var participantActivitySchema = z.object({
|
|
104
|
-
member: z.string(),
|
|
105
|
-
items: z.array(relayEventSchema),
|
|
106
|
-
/**
|
|
107
|
-
* Never null: the feed has no last page, so an empty page still answers the cursor to read
|
|
108
|
-
* from next. A loop over it, such as `paginate`, stops on its own condition, such as an empty
|
|
109
|
-
* page or a count.
|
|
110
|
-
*/
|
|
111
|
-
nextCursor: pageCursorSchema
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// src/catalog.ts
|
|
115
|
-
import * as z2 from "zod";
|
|
116
|
-
var interactionSchema = z2.enum([
|
|
117
|
-
"photo",
|
|
118
|
-
"text",
|
|
119
|
-
"url",
|
|
120
|
-
"quiz",
|
|
121
|
-
"claim",
|
|
122
|
-
"staff",
|
|
123
|
-
"automatic"
|
|
124
|
-
]);
|
|
125
|
-
function questInteraction(trigger) {
|
|
126
|
-
return trigger.kind === "automatic" ? "automatic" : trigger.actor === "staff" ? "staff" : trigger.input === "none" ? "claim" : trigger.input;
|
|
127
|
-
}
|
|
128
|
-
var questTypeVersionSchema = z2.object({
|
|
129
|
-
archivedAt: z2.number().int().nonnegative().nullable().optional(),
|
|
130
|
-
key: identifier.optional(),
|
|
131
|
-
id: identifier,
|
|
132
|
-
version: identifier,
|
|
133
|
-
code: z2.string(),
|
|
134
|
-
/** The SDK runtime `code` imports. Absent, the code bundles its own SDK. */
|
|
135
|
-
runtime: sdkRuntimeReferenceSchema.optional(),
|
|
136
|
-
definition: storedQuestDescriptionSchema,
|
|
137
|
-
provider: storedReviewModeSchema,
|
|
138
|
-
createdAt: z2.number()
|
|
139
|
-
});
|
|
140
|
-
var collectionSlotSchema = z2.object({
|
|
141
|
-
archivedAt: z2.number().int().nonnegative().nullable().optional(),
|
|
142
|
-
id: identifier,
|
|
143
|
-
key: identifier.optional(),
|
|
144
|
-
title: z2.string().trim().min(1).max(120),
|
|
145
|
-
description: z2.string().max(4e3).optional(),
|
|
146
|
-
image: mediaUrlSchema.optional(),
|
|
147
|
-
imageAlt: z2.string().max(500).optional()
|
|
148
|
-
});
|
|
149
|
-
var collectionSlotDeclarationSchema = collectionSlotSchema.omit({ id: true, archivedAt: true }).extend(authoringIdentityShape).strict();
|
|
150
|
-
var questCollectionSchema = collectionSlotSchema.extend({
|
|
151
|
-
quests: z2.array(identifier).max(100).refine(
|
|
152
|
-
(v) => new Set(v).size === v.length,
|
|
153
|
-
"A collection can contain a quest only once"
|
|
154
|
-
)
|
|
155
|
-
});
|
|
156
|
-
var questInstanceSchema = z2.object({
|
|
157
|
-
badges: z2.array(identifier).max(10).refine(
|
|
158
|
-
(items) => new Set(items).size === items.length,
|
|
159
|
-
"Choose each badge once"
|
|
160
|
-
).optional(),
|
|
161
|
-
id: identifier,
|
|
162
|
-
title: z2.string().trim().min(1).max(120),
|
|
163
|
-
typeVersion: identifier,
|
|
164
|
-
presentation: questPresentationContentSchema.optional(),
|
|
165
|
-
settings: settingsValuesSchema,
|
|
166
|
-
requires: z2.array(prerequisiteSchema).max(30),
|
|
167
|
-
/**
|
|
168
|
-
* Milliseconds a member waits after a rejected attempt before submitting again, or `null` for
|
|
169
|
-
* no cooldown. Omitted: the quest type's own `retryCooldownMs`.
|
|
170
|
-
*/
|
|
171
|
-
retryCooldownMs: retryCooldownMsSchema.nullable().optional(),
|
|
172
|
-
/**
|
|
173
|
-
* Milliseconds a member waits after an accepted completion before submitting again, or `null`
|
|
174
|
-
* for no cooldown. Omitted: the quest type's own `completionCooldownMs`.
|
|
175
|
-
*/
|
|
176
|
-
completionCooldownMs: retryCooldownMsSchema.nullable().optional(),
|
|
177
|
-
status: z2.enum(["active", "paused", "archived"])
|
|
178
|
-
}).strict();
|
|
179
|
-
var questDraftChangesSchema = z2.object({
|
|
180
|
-
quests: z2.array(
|
|
181
|
-
questInstanceSchema.extend({ expectedRelease: identifier.nullable() })
|
|
182
|
-
).max(questScaleLimits.quests),
|
|
183
|
-
collections: z2.array(questCollectionSchema.omit({ archivedAt: true }).strict()).max(questScaleLimits.collections)
|
|
184
|
-
}).strict();
|
|
185
|
-
var draftBase = z2.object({
|
|
186
|
-
id: identifier,
|
|
187
|
-
revision: z2.number().int().positive(),
|
|
188
|
-
baseRevision: z2.number().int().nonnegative(),
|
|
189
|
-
changes: questDraftChangesSchema
|
|
190
|
-
});
|
|
191
|
-
var questDraftSchema = responseShape(
|
|
192
|
-
z2.discriminatedUnion("status", [
|
|
193
|
-
draftBase.extend({ status: z2.literal("draft") }),
|
|
194
|
-
draftBase.extend({
|
|
195
|
-
status: z2.literal("published"),
|
|
196
|
-
releaseIds: z2.array(identifier)
|
|
197
|
-
})
|
|
198
|
-
])
|
|
199
|
-
);
|
|
200
|
-
var questCatalogSchema = responseShape(
|
|
201
|
-
z2.object({
|
|
202
|
-
revision: z2.number().int().nonnegative(),
|
|
203
|
-
types: z2.array(questTypeVersionSchema),
|
|
204
|
-
collections: z2.array(questCollectionSchema),
|
|
205
|
-
quests: z2.array(questInstanceSchema),
|
|
206
|
-
drafts: z2.array(questDraftSchema),
|
|
207
|
-
releases: z2.array(publishedReleaseSchema).default([]),
|
|
208
|
-
supportedInteractions: z2.array(interactionSchema)
|
|
209
|
-
})
|
|
210
|
-
);
|
|
211
|
-
var catalogDeploymentSchema = z2.object({
|
|
212
|
-
expectedRevision: z2.number().int().nonnegative(),
|
|
213
|
-
types: z2.array(
|
|
214
|
-
z2.object({
|
|
215
|
-
code: z2.string().min(1).max(1e6),
|
|
216
|
-
runtime: sdkRuntimeReferenceSchema.optional(),
|
|
217
|
-
provider: reviewModeSchema
|
|
218
|
-
})
|
|
219
|
-
).max(questScaleLimits.questTypes).default([]),
|
|
220
|
-
collections: z2.array(collectionSlotDeclarationSchema).max(questScaleLimits.collections).default([]),
|
|
221
|
-
supportedInteractions: z2.array(interactionSchema).min(1).optional()
|
|
222
|
-
}).strict();
|
|
223
|
-
var catalogDeploymentPreviewSchema = responseShape(
|
|
224
|
-
z2.object({
|
|
225
|
-
revision: z2.number().int().nonnegative(),
|
|
226
|
-
types: z2.array(questTypeVersionSchema),
|
|
227
|
-
collections: z2.array(collectionSlotSchema),
|
|
228
|
-
supportedInteractions: z2.array(interactionSchema)
|
|
229
|
-
})
|
|
230
|
-
);
|
|
231
|
-
var saveQuestDraftSchema = z2.object({
|
|
232
|
-
id: identifier.optional(),
|
|
233
|
-
actionId: identifier,
|
|
234
|
-
expectedRevision: z2.number().int().nonnegative(),
|
|
235
|
-
baseRevision: z2.number().int().nonnegative(),
|
|
236
|
-
changes: questDraftChangesSchema
|
|
237
|
-
}).strict();
|
|
238
|
-
var publishQuestDraftSchema = z2.object({ id: identifier, expectedRevision: z2.number().int().positive() }).strict();
|
|
239
|
-
var questRewardViewSchema = z2.discriminatedUnion("kind", [
|
|
240
|
-
z2.object({
|
|
241
|
-
kind: z2.literal("points"),
|
|
242
|
-
label: z2.string(),
|
|
243
|
-
amount: z2.number().int().nonnegative(),
|
|
244
|
-
ledger: pointLedgerReferenceSchema
|
|
245
|
-
}),
|
|
246
|
-
z2.object({
|
|
247
|
-
kind: z2.literal("tier"),
|
|
248
|
-
label: z2.string(),
|
|
249
|
-
reward: tieredRewardReferenceSchema.extend({
|
|
250
|
-
title: z2.string(),
|
|
251
|
-
badge: badgeSchema.optional(),
|
|
252
|
-
/** The group the reward adds the member to: its key and the title the quest names it by. */
|
|
253
|
-
group: z2.object({ key: identifier, title: z2.string() }).optional()
|
|
254
|
-
}),
|
|
255
|
-
tier: identifier
|
|
256
|
-
}),
|
|
257
|
-
z2.object({ kind: z2.literal("integration"), label: z2.string() })
|
|
258
|
-
]);
|
|
259
|
-
var questViewSchema = responseShape(
|
|
260
|
-
memberProgressSchema.shape.quests.element.extend({
|
|
261
|
-
release: identifier,
|
|
262
|
-
interaction: interactionSchema,
|
|
263
|
-
lifecycle: z2.enum(["active", "paused", "archived"]),
|
|
264
|
-
rewards: z2.array(questRewardViewSchema)
|
|
265
|
-
})
|
|
266
|
-
);
|
|
267
|
-
var collectionViewSchema = z2.object({
|
|
268
|
-
key: identifier.optional(),
|
|
269
|
-
id: identifier,
|
|
270
|
-
title: z2.string(),
|
|
271
|
-
description: z2.string().optional(),
|
|
272
|
-
image: mediaUrlSchema.optional(),
|
|
273
|
-
imageAlt: z2.string().optional(),
|
|
274
|
-
quests: z2.array(questViewSchema)
|
|
275
|
-
});
|
|
276
|
-
var questExperienceSchema = responseShape(
|
|
277
|
-
z2.object({
|
|
278
|
-
entitlements: z2.array(entitlementSchema).default([]),
|
|
279
|
-
member: identifier,
|
|
280
|
-
quests: z2.array(questViewSchema),
|
|
281
|
-
collections: z2.array(collectionViewSchema)
|
|
282
|
-
})
|
|
283
|
-
);
|
|
284
|
-
var questPublicationPreviewSchema = responseShape(
|
|
285
|
-
z2.object({
|
|
286
|
-
draft: questDraftSchema,
|
|
287
|
-
releases: z2.array(publishedReleaseSchema),
|
|
288
|
-
affectedCollections: z2.array(questCollectionSchema)
|
|
289
|
-
})
|
|
290
|
-
);
|
|
291
|
-
var allocateQuestSchema = z2.object({ actionId: identifier }).strict();
|
|
292
|
-
var allocatedQuestSchema = z2.object({ id: identifier });
|
|
293
|
-
|
|
294
|
-
export {
|
|
295
|
-
knownRelayEventSchema,
|
|
296
|
-
relayEventSchema,
|
|
297
|
-
participantActivityQuerySchema,
|
|
298
|
-
participantActivitySchema,
|
|
299
|
-
interactionSchema,
|
|
300
|
-
questInteraction,
|
|
301
|
-
questTypeVersionSchema,
|
|
302
|
-
collectionSlotSchema,
|
|
303
|
-
collectionSlotDeclarationSchema,
|
|
304
|
-
questCollectionSchema,
|
|
305
|
-
questInstanceSchema,
|
|
306
|
-
questDraftChangesSchema,
|
|
307
|
-
questDraftSchema,
|
|
308
|
-
questCatalogSchema,
|
|
309
|
-
catalogDeploymentSchema,
|
|
310
|
-
catalogDeploymentPreviewSchema,
|
|
311
|
-
saveQuestDraftSchema,
|
|
312
|
-
publishQuestDraftSchema,
|
|
313
|
-
questRewardViewSchema,
|
|
314
|
-
questViewSchema,
|
|
315
|
-
collectionViewSchema,
|
|
316
|
-
questExperienceSchema,
|
|
317
|
-
questPublicationPreviewSchema,
|
|
318
|
-
allocateQuestSchema,
|
|
319
|
-
allocatedQuestSchema
|
|
320
|
-
};
|