@domino-sdk/relay 1.61.0 → 1.63.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 +276 -8
- package/README.md +3 -2
- package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-nz3mzfRQ.d.ts} +3146 -1765
- package/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
- package/dist/authoring.d.ts +171 -49
- package/dist/authoring.js +158 -49
- package/dist/{automatic-outcomes-If88LR9f.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +15 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +15 -11
- package/dist/browser.js +18 -12
- package/dist/capability-error-CuI_F7yM.d.ts +296 -0
- package/dist/{pages-K7-KjSXw.d.ts → catalog-BaTOKpNw.d.ts} +56 -567
- package/dist/{chunk-XBV2CK2H.js → chunk-3RFP6GT5.js} +15 -3
- package/dist/{chunk-VURRFVNP.js → chunk-4GQW43UU.js} +239 -361
- package/dist/chunk-4NOFSGAL.js +320 -0
- package/dist/{chunk-24I4R732.js → chunk-5XLZ34PV.js} +34 -19
- package/dist/{chunk-L77O64I4.js → chunk-7X67QLPB.js} +43 -43
- package/dist/{chunk-RHBS5FJL.js → chunk-7Z4SZ6YM.js} +3 -3
- package/dist/{chunk-QEAS4ZGS.js → chunk-AQOL3SK5.js} +1 -1
- package/dist/chunk-EHUSD3O2.js +377 -0
- package/dist/chunk-FO2LCZTL.js +19 -0
- package/dist/{chunk-DYXDZFKA.js → chunk-FU5CGNTR.js} +166 -178
- package/dist/chunk-FWLQ5XCS.js +21 -0
- package/dist/chunk-GLH6MEI2.js +193 -0
- package/dist/chunk-ICXZZNPS.js +199 -0
- package/dist/{chunk-ZDJLPN4L.js → chunk-ID3BZXFZ.js} +2696 -2693
- package/dist/chunk-KP2MCX3R.js +587 -0
- package/dist/{chunk-SKGTNTLF.js → chunk-LZWXCBUB.js} +213 -297
- package/dist/chunk-MTKRIQEU.js +31 -0
- package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
- package/dist/{chunk-PPB7HALD.js → chunk-N4BDKS6Y.js} +27 -26
- package/dist/{chunk-5I54XBK2.js → chunk-N4LNEGQX.js} +2 -2
- package/dist/chunk-NQDEWJWE.js +554 -0
- package/dist/chunk-QR6HH4DI.js +508 -0
- package/dist/chunk-TLSQETTY.js +41 -0
- package/dist/{chunk-MHPKEVEW.js → chunk-U66GUVSG.js} +7 -2
- package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
- package/dist/chunk-UZ765UGH.js +18 -0
- package/dist/{chunk-7A4J67ZL.js → chunk-VWQGWGCH.js} +7 -7
- package/dist/chunk-W7YSMSGC.js +725 -0
- package/dist/{client-C51w7fMb.d.ts → client-DHmG7rn6.d.ts} +126 -93
- package/dist/{announcements-CHx3-HBw.d.ts → dashboards-CLemT6kj.d.ts} +14 -137
- package/dist/{deployments-kWoHFaqj.d.ts → deployments-DTULi7dF.d.ts} +450 -18
- package/dist/identity-integration-DOeNZaxF.d.ts +1271 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +16 -11
- package/dist/internal.d.ts +29 -13
- package/dist/internal.js +57 -17
- package/dist/{integrations-B3y36OaB.d.ts → limits-kNzYdZ00.d.ts} +464 -53
- package/dist/{offers-BoV4ryUc.d.ts → offers-CYeN_I0Y.d.ts} +22 -4
- package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
- package/dist/portal-proxy.d.ts +75 -2
- package/dist/portal-proxy.js +153 -25
- package/dist/react/index.d.ts +214 -27
- package/dist/react/index.js +196 -42
- package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
- package/dist/reward-deliveries-drp-x1G-.d.ts +782 -0
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/UGDV5W4N.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +330 -31
- package/dist/schema.js +147 -91
- package/dist/server/index.d.ts +14 -12
- package/dist/server/index.js +6425 -6260
- package/dist/sign-in-providers-B1Q9eDRm.d.ts +44 -0
- package/dist/submission-input-DZCbjQUH.d.ts +343 -0
- package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-NL0Asmsi.d.ts} +46 -6
- package/dist/telegram.d.ts +64 -0
- package/dist/telegram.js +23 -0
- package/dist/testing.d.ts +326 -27
- package/dist/testing.js +440 -90
- package/dist/tracker-data-esm3WG8R.d.ts +1881 -0
- package/dist/{transport-BrX9pIGN.d.ts → transport-Czht_irp.d.ts} +43483 -38512
- package/dist/{wallet-CIqFoxdm.d.ts → wallet-B7e06v4m.d.ts} +32 -9
- package/package.json +5 -1
- package/dist/accounts-DoabriBX.d.ts +0 -306
- package/dist/capability-error-DufwG3G0.d.ts +0 -159
- package/dist/chunk-3Y3L2F54.js +0 -982
- package/dist/chunk-DHXDBAJF.js +0 -544
- package/dist/chunk-EN3M5Z4J.js +0 -13
- package/dist/chunk-QNUHWK7R.js +0 -602
- package/dist/chunk-SE4PFJPT.js +0 -247
- package/dist/groups-CqcA2Ycs.d.ts +0 -2827
- package/dist/runtime/chunks/5QVFB4TU.js +0 -1
- package/dist/submission-input-C54Q8yAD.d.ts +0 -146
- package/dist/x-D1PGi8Sq.d.ts +0 -331
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-esm3WG8R.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The longest wording Relay stores: a checkbox label with a link to the policy fits.
|
|
6
|
+
*
|
|
7
|
+
* @experimental A minor release can change the consent API.
|
|
8
|
+
*/
|
|
9
|
+
declare const consentWordingMaxLength = 2000;
|
|
10
|
+
/**
|
|
11
|
+
* The channels Relay records consent for. A later Relay may add others.
|
|
12
|
+
*
|
|
13
|
+
* @experimental A minor release can change the consent API.
|
|
14
|
+
*/
|
|
15
|
+
declare const knownConsentChannels: readonly ["email"];
|
|
16
|
+
/**
|
|
17
|
+
* A channel this SDK knows.
|
|
18
|
+
*
|
|
19
|
+
* @compat open
|
|
20
|
+
* @experimental A minor release can change the consent API.
|
|
21
|
+
*/
|
|
22
|
+
type KnownConsentChannel = (typeof knownConsentChannels)[number];
|
|
23
|
+
/**
|
|
24
|
+
* A consent channel: one of `knownConsentChannels`, or one a later Relay adds.
|
|
25
|
+
*
|
|
26
|
+
* @experimental A minor release can change the consent API.
|
|
27
|
+
*/
|
|
28
|
+
type ConsentChannel = KnownConsentChannel | (string & {});
|
|
29
|
+
/**
|
|
30
|
+
* A consent state this SDK knows: the member opted in, or opted out.
|
|
31
|
+
*
|
|
32
|
+
* @compat open
|
|
33
|
+
* @experimental A minor release can change the consent API.
|
|
34
|
+
*/
|
|
35
|
+
type KnownConsentState = "granted" | "withdrawn";
|
|
36
|
+
/**
|
|
37
|
+
* A consent state, or one a later Relay adds.
|
|
38
|
+
*
|
|
39
|
+
* @experimental A minor release can change the consent API.
|
|
40
|
+
*/
|
|
41
|
+
type ConsentState = KnownConsentState | (string & {});
|
|
42
|
+
/**
|
|
43
|
+
* Where a consent record came from: `member`, the member's own choice in the app, or `imported`,
|
|
44
|
+
* consent a member import carried over from the platform the member came from, with the time and
|
|
45
|
+
* wording that platform recorded.
|
|
46
|
+
*
|
|
47
|
+
* @compat open
|
|
48
|
+
* @experimental A minor release can change the consent API.
|
|
49
|
+
*/
|
|
50
|
+
type KnownConsentSource = "member" | "imported";
|
|
51
|
+
/**
|
|
52
|
+
* A consent source, or one a later Relay adds.
|
|
53
|
+
*
|
|
54
|
+
* @experimental A minor release can change the consent API.
|
|
55
|
+
*/
|
|
56
|
+
type ConsentSource = KnownConsentSource | (string & {});
|
|
57
|
+
/**
|
|
58
|
+
* The signed-in member's current consent on one channel (`relay.consent.get()`). `at` is when
|
|
59
|
+
* Relay recorded it, in epoch milliseconds, by Relay's clock; `wording` is the text the member saw,
|
|
60
|
+
* as the app sent it, or null for a withdrawal sent without one.
|
|
61
|
+
*
|
|
62
|
+
* @compat output
|
|
63
|
+
* @experimental A minor release can change the consent API.
|
|
64
|
+
*/
|
|
65
|
+
type MemberConsent = {
|
|
66
|
+
member: string;
|
|
67
|
+
channel: ConsentChannel;
|
|
68
|
+
state: ConsentState;
|
|
69
|
+
at: number;
|
|
70
|
+
wording: string | null;
|
|
71
|
+
source: ConsentSource;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Parses one channel's consent as Relay sends it.
|
|
75
|
+
*
|
|
76
|
+
* @experimental A minor release can change the consent API.
|
|
77
|
+
*/
|
|
78
|
+
declare const memberConsentSchema: z.ZodType<MemberConsent>;
|
|
79
|
+
/**
|
|
80
|
+
* The signed-in member's consent, one entry per channel they ever chose on. A channel with no
|
|
81
|
+
* entry has no record: the member was never asked, which is not the same as withdrawn.
|
|
82
|
+
*
|
|
83
|
+
* @experimental A minor release can change the consent API.
|
|
84
|
+
*/
|
|
85
|
+
declare const memberConsentListSchema: z.ZodArray<z.ZodType<MemberConsent, unknown, z.core.$ZodTypeInternals<MemberConsent, unknown>>>;
|
|
86
|
+
/**
|
|
87
|
+
* `relay.consent.set()`: grant or withdraw one channel. `wording` is the exact text the app showed
|
|
88
|
+
* beside the checkbox, required to grant and optional to withdraw. Relay stamps the time; a call
|
|
89
|
+
* that repeats the current state and wording records nothing and answers the current state.
|
|
90
|
+
*
|
|
91
|
+
* Relay refuses an unknown channel with `unsupported-consent-channel`, a grant without wording
|
|
92
|
+
* with `consent-wording-required`, wording over `consentWordingMaxLength` characters with
|
|
93
|
+
* `consent-wording-too-long`, and wording that is not text (a NUL or a lone surrogate) with
|
|
94
|
+
* `consent-wording-invalid`.
|
|
95
|
+
*
|
|
96
|
+
* @compat input
|
|
97
|
+
* @experimental A minor release can change the consent API.
|
|
98
|
+
*/
|
|
99
|
+
type ConsentInput = {
|
|
100
|
+
actionId: string;
|
|
101
|
+
channel: KnownConsentChannel;
|
|
102
|
+
granted: boolean;
|
|
103
|
+
wording?: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Parses a consent change. It checks the shape only: Relay decides the channel and wording rules,
|
|
107
|
+
* so every caller gets the same refusal codes.
|
|
108
|
+
*
|
|
109
|
+
* @experimental A minor release can change the consent API.
|
|
110
|
+
*/
|
|
111
|
+
declare const consentInputSchema: z.ZodObject<{
|
|
112
|
+
actionId: z.ZodString;
|
|
113
|
+
channel: z.ZodCustom<"email", "email">;
|
|
114
|
+
granted: z.ZodBoolean;
|
|
115
|
+
wording: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
|
+
/**
|
|
118
|
+
* A consent change as the participant route sends it to the ledger, for the session's member.
|
|
119
|
+
*
|
|
120
|
+
* @experimental A minor release can change the consent API.
|
|
121
|
+
*/
|
|
122
|
+
declare const memberConsentInputSchema: z.ZodObject<{
|
|
123
|
+
actionId: z.ZodString;
|
|
124
|
+
member: z.ZodString;
|
|
125
|
+
channel: z.ZodString;
|
|
126
|
+
granted: z.ZodBoolean;
|
|
127
|
+
wording: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
/**
|
|
130
|
+
* One page of a member's consent history for operators (`management.members.consentHistory()`):
|
|
131
|
+
* every change on every channel, newest first, never edited. Pass `nextCursor` back as `cursor`
|
|
132
|
+
* for the next page; it is null on the last page.
|
|
133
|
+
*
|
|
134
|
+
* @compat output
|
|
135
|
+
* @experimental A minor release can change the consent API.
|
|
136
|
+
*/
|
|
137
|
+
type MemberConsentHistory = {
|
|
138
|
+
items: MemberConsent[];
|
|
139
|
+
nextCursor: string | null;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Parses one page of a member's consent history as Relay sends it.
|
|
143
|
+
*
|
|
144
|
+
* @experimental A minor release can change the consent API.
|
|
145
|
+
*/
|
|
146
|
+
declare const memberConsentHistorySchema: z.ZodType<MemberConsentHistory>;
|
|
147
|
+
/**
|
|
148
|
+
* Which page of a member's consent history to read: `cursor` from the previous page, and up to
|
|
149
|
+
* `limit` entries (1 to 100), 50 when omitted.
|
|
150
|
+
*
|
|
151
|
+
* @experimental A minor release can change the consent API.
|
|
152
|
+
*/
|
|
153
|
+
declare const memberConsentHistoryQuerySchema: z.ZodObject<{
|
|
154
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
155
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
|
|
158
|
+
declare const responseFormat: unique symbol;
|
|
159
|
+
/** A schema whose output explicitly represents unsupported server variants. */
|
|
160
|
+
type ResponseSchema<T> = z.ZodType<T> & {
|
|
161
|
+
readonly [responseFormat]: true;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* A separate reader for a known wire shape. Input schemas are never mutated. Object fields
|
|
165
|
+
* are stripped at every depth; collection quotas do not constrain a server response.
|
|
166
|
+
* Child shapes convert on first parse or schema introspection, sharing each converted node.
|
|
167
|
+
*/
|
|
168
|
+
declare function responseShape<S extends z.core.$ZodType>(schema: S): S;
|
|
169
|
+
/** The original wire entity. No action is inferred from its unknown variant. */
|
|
170
|
+
type UnsupportedResponse = {
|
|
171
|
+
kind: "unsupported";
|
|
172
|
+
raw: z.infer<ReturnType<typeof z.json>>;
|
|
173
|
+
};
|
|
174
|
+
/** @compat output */
|
|
175
|
+
type ResponseResult<T> = {
|
|
176
|
+
kind: "supported";
|
|
177
|
+
value: T;
|
|
178
|
+
} | UnsupportedResponse;
|
|
179
|
+
/**
|
|
180
|
+
* Opt-in response contract for a complete entity or operation. A new variant keeps the whole
|
|
181
|
+
* raw entity; semantic arrays such as requirements and rewards remain atomic.
|
|
182
|
+
*/
|
|
183
|
+
declare function responseSchema<T>(schema: z.ZodType<T>): ResponseSchema<ResponseResult<T>>;
|
|
184
|
+
/** An entity list is complete only when `unsupportedCount` is zero. Item order is retained. */
|
|
185
|
+
declare function responseListSchema<T>(schema: z.ZodType<T>): ResponseSchema<{
|
|
186
|
+
items: ResponseResult<T>[];
|
|
187
|
+
unsupportedCount: number;
|
|
188
|
+
}>;
|
|
189
|
+
|
|
190
|
+
/** The creator-account providers this SDK knows. A later Relay may list others. */
|
|
191
|
+
declare const knownCreatorAccountProviders: readonly ["youtube", "tiktok"];
|
|
192
|
+
/** A creator-account provider: one of `knownCreatorAccountProviders`, or one a later Relay adds. */
|
|
193
|
+
type CreatorAccountProvider = (typeof knownCreatorAccountProviders)[number] | (string & {});
|
|
194
|
+
declare const creatorAccountProviderSchema: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
|
|
195
|
+
/**
|
|
196
|
+
* A member's account on one creator platform, as `AccountConnection` describes sign-in accounts.
|
|
197
|
+
* `subject` is the platform's stable account ID (a YouTube channel ID, `UC…`, or a TikTok
|
|
198
|
+
* `open_id`); `profile` is the
|
|
199
|
+
* public name, handle and picture the platform reported when the member linked it. `reconnect`
|
|
200
|
+
* means Relay can no longer read the account and the member must link it again.
|
|
201
|
+
*
|
|
202
|
+
* @compat output
|
|
203
|
+
*/
|
|
204
|
+
declare const creatorAccountSchema: z.ZodObject<{
|
|
205
|
+
provider: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
|
|
206
|
+
configured: z.ZodBoolean;
|
|
207
|
+
status: z.ZodEnum<{
|
|
208
|
+
disconnected: "disconnected";
|
|
209
|
+
connected: "connected";
|
|
210
|
+
reconnect: "reconnect";
|
|
211
|
+
}>;
|
|
212
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
213
|
+
revision: z.ZodNumber;
|
|
214
|
+
profile: z.ZodNullable<z.ZodObject<{
|
|
215
|
+
name: z.ZodOptional<z.ZodString>;
|
|
216
|
+
username: z.ZodOptional<z.ZodString>;
|
|
217
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
type CreatorAccount = z.infer<typeof creatorAccountSchema>;
|
|
221
|
+
/**
|
|
222
|
+
* The member's creator accounts: one per provider the platform configured.
|
|
223
|
+
*
|
|
224
|
+
* @compat output
|
|
225
|
+
*/
|
|
226
|
+
declare const creatorAccountsSchema: z.ZodObject<{
|
|
227
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
228
|
+
provider: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
|
|
229
|
+
configured: z.ZodBoolean;
|
|
230
|
+
status: z.ZodEnum<{
|
|
231
|
+
disconnected: "disconnected";
|
|
232
|
+
connected: "connected";
|
|
233
|
+
reconnect: "reconnect";
|
|
234
|
+
}>;
|
|
235
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
236
|
+
revision: z.ZodNumber;
|
|
237
|
+
profile: z.ZodNullable<z.ZodObject<{
|
|
238
|
+
name: z.ZodOptional<z.ZodString>;
|
|
239
|
+
username: z.ZodOptional<z.ZodString>;
|
|
240
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, z.core.$strip>>;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
type CreatorAccounts = z.infer<typeof creatorAccountsSchema>;
|
|
245
|
+
|
|
246
|
+
declare const contentQualificationDecisionSchema: z.ZodObject<{
|
|
247
|
+
kind: z.ZodEnum<{
|
|
248
|
+
defer: "defer";
|
|
249
|
+
accept: "accept";
|
|
250
|
+
reject: "reject";
|
|
251
|
+
review: "review";
|
|
252
|
+
progress: "progress";
|
|
253
|
+
superseded: "superseded";
|
|
254
|
+
}>;
|
|
255
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
256
|
+
}, z.core.$strict>;
|
|
257
|
+
declare const contentQualificationQuerySchema: z.ZodObject<{
|
|
258
|
+
quest: z.ZodString;
|
|
259
|
+
member: z.ZodOptional<z.ZodString>;
|
|
260
|
+
content: z.ZodOptional<z.ZodString>;
|
|
261
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
declare const contentQualificationSchema: z.ZodObject<{
|
|
264
|
+
quest: z.ZodString;
|
|
265
|
+
content: z.ZodString;
|
|
266
|
+
member: z.ZodString;
|
|
267
|
+
release: z.ZodString;
|
|
268
|
+
attempt: z.ZodString;
|
|
269
|
+
revision: z.ZodString;
|
|
270
|
+
observation: z.ZodString;
|
|
271
|
+
current: z.ZodBoolean;
|
|
272
|
+
state: z.ZodEnum<{
|
|
273
|
+
pending: "pending";
|
|
274
|
+
superseded: "superseded";
|
|
275
|
+
qualified: "qualified";
|
|
276
|
+
unqualified: "unqualified";
|
|
277
|
+
"needs-review": "needs-review";
|
|
278
|
+
failed: "failed";
|
|
279
|
+
stale: "stale";
|
|
280
|
+
blocked: "blocked";
|
|
281
|
+
unavailable: "unavailable";
|
|
282
|
+
}>;
|
|
283
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
284
|
+
reward: z.ZodObject<{
|
|
285
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
286
|
+
completion: z.ZodNullable<z.ZodString>;
|
|
287
|
+
state: z.ZodEnum<{
|
|
288
|
+
awarded: "awarded";
|
|
289
|
+
excluded: "excluded";
|
|
290
|
+
unresolved: "unresolved";
|
|
291
|
+
}>;
|
|
292
|
+
}, z.core.$strict>;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
declare const contentQualificationPageSchema: z.ZodObject<{
|
|
295
|
+
items: z.ZodArray<z.ZodObject<{
|
|
296
|
+
quest: z.ZodString;
|
|
297
|
+
content: z.ZodString;
|
|
298
|
+
member: z.ZodString;
|
|
299
|
+
release: z.ZodString;
|
|
300
|
+
attempt: z.ZodString;
|
|
301
|
+
revision: z.ZodString;
|
|
302
|
+
observation: z.ZodString;
|
|
303
|
+
current: z.ZodBoolean;
|
|
304
|
+
state: z.ZodEnum<{
|
|
305
|
+
pending: "pending";
|
|
306
|
+
superseded: "superseded";
|
|
307
|
+
qualified: "qualified";
|
|
308
|
+
unqualified: "unqualified";
|
|
309
|
+
"needs-review": "needs-review";
|
|
310
|
+
failed: "failed";
|
|
311
|
+
stale: "stale";
|
|
312
|
+
blocked: "blocked";
|
|
313
|
+
unavailable: "unavailable";
|
|
314
|
+
}>;
|
|
315
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
316
|
+
reward: z.ZodObject<{
|
|
317
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
318
|
+
completion: z.ZodNullable<z.ZodString>;
|
|
319
|
+
state: z.ZodEnum<{
|
|
320
|
+
awarded: "awarded";
|
|
321
|
+
excluded: "excluded";
|
|
322
|
+
unresolved: "unresolved";
|
|
323
|
+
}>;
|
|
324
|
+
}, z.core.$strict>;
|
|
325
|
+
}, z.core.$strict>>;
|
|
326
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
327
|
+
}, z.core.$strict>;
|
|
328
|
+
/** A content metric's name, as its source declares it, such as `likes`. */
|
|
329
|
+
declare const contentMetricSchema: z.ZodString;
|
|
330
|
+
type ContentMetric = z.infer<typeof contentMetricSchema>;
|
|
331
|
+
/** Measured counters by metric name. A metric a sample leaves out is unknown, never zero. */
|
|
332
|
+
declare const contentMetricsSchema: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
333
|
+
/** Which declared metrics a content quest's performance stage reads, and how fresh they must be. */
|
|
334
|
+
declare const contentPerformancePolicySchema: z.ZodObject<{
|
|
335
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
336
|
+
maxAgeMs: z.ZodDefault<z.ZodNumber>;
|
|
337
|
+
}, z.core.$strict>;
|
|
338
|
+
type ContentPerformancePolicy = z.infer<typeof contentPerformancePolicySchema>;
|
|
339
|
+
|
|
340
|
+
/** `relay.quests.enroll()`: the signed-in member enrolls in a quest that requires enrollment. */
|
|
341
|
+
declare const questEnrollmentInputSchema: z.ZodObject<{
|
|
342
|
+
actionId: z.ZodString;
|
|
343
|
+
quest: z.ZodString;
|
|
344
|
+
}, z.core.$strict>;
|
|
345
|
+
type QuestEnrollmentInput = z.input<typeof questEnrollmentInputSchema>;
|
|
346
|
+
/** `management.quests.enroll()`: a server enrolls a member, vouching for their consent. */
|
|
347
|
+
declare const memberEnrollmentInputSchema: z.ZodObject<{
|
|
348
|
+
actionId: z.ZodString;
|
|
349
|
+
quest: z.ZodString;
|
|
350
|
+
member: z.ZodString;
|
|
351
|
+
}, z.core.$strict>;
|
|
352
|
+
type MemberEnrollmentInput = z.input<typeof memberEnrollmentInputSchema>;
|
|
353
|
+
/**
|
|
354
|
+
* A member's active enrollment in a quest. Enrolling again changes nothing; an operator can
|
|
355
|
+
* withdraw it, after which enrollment starts a new consent period.
|
|
356
|
+
*/
|
|
357
|
+
declare const questEnrollmentSchema: z.ZodObject<{
|
|
358
|
+
quest: z.ZodString;
|
|
359
|
+
member: z.ZodString;
|
|
360
|
+
enrolledAt: z.ZodNumber;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
type QuestEnrollment = z.infer<typeof questEnrollmentSchema>;
|
|
363
|
+
/**
|
|
364
|
+
* `relay.quests.claim()`: the signed-in member claims one of their outcomes skipped as
|
|
365
|
+
* `historical`, on a quest whose historical policy is `"claim"`. Relay decides it again under the
|
|
366
|
+
* quest's current release with historical activity released; any other rule can still skip it.
|
|
367
|
+
*/
|
|
368
|
+
declare const questClaimInputSchema: z.ZodObject<{
|
|
369
|
+
actionId: z.ZodString;
|
|
370
|
+
quest: z.ZodString;
|
|
371
|
+
tracker: z.ZodString;
|
|
372
|
+
record: z.ZodString;
|
|
373
|
+
observedAt: z.ZodNumber;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
type QuestClaimInput = z.input<typeof questClaimInputSchema>;
|
|
376
|
+
/**
|
|
377
|
+
* The outcome states this SDK knows: an automatic decision `admitted` an attempt or was `skipped`.
|
|
378
|
+
*/
|
|
379
|
+
declare const QuestOutcomeState: {
|
|
380
|
+
readonly Admitted: "admitted";
|
|
381
|
+
readonly Skipped: "skipped";
|
|
382
|
+
};
|
|
383
|
+
type QuestOutcomeState = (typeof QuestOutcomeState)[keyof typeof QuestOutcomeState];
|
|
384
|
+
/**
|
|
385
|
+
* One automatic decision about the signed-in member's activity: a quest admitted an attempt for a
|
|
386
|
+
* tracker record observation, or skipped it with a stable code. Only decisions Relay attributed to
|
|
387
|
+
* the member are theirs to read; a record no member has linked yet names nobody.
|
|
388
|
+
*/
|
|
389
|
+
declare const questOutcomeSchema: z.ZodObject<{
|
|
390
|
+
automatic: z.ZodOptional<z.ZodString>;
|
|
391
|
+
quest: z.ZodString;
|
|
392
|
+
tracker: z.ZodNullable<z.ZodString>;
|
|
393
|
+
record: z.ZodNullable<z.ZodString>;
|
|
394
|
+
observedAt: z.ZodNullable<z.ZodNumber>;
|
|
395
|
+
state: z.ZodEnum<{
|
|
396
|
+
admitted: "admitted";
|
|
397
|
+
skipped: "skipped";
|
|
398
|
+
}>;
|
|
399
|
+
code: z.ZodType<TrackerSkipCode | null>;
|
|
400
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
401
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
402
|
+
quest: "quest";
|
|
403
|
+
tracker: "tracker";
|
|
404
|
+
}>>;
|
|
405
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
406
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
407
|
+
claimable: z.ZodBoolean;
|
|
408
|
+
createdAt: z.ZodNumber;
|
|
409
|
+
updatedAt: z.ZodNumber;
|
|
410
|
+
}, z.core.$strip>;
|
|
411
|
+
type QuestOutcome = z.infer<typeof questOutcomeSchema>;
|
|
412
|
+
/** `relay.quests.outcomes()`: newest first, optionally one quest, state or code. */
|
|
413
|
+
declare const questOutcomeQuerySchema: z.ZodObject<{
|
|
414
|
+
quest: z.ZodOptional<z.ZodString>;
|
|
415
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
416
|
+
admitted: "admitted";
|
|
417
|
+
skipped: "skipped";
|
|
418
|
+
}>>;
|
|
419
|
+
code: z.ZodOptional<z.ZodString>;
|
|
420
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
421
|
+
}, z.core.$strict>;
|
|
422
|
+
type QuestOutcomeQuery = z.input<typeof questOutcomeQuerySchema>;
|
|
423
|
+
declare const questOutcomePageSchema: z.ZodObject<{
|
|
424
|
+
items: z.ZodArray<z.ZodObject<{
|
|
425
|
+
automatic: z.ZodOptional<z.ZodString>;
|
|
426
|
+
quest: z.ZodString;
|
|
427
|
+
tracker: z.ZodNullable<z.ZodString>;
|
|
428
|
+
record: z.ZodNullable<z.ZodString>;
|
|
429
|
+
observedAt: z.ZodNullable<z.ZodNumber>;
|
|
430
|
+
state: z.ZodEnum<{
|
|
431
|
+
admitted: "admitted";
|
|
432
|
+
skipped: "skipped";
|
|
433
|
+
}>;
|
|
434
|
+
code: z.ZodType<TrackerSkipCode | null>;
|
|
435
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
436
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
437
|
+
quest: "quest";
|
|
438
|
+
tracker: "tracker";
|
|
439
|
+
}>>;
|
|
440
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
441
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
442
|
+
claimable: z.ZodBoolean;
|
|
443
|
+
createdAt: z.ZodNumber;
|
|
444
|
+
updatedAt: z.ZodNumber;
|
|
445
|
+
}, z.core.$strip>>;
|
|
446
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
type QuestOutcomePage = z.infer<typeof questOutcomePageSchema>;
|
|
449
|
+
|
|
450
|
+
/** A cursor as a client passes it back. */
|
|
451
|
+
declare const pageCursorSchema: z.ZodString;
|
|
452
|
+
/** A query that pages by cursor only. */
|
|
453
|
+
declare const pageQuerySchema: z.ZodObject<{
|
|
454
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strict>;
|
|
456
|
+
type PageQuery = z.input<typeof pageQuerySchema>;
|
|
457
|
+
/** One page of a paged read. */
|
|
458
|
+
type Page<T> = {
|
|
459
|
+
items: T[];
|
|
460
|
+
nextCursor: string | null;
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* Every item of a paged read, page by page as the loop asks for them: `read` gets `undefined` for
|
|
464
|
+
* the first page, then each page's `nextCursor`, until one is `null`. Any paged participant or
|
|
465
|
+
* management read fits, with its own query and call options:
|
|
466
|
+
*
|
|
467
|
+
* ```ts
|
|
468
|
+
* for await (const entry of paginate((cursor) => relay.referrals.history({ cursor }))) {
|
|
469
|
+
* console.log(entry)
|
|
470
|
+
* }
|
|
471
|
+
* ```
|
|
472
|
+
*
|
|
473
|
+
* A rejected read rejects the loop; breaking out of the loop reads no further pages.
|
|
474
|
+
*
|
|
475
|
+
* A feed never ends: `me.activity.list` answers a `nextCursor` on every page, even an empty one,
|
|
476
|
+
* so the loop over it never finishes on its own. Stop it yourself, when a page comes back empty or
|
|
477
|
+
* after as many items as you need, or follow the feed with `me.activity.observe`.
|
|
478
|
+
*/
|
|
479
|
+
declare function paginate<T>(read: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T, void, undefined>;
|
|
480
|
+
/** A management state page with an operator-selected size. */
|
|
481
|
+
declare const managementStateQuerySchema: z.ZodObject<{
|
|
482
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
483
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
484
|
+
}, z.core.$strict>;
|
|
485
|
+
type ManagementStateQuery = z.input<typeof managementStateQuerySchema>;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* The delivery actions this SDK knows. `RewardDelivery.action` is an open string: Relay can add
|
|
489
|
+
* actions, and a delivery keeps one this SDK does not list. Show such a delivery by its status.
|
|
490
|
+
*/
|
|
491
|
+
declare const RewardDeliveryAction: {
|
|
492
|
+
/** Delivers a quest's Discord role reward. */
|
|
493
|
+
readonly GrantRole: "grant-role";
|
|
494
|
+
/**
|
|
495
|
+
* Posts a quest's announcement in a Telegram chat or Discord channel. Its `provider` is
|
|
496
|
+
* `telegram` or `discord`, and its `roleId` is empty.
|
|
497
|
+
*/
|
|
498
|
+
readonly PostMessage: "post-message";
|
|
499
|
+
};
|
|
500
|
+
/** A known action, or one a newer Relay sends. */
|
|
501
|
+
type RewardDeliveryAction = (typeof RewardDeliveryAction)[keyof typeof RewardDeliveryAction] | (string & {});
|
|
502
|
+
declare const roleReconciliationSchema: z.ZodObject<{
|
|
503
|
+
status: z.ZodEnum<{
|
|
504
|
+
pending: "pending";
|
|
505
|
+
removed: "removed";
|
|
506
|
+
failed: "failed";
|
|
507
|
+
preserved: "preserved";
|
|
508
|
+
granted: "granted";
|
|
509
|
+
}>;
|
|
510
|
+
ownership: z.ZodEnum<{
|
|
511
|
+
external: "external";
|
|
512
|
+
relay: "relay";
|
|
513
|
+
unclaimed: "unclaimed";
|
|
514
|
+
}>;
|
|
515
|
+
at: z.ZodNumber;
|
|
516
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
517
|
+
}, z.core.$strip>;
|
|
518
|
+
declare const knownRewardDeliverySchema: z.ZodObject<{
|
|
519
|
+
id: z.ZodString;
|
|
520
|
+
quest: z.ZodString;
|
|
521
|
+
completion: z.ZodString;
|
|
522
|
+
member: z.ZodString;
|
|
523
|
+
provider: z.ZodLiteral<"discord">;
|
|
524
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
525
|
+
roleId: z.ZodString;
|
|
526
|
+
status: z.ZodEnum<{
|
|
527
|
+
pending: "pending";
|
|
528
|
+
failed: "failed";
|
|
529
|
+
delivered: "delivered";
|
|
530
|
+
}>;
|
|
531
|
+
attempts: z.ZodNumber;
|
|
532
|
+
nextAt: z.ZodNumber;
|
|
533
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
534
|
+
createdAt: z.ZodNumber;
|
|
535
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
536
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
537
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
538
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
539
|
+
status: z.ZodEnum<{
|
|
540
|
+
pending: "pending";
|
|
541
|
+
removed: "removed";
|
|
542
|
+
failed: "failed";
|
|
543
|
+
preserved: "preserved";
|
|
544
|
+
granted: "granted";
|
|
545
|
+
}>;
|
|
546
|
+
ownership: z.ZodEnum<{
|
|
547
|
+
external: "external";
|
|
548
|
+
relay: "relay";
|
|
549
|
+
unclaimed: "unclaimed";
|
|
550
|
+
}>;
|
|
551
|
+
at: z.ZodNumber;
|
|
552
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
553
|
+
}, z.core.$strip>>>;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
declare const rewardDeliverySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
556
|
+
id: z.ZodString;
|
|
557
|
+
quest: z.ZodString;
|
|
558
|
+
completion: z.ZodString;
|
|
559
|
+
member: z.ZodString;
|
|
560
|
+
provider: z.ZodLiteral<"discord">;
|
|
561
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
562
|
+
roleId: z.ZodString;
|
|
563
|
+
status: z.ZodEnum<{
|
|
564
|
+
pending: "pending";
|
|
565
|
+
failed: "failed";
|
|
566
|
+
delivered: "delivered";
|
|
567
|
+
}>;
|
|
568
|
+
attempts: z.ZodNumber;
|
|
569
|
+
nextAt: z.ZodNumber;
|
|
570
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
571
|
+
createdAt: z.ZodNumber;
|
|
572
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
573
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
574
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
575
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
576
|
+
status: z.ZodEnum<{
|
|
577
|
+
pending: "pending";
|
|
578
|
+
removed: "removed";
|
|
579
|
+
failed: "failed";
|
|
580
|
+
preserved: "preserved";
|
|
581
|
+
granted: "granted";
|
|
582
|
+
}>;
|
|
583
|
+
ownership: z.ZodEnum<{
|
|
584
|
+
external: "external";
|
|
585
|
+
relay: "relay";
|
|
586
|
+
unclaimed: "unclaimed";
|
|
587
|
+
}>;
|
|
588
|
+
at: z.ZodNumber;
|
|
589
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
590
|
+
}, z.core.$strip>>>;
|
|
591
|
+
}, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>, z.ZodObject<{
|
|
592
|
+
id: z.ZodString;
|
|
593
|
+
quest: z.ZodString;
|
|
594
|
+
completion: z.ZodString;
|
|
595
|
+
member: z.ZodString;
|
|
596
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
597
|
+
attempts: z.ZodNumber;
|
|
598
|
+
nextAt: z.ZodNumber;
|
|
599
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
600
|
+
createdAt: z.ZodNumber;
|
|
601
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
602
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
603
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
604
|
+
provider: z.ZodString;
|
|
605
|
+
status: z.ZodString;
|
|
606
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
607
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
608
|
+
status: z.ZodString;
|
|
609
|
+
ownership: z.ZodString;
|
|
610
|
+
at: z.ZodNumber;
|
|
611
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
612
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>>;
|
|
613
|
+
}, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>]>;
|
|
614
|
+
/**
|
|
615
|
+
* One page of reward deliveries, newest first. Pass `nextCursor` back as `cursor` for older ones;
|
|
616
|
+
* it is null on the last page. `items` holds the same deliveries as `deliveries`, so the page
|
|
617
|
+
* fits `paginate()`; a Relay older than `items` answers `deliveries` alone, and the clients fill
|
|
618
|
+
* `items` from it.
|
|
619
|
+
*/
|
|
620
|
+
declare const rewardDeliveriesSchema: z.ZodObject<{
|
|
621
|
+
deliveries: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
622
|
+
id: z.ZodString;
|
|
623
|
+
quest: z.ZodString;
|
|
624
|
+
completion: z.ZodString;
|
|
625
|
+
member: z.ZodString;
|
|
626
|
+
provider: z.ZodLiteral<"discord">;
|
|
627
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
628
|
+
roleId: z.ZodString;
|
|
629
|
+
status: z.ZodEnum<{
|
|
630
|
+
pending: "pending";
|
|
631
|
+
failed: "failed";
|
|
632
|
+
delivered: "delivered";
|
|
633
|
+
}>;
|
|
634
|
+
attempts: z.ZodNumber;
|
|
635
|
+
nextAt: z.ZodNumber;
|
|
636
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
637
|
+
createdAt: z.ZodNumber;
|
|
638
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
639
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
640
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
641
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
642
|
+
status: z.ZodEnum<{
|
|
643
|
+
pending: "pending";
|
|
644
|
+
removed: "removed";
|
|
645
|
+
failed: "failed";
|
|
646
|
+
preserved: "preserved";
|
|
647
|
+
granted: "granted";
|
|
648
|
+
}>;
|
|
649
|
+
ownership: z.ZodEnum<{
|
|
650
|
+
external: "external";
|
|
651
|
+
relay: "relay";
|
|
652
|
+
unclaimed: "unclaimed";
|
|
653
|
+
}>;
|
|
654
|
+
at: z.ZodNumber;
|
|
655
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
656
|
+
}, z.core.$strip>>>;
|
|
657
|
+
}, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>, z.ZodObject<{
|
|
658
|
+
id: z.ZodString;
|
|
659
|
+
quest: z.ZodString;
|
|
660
|
+
completion: z.ZodString;
|
|
661
|
+
member: z.ZodString;
|
|
662
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
663
|
+
attempts: z.ZodNumber;
|
|
664
|
+
nextAt: z.ZodNumber;
|
|
665
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
666
|
+
createdAt: z.ZodNumber;
|
|
667
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
668
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
669
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
670
|
+
provider: z.ZodString;
|
|
671
|
+
status: z.ZodString;
|
|
672
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
673
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
674
|
+
status: z.ZodString;
|
|
675
|
+
ownership: z.ZodString;
|
|
676
|
+
at: z.ZodNumber;
|
|
677
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
678
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>>;
|
|
679
|
+
}, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>]>>;
|
|
680
|
+
items: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
681
|
+
id: z.ZodString;
|
|
682
|
+
quest: z.ZodString;
|
|
683
|
+
completion: z.ZodString;
|
|
684
|
+
member: z.ZodString;
|
|
685
|
+
provider: z.ZodLiteral<"discord">;
|
|
686
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
687
|
+
roleId: z.ZodString;
|
|
688
|
+
status: z.ZodEnum<{
|
|
689
|
+
pending: "pending";
|
|
690
|
+
failed: "failed";
|
|
691
|
+
delivered: "delivered";
|
|
692
|
+
}>;
|
|
693
|
+
attempts: z.ZodNumber;
|
|
694
|
+
nextAt: z.ZodNumber;
|
|
695
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
696
|
+
createdAt: z.ZodNumber;
|
|
697
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
698
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
699
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
700
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
701
|
+
status: z.ZodEnum<{
|
|
702
|
+
pending: "pending";
|
|
703
|
+
removed: "removed";
|
|
704
|
+
failed: "failed";
|
|
705
|
+
preserved: "preserved";
|
|
706
|
+
granted: "granted";
|
|
707
|
+
}>;
|
|
708
|
+
ownership: z.ZodEnum<{
|
|
709
|
+
external: "external";
|
|
710
|
+
relay: "relay";
|
|
711
|
+
unclaimed: "unclaimed";
|
|
712
|
+
}>;
|
|
713
|
+
at: z.ZodNumber;
|
|
714
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
715
|
+
}, z.core.$strip>>>;
|
|
716
|
+
}, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>, z.ZodObject<{
|
|
717
|
+
id: z.ZodString;
|
|
718
|
+
quest: z.ZodString;
|
|
719
|
+
completion: z.ZodString;
|
|
720
|
+
member: z.ZodString;
|
|
721
|
+
action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
|
|
722
|
+
attempts: z.ZodNumber;
|
|
723
|
+
nextAt: z.ZodNumber;
|
|
724
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
725
|
+
createdAt: z.ZodNumber;
|
|
726
|
+
deliveredAt: z.ZodNullable<z.ZodNumber>;
|
|
727
|
+
dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
728
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
729
|
+
provider: z.ZodString;
|
|
730
|
+
status: z.ZodString;
|
|
731
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
732
|
+
reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
733
|
+
status: z.ZodString;
|
|
734
|
+
ownership: z.ZodString;
|
|
735
|
+
at: z.ZodNumber;
|
|
736
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
737
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>>;
|
|
738
|
+
}, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>]>>>;
|
|
739
|
+
nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
740
|
+
}, z.core.$strip>;
|
|
741
|
+
/**
|
|
742
|
+
* Which page of reward deliveries to read: a page's `nextCursor` as `cursor`, and `limit`, 1 to
|
|
743
|
+
* 500 deliveries a page, 500 by default.
|
|
744
|
+
*/
|
|
745
|
+
declare const rewardDeliveryQuerySchema: z.ZodObject<{
|
|
746
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
747
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
748
|
+
}, z.core.$strict>;
|
|
749
|
+
type RewardDeliveryQuery = z.input<typeof rewardDeliveryQuerySchema>;
|
|
750
|
+
type RewardDelivery = z.infer<typeof rewardDeliverySchema>;
|
|
751
|
+
/** A page of reward deliveries as the clients answer it: a `Page` that `paginate()` takes. */
|
|
752
|
+
type RewardDeliveryPage = z.infer<typeof rewardDeliveriesSchema> & {
|
|
753
|
+
items: RewardDelivery[];
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* A Discord role the project's reward deliveries grant, with every delivery of it counted, however
|
|
757
|
+
* old. `quests` names the quests whose completions requested it.
|
|
758
|
+
*/
|
|
759
|
+
declare const discordRoleRewardSchema: z.ZodObject<{
|
|
760
|
+
roleId: z.ZodString;
|
|
761
|
+
quests: z.ZodArray<z.ZodString>;
|
|
762
|
+
deliveries: z.ZodObject<{
|
|
763
|
+
pending: z.ZodNumber;
|
|
764
|
+
delivered: z.ZodNumber;
|
|
765
|
+
failed: z.ZodNumber;
|
|
766
|
+
}, z.core.$strip>;
|
|
767
|
+
}, z.core.$strip>;
|
|
768
|
+
/** Every Discord role the project's reward deliveries grant, in this environment, by role ID. */
|
|
769
|
+
declare const discordRoleRewardsSchema: z.ZodObject<{
|
|
770
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
771
|
+
roleId: z.ZodString;
|
|
772
|
+
quests: z.ZodArray<z.ZodString>;
|
|
773
|
+
deliveries: z.ZodObject<{
|
|
774
|
+
pending: z.ZodNumber;
|
|
775
|
+
delivered: z.ZodNumber;
|
|
776
|
+
failed: z.ZodNumber;
|
|
777
|
+
}, z.core.$strip>;
|
|
778
|
+
}, z.core.$strip>>;
|
|
779
|
+
}, z.core.$strip>;
|
|
780
|
+
type DiscordRoleReward = z.infer<typeof discordRoleRewardSchema>;
|
|
781
|
+
|
|
782
|
+
export { memberConsentHistorySchema as $, type RewardDelivery as A, consentInputSchema as B, type ConsentChannel as C, type DiscordRoleReward as D, consentWordingMaxLength as E, contentMetricSchema as F, contentMetricsSchema as G, contentPerformancePolicySchema as H, contentQualificationDecisionSchema as I, contentQualificationPageSchema as J, type KnownConsentChannel as K, contentQualificationSchema as L, type MemberConsent as M, creatorAccountProviderSchema as N, creatorAccountSchema as O, type Page as P, type QuestClaimInput as Q, type ResponseResult as R, creatorAccountsSchema as S, discordRoleRewardSchema as T, type UnsupportedResponse as U, discordRoleRewardsSchema as V, knownConsentChannels as W, knownCreatorAccountProviders as X, knownRewardDeliverySchema as Y, managementStateQuerySchema as Z, memberConsentHistoryQuerySchema as _, type ConsentInput as a, memberConsentInputSchema as a0, memberConsentListSchema as a1, memberConsentSchema as a2, memberEnrollmentInputSchema as a3, pageCursorSchema as a4, pageQuerySchema as a5, questClaimInputSchema as a6, questEnrollmentInputSchema as a7, questEnrollmentSchema as a8, questOutcomePageSchema as a9, questOutcomeQuerySchema as aa, questOutcomeSchema as ab, responseListSchema as ac, responseSchema as ad, responseShape as ae, rewardDeliveriesSchema as af, rewardDeliveryQuerySchema as ag, rewardDeliverySchema as ah, roleReconciliationSchema as ai, type ConsentSource as b, type ConsentState as c, type CreatorAccount as d, type CreatorAccountProvider as e, type CreatorAccounts as f, type KnownConsentSource as g, type KnownConsentState as h, type PageQuery as i, type QuestEnrollment as j, type QuestEnrollmentInput as k, type QuestOutcome as l, type QuestOutcomePage as m, type QuestOutcomeQuery as n, QuestOutcomeState as o, paginate as p, type ResponseSchema as q, type RewardDeliveryQuery as r, type RewardDeliveryPage as s, contentQualificationQuerySchema as t, RewardDeliveryAction as u, type ContentMetric as v, type ContentPerformancePolicy as w, type ManagementStateQuery as x, type MemberConsentHistory as y, type MemberEnrollmentInput as z };
|