@domino-sdk/relay 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring.d.ts +37 -37
- package/dist/{browser-DFe7sWSN.d.ts → browser-Cf1opQjX.d.ts} +115 -115
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +2 -2
- package/dist/{chunk-ZVIRG24J.js → chunk-24AFCBZN.js} +1 -1
- package/dist/{chunk-GZ6FJAXN.js → chunk-DGWMLN35.js} +52 -11
- package/dist/{client-XiuFnug_.d.ts → client-gqnRUHpC.d.ts} +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +5 -3
- package/dist/react/index.js +25 -4
- package/dist/schema.d.ts +1 -1
- package/dist/server/index.d.ts +229 -5
- package/dist/server/index.js +494 -445
- package/package.json +1 -1
- package/dist/{activity-DeKJsRry.d.ts → activity-B8k9Sa_a.d.ts} +114 -114
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
engagementBoundaryPageSchema,
|
|
23
23
|
engagementPageQuerySchema,
|
|
24
24
|
engagementPageSchema,
|
|
25
|
+
isRelayError,
|
|
25
26
|
leaderboardDefinitionSchema,
|
|
26
27
|
leaderboardPageSchema,
|
|
27
28
|
leaderboardPlacementSchema,
|
|
@@ -104,7 +105,7 @@ var draftSchema = z.union([
|
|
|
104
105
|
claimInputSchema,
|
|
105
106
|
z.object({ kind: z.literal("photo"), file: z.instanceof(Blob) })
|
|
106
107
|
]);
|
|
107
|
-
var
|
|
108
|
+
var activeRecordSchema = z.union([
|
|
108
109
|
z.object({
|
|
109
110
|
...common,
|
|
110
111
|
stage: z.literal("review"),
|
|
@@ -131,6 +132,14 @@ var recordSchema = z.union([
|
|
|
131
132
|
attempt: identifier
|
|
132
133
|
})
|
|
133
134
|
]);
|
|
135
|
+
var recordSchema = z.union([
|
|
136
|
+
activeRecordSchema,
|
|
137
|
+
z.object({
|
|
138
|
+
...common,
|
|
139
|
+
stage: z.literal("retired"),
|
|
140
|
+
previous: activeRecordSchema
|
|
141
|
+
})
|
|
142
|
+
]);
|
|
134
143
|
function submissions(transport, configuredStore, namespace) {
|
|
135
144
|
async function open(quest, options = {
|
|
136
145
|
input: "photo"
|
|
@@ -184,7 +193,7 @@ function submissions(transport, configuredStore, namespace) {
|
|
|
184
193
|
}
|
|
185
194
|
const record = parsed.data;
|
|
186
195
|
const input = record.stage === "review" ? record.draft?.kind : "input" in record ? record.input.kind : "photo";
|
|
187
|
-
if (!options.recoverPrevious && input !== options.input) {
|
|
196
|
+
if (record.stage !== "retired" && !options.recoverPrevious && input !== options.input) {
|
|
188
197
|
throw clientError(
|
|
189
198
|
"Saved submission uses a different input type. Reopen it with its original type to recover it.",
|
|
190
199
|
RelayErrorCode.SubmissionConflict
|
|
@@ -192,18 +201,40 @@ function submissions(transport, configuredStore, namespace) {
|
|
|
192
201
|
}
|
|
193
202
|
return record;
|
|
194
203
|
}
|
|
195
|
-
function claim(record) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
async function claim(record) {
|
|
205
|
+
try {
|
|
206
|
+
return await transport.claim(
|
|
207
|
+
{
|
|
208
|
+
quest,
|
|
209
|
+
actionId: record.id,
|
|
210
|
+
...record.release ? { release: record.release } : {},
|
|
211
|
+
..."evidence" in record ? { evidence: record.evidence } : record.input.kind !== "none" ? { input: record.input } : {}
|
|
212
|
+
},
|
|
213
|
+
sessionId
|
|
214
|
+
);
|
|
215
|
+
} catch (error) {
|
|
216
|
+
if (isRelayError(error) && error.kind === "http" && !error.uncertain && error.status === 409 && error.code === "operation-retired") {
|
|
217
|
+
await store.write(key, {
|
|
218
|
+
id: record.id,
|
|
219
|
+
quest,
|
|
220
|
+
release: record.release,
|
|
221
|
+
stage: "retired",
|
|
222
|
+
previous: record
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function retiredError() {
|
|
229
|
+
return clientError(
|
|
230
|
+
"This saved submission was retired. Review the current quest, then discard it before starting a new submission.",
|
|
231
|
+
"operation-retired"
|
|
204
232
|
);
|
|
205
233
|
}
|
|
206
234
|
async function resumeRecord(saved) {
|
|
235
|
+
if (saved.stage === "retired") {
|
|
236
|
+
throw retiredError();
|
|
237
|
+
}
|
|
207
238
|
if (saved.stage === "review") {
|
|
208
239
|
throw new QuestUpdatedError(
|
|
209
240
|
"This quest changed. Review it before submitting again.",
|
|
@@ -267,6 +298,9 @@ function submissions(transport, configuredStore, namespace) {
|
|
|
267
298
|
return store.exclusive(key, async () => {
|
|
268
299
|
await currentSession();
|
|
269
300
|
const existing = await read();
|
|
301
|
+
if (existing?.stage === "retired") {
|
|
302
|
+
throw retiredError();
|
|
303
|
+
}
|
|
270
304
|
if (existing?.stage === "review" && existing.release === record.release) {
|
|
271
305
|
throw new QuestUpdatedError(
|
|
272
306
|
"Review the latest quest before submitting again.",
|
|
@@ -301,6 +335,10 @@ function submissions(transport, configuredStore, namespace) {
|
|
|
301
335
|
if (!record) {
|
|
302
336
|
return;
|
|
303
337
|
}
|
|
338
|
+
if (record.stage === "retired") {
|
|
339
|
+
await store.write(key, null);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
304
342
|
if (record.stage !== "submitted") {
|
|
305
343
|
throw clientError(
|
|
306
344
|
"Resume the unfinished submission before starting over.",
|
|
@@ -323,6 +361,9 @@ function submissions(transport, configuredStore, namespace) {
|
|
|
323
361
|
if (!record) {
|
|
324
362
|
return { kind: "empty" };
|
|
325
363
|
}
|
|
364
|
+
if (record.stage === "retired") {
|
|
365
|
+
return { kind: "needs-review", reason: "operation-retired" };
|
|
366
|
+
}
|
|
326
367
|
if (record.stage === "review") {
|
|
327
368
|
return { kind: "needs-review" };
|
|
328
369
|
}
|
|
@@ -99,6 +99,7 @@ type SubmissionStatus = {
|
|
|
99
99
|
kind: "empty";
|
|
100
100
|
} | {
|
|
101
101
|
kind: "needs-review";
|
|
102
|
+
reason?: "operation-retired";
|
|
102
103
|
} | {
|
|
103
104
|
kind: "pending";
|
|
104
105
|
stage: "upload" | "claim";
|
|
@@ -3415,7 +3416,17 @@ declare function createRelayClient(options: RelayClientOptions): {
|
|
|
3415
3416
|
(quest: string, options?: {
|
|
3416
3417
|
input: "photo";
|
|
3417
3418
|
release?: string;
|
|
3418
|
-
recoverPrevious
|
|
3419
|
+
recoverPrevious
|
|
3420
|
+
/**
|
|
3421
|
+
* The session ID the app read (`auth.session()`). Relay refuses the call with a `RelayError`
|
|
3422
|
+
* whose code is `stale-session` if the member's session changed since. Calls Relay binds to a
|
|
3423
|
+
* session (wallet linking, collection passes, retries) read the current session when omitted.
|
|
3424
|
+
*/
|
|
3425
|
+
? /**
|
|
3426
|
+
* The session ID the app read (`auth.session()`). Relay refuses the call with a `RelayError`
|
|
3427
|
+
* whose code is `stale-session` if the member's session changed since. Calls Relay binds to a
|
|
3428
|
+
* session (wallet linking, collection passes, retries) read the current session when omitted.
|
|
3429
|
+
*/: boolean;
|
|
3419
3430
|
repeatable?: boolean;
|
|
3420
3431
|
}): Promise<PhotoSubmission>;
|
|
3421
3432
|
(quest: string, options: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, S as SubmissionDraft, l as SubmissionStatus, m as SubmissionStore, V as ValueSubmission, n as createRelayClient, o as isRelayError } from './client-
|
|
1
|
+
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, S as SubmissionDraft, l as SubmissionStatus, m as SubmissionStore, V as ValueSubmission, n as createRelayClient, o as isRelayError } from './client-gqnRUHpC.js';
|
|
2
2
|
export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-DWduJCGV.js';
|
|
3
3
|
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-DfJzH2ci.js';
|
|
4
4
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
package/dist/index.js
CHANGED
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as Page, d as ParticipantSession, R as RelayEvent, b as ParticipantActivity, a as PageQuery, g as exchangeSchema, M as MemberSummary } from '../pages-BBYD21IE.js';
|
|
2
|
-
import { g as RelayError, k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission, S as SubmissionDraft } from '../client-
|
|
2
|
+
import { g as RelayError, k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission, S as SubmissionDraft } from '../client-gqnRUHpC.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { i as QuestView, b as QuestEnrollmentInput, Q as QuestClaimInput, f as QuestOutcomeQuery, P as questExperienceSchema, n as RewardDeliveryAction, A as contentQualificationQuerySchema, d as QuestOutcome } from '../outcomes-kVB-Juzs.js';
|
|
@@ -7,8 +7,8 @@ import { aG as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollm
|
|
|
7
7
|
import { E as Entitlement, a as AttemptStatus, h as TrackerSkipCode, bI as submitSchema, aI as contentPerformanceQuerySchema, T as TieredRewardReference } from '../schema-DfJzH2ci.js';
|
|
8
8
|
import { y as walletAddressInputSchema, I as walletSignatureSchema, L as LinkedWallet, f as WalletSigner, d as WalletSignInNetwork } from '../wallet-YssWxGg8.js';
|
|
9
9
|
import { F as profileUpdateSchema, c as ProfileCompletionQuery, f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-D2aFcOxu.js';
|
|
10
|
-
import { c as createBrowserRelayClient, J as JSONType, S as SignInMethods, C as CosmosChains, a as SignInOption, b as SignInUnavailable, d as SignInWallet, D as DiscoveredWallet } from '../browser-
|
|
11
|
-
export { E as EmailSignInOption, O as OAuthSignInOption, e as SignInIcon, W as WalletSignInOption } from '../browser-
|
|
10
|
+
import { c as createBrowserRelayClient, J as JSONType, S as SignInMethods, C as CosmosChains, a as SignInOption, b as SignInUnavailable, d as SignInWallet, D as DiscoveredWallet } from '../browser-Cf1opQjX.js';
|
|
11
|
+
export { E as EmailSignInOption, O as OAuthSignInOption, e as SignInIcon, W as WalletSignInOption } from '../browser-Cf1opQjX.js';
|
|
12
12
|
import * as zod from 'zod';
|
|
13
13
|
import { z } from 'zod';
|
|
14
14
|
import { a as AuthProvider, A as AccountConnection } from '../submission-input-BZkm6ohU.js';
|
|
@@ -4971,6 +4971,8 @@ declare function useQuest(observed: QuestView): {
|
|
|
4971
4971
|
error: RelayError | null;
|
|
4972
4972
|
busy: boolean;
|
|
4973
4973
|
saved: SavedSubmission;
|
|
4974
|
+
/** Review and explicitly restart this terminally retired saved submission. */
|
|
4975
|
+
retired: boolean;
|
|
4974
4976
|
/** The attempt the last "received" notice is about. */
|
|
4975
4977
|
receipt: string | null;
|
|
4976
4978
|
startingFresh: boolean;
|
package/dist/react/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
discoverSolanaWallets,
|
|
9
9
|
readSignInMethods,
|
|
10
10
|
signInOptionsFrom
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-24AFCBZN.js";
|
|
12
|
+
import "../chunk-DGWMLN35.js";
|
|
13
13
|
import "../chunk-EYH5RDIE.js";
|
|
14
14
|
import {
|
|
15
15
|
RelayErrorCode,
|
|
@@ -1447,6 +1447,8 @@ function useQuest(observed) {
|
|
|
1447
1447
|
const [busy, setBusy] = useState4(false);
|
|
1448
1448
|
const [discardedAttempt, setDiscardedAttempt] = useState4(null);
|
|
1449
1449
|
const [saved, setSaved] = useState4("none");
|
|
1450
|
+
const [recoveryRevision, setRecoveryRevision] = useState4(0);
|
|
1451
|
+
const [retired, setRetired] = useState4(false);
|
|
1450
1452
|
const [receipt, setReceipt] = useState4(null);
|
|
1451
1453
|
useEffect5(() => setLatest(null), [observed.release]);
|
|
1452
1454
|
const view = latest ?? observed;
|
|
@@ -1459,6 +1461,9 @@ function useQuest(observed) {
|
|
|
1459
1461
|
if (!active) {
|
|
1460
1462
|
return;
|
|
1461
1463
|
}
|
|
1464
|
+
setRetired(
|
|
1465
|
+
!completed && status.kind === "needs-review" && status.reason === "operation-retired"
|
|
1466
|
+
);
|
|
1462
1467
|
setSaved(
|
|
1463
1468
|
completed || status.kind === "empty" || status.kind === "submitted" ? "none" : status.kind === "needs-review" ? "outdated" : "interrupted"
|
|
1464
1469
|
);
|
|
@@ -1467,7 +1472,7 @@ function useQuest(observed) {
|
|
|
1467
1472
|
return () => {
|
|
1468
1473
|
active = false;
|
|
1469
1474
|
};
|
|
1470
|
-
}, [relay, quest, release, completed, attempt, busy]);
|
|
1475
|
+
}, [relay, quest, release, completed, attempt, busy, recoveryRevision]);
|
|
1471
1476
|
const run = useCallback4(
|
|
1472
1477
|
async (action) => {
|
|
1473
1478
|
setBusy(true);
|
|
@@ -1489,6 +1494,7 @@ function useQuest(observed) {
|
|
|
1489
1494
|
setError(asRelayError(cause, "Something went wrong."));
|
|
1490
1495
|
} finally {
|
|
1491
1496
|
setBusy(false);
|
|
1497
|
+
setRecoveryRevision((revision) => revision + 1);
|
|
1492
1498
|
}
|
|
1493
1499
|
},
|
|
1494
1500
|
[store]
|
|
@@ -1507,12 +1513,14 @@ function useQuest(observed) {
|
|
|
1507
1513
|
await (await relay.quests.open(current)).discard();
|
|
1508
1514
|
setDiscardedAttempt(current.attempt?.id ?? null);
|
|
1509
1515
|
setSaved("none");
|
|
1516
|
+
setRetired(false);
|
|
1510
1517
|
setDraft(null);
|
|
1511
1518
|
setNotice(null);
|
|
1512
1519
|
} catch (cause) {
|
|
1513
1520
|
setError(asRelayError(cause, "Could not start a new submission."));
|
|
1514
1521
|
} finally {
|
|
1515
1522
|
setBusy(false);
|
|
1523
|
+
setRecoveryRevision((revision) => revision + 1);
|
|
1516
1524
|
}
|
|
1517
1525
|
},
|
|
1518
1526
|
submit: (input) => run(async () => {
|
|
@@ -1573,12 +1581,25 @@ function useQuest(observed) {
|
|
|
1573
1581
|
error,
|
|
1574
1582
|
busy,
|
|
1575
1583
|
saved,
|
|
1584
|
+
/** Review and explicitly restart this terminally retired saved submission. */
|
|
1585
|
+
retired,
|
|
1576
1586
|
/** The attempt the last "received" notice is about. */
|
|
1577
1587
|
receipt,
|
|
1578
1588
|
startingFresh,
|
|
1579
1589
|
...actions
|
|
1580
1590
|
}),
|
|
1581
|
-
[
|
|
1591
|
+
[
|
|
1592
|
+
view,
|
|
1593
|
+
draft,
|
|
1594
|
+
notice,
|
|
1595
|
+
error,
|
|
1596
|
+
busy,
|
|
1597
|
+
saved,
|
|
1598
|
+
retired,
|
|
1599
|
+
receipt,
|
|
1600
|
+
startingFresh,
|
|
1601
|
+
actions
|
|
1602
|
+
]
|
|
1582
1603
|
);
|
|
1583
1604
|
}
|
|
1584
1605
|
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as AccountRole, j as AppIdentityKind, A as Attempt, a as AttemptStatus, B as Bound, C as Condition, k as ContentBody, l as ContentMetricName, m as ContentPerformanceSnapshot, D as DataLeaves, n as Decision, E as Entitlement, o as EntitlementCorrection, p as EntitlementState, b as EvaluatorProgress, I as IdentityKind, K as KnownAttemptStatus, q as KnownIdentityKind, c as KnownTrackerSkipCode, r as MemberIdentity, s as MemberPage, M as MemberProgress, O as OpenIdentityKind, P as PhotoResult, t as PickupAvailability, u as PublishedRelease, v as QuestAvailability, Q as QuestBudgetView, w as QuestDescription, d as QuestPresentation, e as QuestProfile, x as QuestSettingsInput, f as QuizEvidence, y as ReleaseInput, z as ReviewPage, R as Reward, F as RoleOf, G as Snapshot, H as SourceRoles, S as SubmissionEvidence, g as SubmitInput, J as TextResult, L as TextReviewInput, N as TieredRewardDefinition, T as TieredRewardReference, U as Tracker, V as TrackerAccount, W as TrackerAttribution, X as TrackerBound, Y as TrackerCondition, Z as TrackerContent, _ as TrackerContentQuery, $ as TrackerData, a0 as TrackerDataIssue, a1 as TrackerDataSchema, a2 as TrackerDefinition, a3 as TrackerDefinitionResponse, a4 as TrackerOutcome, a5 as TrackerOutcomeQuery, a6 as TrackerPage, a7 as TrackerPreview, a8 as TrackerPreviewInput, a9 as TrackerQuery, aa as TrackerReadQuery, ab as TrackerReader, ac as TrackerRecord, h as TrackerSkipCode, ad as TrackerSource, ae as TrackerSourceKind, af as TrackerSourceResponse, ag as TrackerStatus, ah as TrackerTriggerContext, ai as TrackerTriggerMode, aj as TrackerTriggerPolicy, ak as TrackerWhere, al as TriggerEnrollment, am as TriggerHistorical, an as TriggerSince, ao as TypedTrackerRecord, ap as Where, aq as WhereSetting, ar as WithAccountRoles, as as WithContent, at as WithRecordData, au as XContentMetric, av as XTweet, aw as accountRoleSchema, ax as appIdentityKindSchema, ay as artifactSchema, az as attemptSchema, aA as batchReleaseSchema, aB as beginHandoverSchema, aC as beneficiaryRole, aD as completionRecordSchema, aE as configurePickupSchema, aF as confirmHandoverSchema, aG as contentMetricNameSchema, aH as contentPerformancePageSchema, aI as contentPerformanceQuerySchema, aJ as contentPerformanceSnapshotSchema, aK as createStockItemSchema, aL as customContentSchema, aM as customSourceSchema, aN as decisionSchema, aO as defaultTriggerMode, aP as deferPolicy, aQ as entitlementCorrectionSchema, aR as entitlementRecoverySchema, aS as entitlementSchema, aT as entitlementStateSchema, aU as errorSchema, aV as evaluatorProgressSchema, aW as evaluatorProtocol, aX as evaluatorProtocolSchema, aY as eventSchema, aZ as evidenceSchema, a_ as identityKindSchema, a$ as integrationRewardSchema, b0 as isAppIdentityKind, b1 as isKnownTrackerSource, b2 as knownIdentityKinds, b3 as mediaUrlSchema, b4 as memberIdentitySchema, b5 as memberListSchema, b6 as memberPageSchema, b7 as memberProgressSchema, b8 as openIdentityKindSchema, b9 as photoResultSchema, ba as pickupAllocationSchema, bb as pickupAvailabilitySchema, bc as pickupCatalogSchema, bd as pickupPolicySchema, be as pickupSelectionSchema, bf as pointsRewardSchema, bg as publishedReleaseSchema, bh as publishedTrackerSchema, bi as questAvailabilitySchema, bj as questBudgetViewSchema, bk as questDescriptionSchema, bl as questPresentationSchema, bm as questProfileSchema, bn as questSettingsInputSchema, bo as quizAnswersSchema, bp as quizEvidenceSchema, bq as releaseSchema, br as reservationSchema, bs as reviewItemSchema, bt as reviewListSchema, bu as reviewModeSchema, bv as reviewPageSchema, bw as rewardBundleSchema, bx as rewardKey, by as rewardSchema, bz as snapshotSchema, bA as sourceContent, bB as sourceIdentities, bC as staffDecisionSchema, bD as stockItemSchema, bE as stockSchema, bF as storedQuestDescriptionSchema, bG as storedReviewModeSchema, bH as submissionEvidenceSchema, bI as submitSchema, bJ as templateSchema, bK as textResultSchema, bL as textReviewInputSchema, bM as tierRewardSchema, bN as tieredRewardDefinitionSchema, bO as tieredRewardReferenceSchema, bP as trackerAccountSchema, bQ as trackerArtifactSchema, bR as trackerAttributionSchema, bS as trackerBoundSchema, bT as trackerConditionSchema, bU as trackerContentQuerySchema, bV as trackerContentReadSchema, bW as trackerContentSchema, bX as trackerContentStageSchema, bY as trackerControlSchema, bZ as trackerDataMaxBranches, b_ as trackerDataMaxEntries, b$ as trackerDataSchemaSchema, c0 as trackerDefinitionResponseSchema, c1 as trackerDefinitionSchema, c2 as trackerEvidenceSchema, c3 as trackerIngestResultSchema, c4 as trackerIngestSchema, c5 as trackerOutcomePageSchema, c6 as trackerOutcomeQuerySchema, c7 as trackerOutcomeRetrySchema, c8 as trackerOutcomeSchema, c9 as trackerPageSchema, ca as trackerPreviewInputSchema, cb as trackerPreviewLimits, cc as trackerPreviewSchema, cd as trackerQuerySchema, ce as trackerRecordAccountSchema, cf as trackerRecordInputSchema, cg as trackerRecordSchema, ch as trackerSkipCodes, ci as trackerSourceKinds, cj as trackerSourceResponseSchema, ck as trackerSourceSchema, cl as trackerStatusSchema, cm as trackerSummarySchema, cn as trackerTriggerContextSchema, co as trackerTriggerModeSchema, cp as trackerTriggerPolicySchema, cq as trackerTriggerRecordSchema, cr as trackerWhereSchema, cs as triggerAdmission, ct as triggerEnrollmentSchema, cu as triggerHistoricalSchema, cv as triggerMode, cw as triggerSchema, cx as triggerSinceSchema, cy as whereConditions, cz as whereSettings, cA as xAccountRoles, cB as xContentBodySchema, cC as xContentMetrics, cD as xSearchSourceSchema, cE as xTweetSchema } from './schema-DfJzH2ci.js';
|
|
2
2
|
export { A as AccountConnection, a as AuthProvider, D as DiscordMember, d as DiscordMessage, e as DiscordMessageData, f as DiscordMessageTextData, g as DiscordReactionData, h as DiscordReader, M as MissingPrerequisite, P as Prerequisite, T as TextEvidence, b as TextOptions, U as UrlEvidence, c as UrlOptions, V as ValueEvidence, i as accountConnectionSchema, j as authProviderSchema, k as balanceAtLeast, l as balancePrerequisiteSchema, m as completed, n as completionPrerequisiteSchema, o as discordMemberInputSchema, p as discordMemberSchema, q as discordMessageDataSchema, r as discordMessageInputSchema, s as discordMessageSchema, t as discordMessageTextDataSchema, u as discordMessagesSourceSchema, v as discordReactionDataSchema, w as discordReactionsSourceSchema, x as discordResourceSourceSchema, y as discordRewardSchema, z as groupPrerequisiteSchema, B as inGroup, C as missingPrerequisiteSchema, E as prerequisiteSchema, F as textEvidenceSchema, G as textOptionsSchema, H as urlEvidenceSchema, I as urlOptionsSchema, J as validateSubmissionValue, K as valueEvidenceSchema, L as xPostId } from './submission-input-BZkm6ohU.js';
|
|
3
3
|
export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantActivity, c as ParticipantPrincipal, d as ParticipantSession, R as RelayEvent, S as Session, e as authScopeSchema, f as exchangeResultSchema, g as exchangeSchema, k as knownRelayEventSchema, m as memberSummarySchema, p as pageCursorSchema, h as pageQuerySchema, i as participantActivityQuerySchema, j as participantActivitySchema, l as participantPrincipalSchema, n as participantSessionSchema, o as principalSchema, r as relayEventSchema, s as sessionMember, q as sessionSchema } from './pages-BBYD21IE.js';
|
|
4
|
-
export { C as CalendarPeriod, D as DeploymentPreview, a as DeploymentRecord, P as ProjectCalendar, b as ProjectCalendarInput, c as activityTypeSchema, d as activityTypes, e as calendarPeriodSchema, f as canonicalTimeZone, g as deploymentPreviewSchema, h as deploymentRecordSchema, i as deploymentResultSchema, j as deploymentSourceSchema, p as projectCalendarDeclarationSchema, k as projectCalendarInputSchema, l as projectCalendarSchema, m as projectCatalogArtifactSchema, n as projectDeploymentSchema, o as promoteDeploymentSchema, q as publishDeploymentSchema, r as refuseStreakTimeZone, s as refuseWindowTimeZone, t as rejectDeploymentSchema, u as rollbackDeploymentSchema, v as submitDeploymentSchema, w as timeZoneNameSchema, x as timeZoneSchema } from './activity-
|
|
4
|
+
export { C as CalendarPeriod, D as DeploymentPreview, a as DeploymentRecord, P as ProjectCalendar, b as ProjectCalendarInput, c as activityTypeSchema, d as activityTypes, e as calendarPeriodSchema, f as canonicalTimeZone, g as deploymentPreviewSchema, h as deploymentRecordSchema, i as deploymentResultSchema, j as deploymentSourceSchema, p as projectCalendarDeclarationSchema, k as projectCalendarInputSchema, l as projectCalendarSchema, m as projectCatalogArtifactSchema, n as projectDeploymentSchema, o as promoteDeploymentSchema, q as publishDeploymentSchema, r as refuseStreakTimeZone, s as refuseWindowTimeZone, t as rejectDeploymentSchema, u as rollbackDeploymentSchema, v as submitDeploymentSchema, w as timeZoneNameSchema, x as timeZoneSchema } from './activity-B8k9Sa_a.js';
|
|
5
5
|
export { A as AvailabilityWindow, C as CampaignDefinition, a as CampaignEnrollment, b as CampaignEnrollmentInput, c as CampaignView, d as CampaignWithdrawalInput, E as EngagementBudget, q as EngagementDefinition, K as KnownPointEntryKind, L as LeaderboardDefinition, e as LeaderboardPage, f as LeaderboardPlacement, g as LeaderboardQuery, r as LeaderboardSettlement, s as LeaderboardSettlementPolicy, t as LeaderboardSettlementSummary, u as ManagedPointLedger, M as MemberCampaignEnrollmentInput, h as MemberCampaignWithdrawalInput, P as PointBalance, i as PointBalances, j as PointEntry, k as PointEntryKind, l as PointHistoryPage, m as PointHistoryQuery, v as PointLedger, n as PointLedgerReference, o as ProjectGroup, p as ProjectGroupReference, R as ReferralDefinition, w as availabilityWindowSchema, x as campaignDefinitionSchema, y as campaignEnrollmentInputSchema, z as campaignEnrollmentSchema, B as campaignViewSchema, D as campaignWithdrawalInputSchema, F as createPointLedgerSchema, G as defineCampaign, H as defineGroup, I as engagementArtifactSchema, J as engagementBoundaryPageSchema, N as engagementBudgetSchema, O as engagementChangePreviewInputSchema, Q as engagementChangePreviewSchema, S as engagementChangeSchema, T as engagementDefinitionSchema, U as engagementDeploymentEntrySchema, V as engagementPageQuerySchema, W as engagementPageSchema, X as engagementPublishSchema, Y as engagementRuleSchema, Z as engagementScoreInputSchema, _ as engagementScoreSchema, $ as engagementSettlementSchema, a0 as engagementVersionPageSchema, a1 as engagementVersionQuerySchema, a2 as leaderboardArtifactSchema, a3 as leaderboardAuthoringSchema, a4 as leaderboardDefinitionSchema, a5 as leaderboardExclusionSchema, a6 as leaderboardGroupSchema, a7 as leaderboardPageSchema, a8 as leaderboardPlacementSchema, a9 as leaderboardPreviewSchema, aa as leaderboardPrizeRewardSchema, ab as leaderboardPrizeSchema, ac as leaderboardQuerySchema, ad as leaderboardRowSchema, ae as leaderboardSettlementApprovalSchema, af as leaderboardSettlementPolicySchema, ag as leaderboardSettlementRowSchema, ah as leaderboardSettlementSchema, ai as leaderboardSettlementStatusSchema, aj as leaderboardSettlementSummarySchema, ak as leaderboardWindowSchema, al as managedPointLedgerSchema, am as memberCampaignEnrollmentInputSchema, an as memberCampaignWithdrawalInputSchema, ao as pointBalanceSchema, ap as pointBalancesSchema, aq as pointEntrySchema, ar as pointHistoryPageSchema, as as pointHistoryQuerySchema, at as pointLedgerArtifactSchema, au as pointLedgerDeclarationSchema, av as pointLedgerPropertiesSchema, aw as pointLedgerReferenceSchema, ax as pointLedgerSchema, ay as pointsAccountSchema, az as pointsEntrySchema, aA as pointsMutationSchema, aB as pointsResultSchema, aC as projectGroupKey, aD as projectGroupSchema, aE as publishedLeaderboardSchema, aF as publishedReferralSchema, aG as referralAcceptSchema, aH as referralAccountSchema, aI as referralArtifactSchema, aJ as referralAuthoringSchema, aK as referralControlSchema, aL as referralDefinitionSchema, aM as referralHistorySchema, aN as referralManagementSchema, aO as referralRelationshipSchema, aP as referralSummarySchema } from './groups-Ck-OxzjD.js';
|
|
6
6
|
export { C as ContentMetric, j as ContentPerformancePolicy, M as MemberEnrollmentInput, k as QuestCatalog, Q as QuestClaimInput, l as QuestDraft, a as QuestEnrollment, b as QuestEnrollmentInput, m as QuestInstance, c as QuestInteraction, d as QuestOutcome, e as QuestOutcomePage, f as QuestOutcomeQuery, g as QuestOutcomeState, h as QuestRewardView, i as QuestView, R as RewardDelivery, n as RewardDeliveryAction, o as allocateQuestSchema, p as allocatedQuestSchema, q as catalogDeploymentPreviewSchema, r as catalogDeploymentSchema, s as collectionSlotDeclarationSchema, t as collectionSlotSchema, u as collectionViewSchema, v as contentMetricSchema, w as contentMetricsSchema, x as contentPerformancePolicySchema, y as contentQualificationDecisionSchema, z as contentQualificationPageSchema, A as contentQualificationQuerySchema, B as contentQualificationSchema, D as interactionSchema, E as knownRewardDeliverySchema, F as memberEnrollmentInputSchema, G as publishQuestDraftSchema, H as questCatalogSchema, I as questClaimInputSchema, J as questCollectionSchema, K as questDraftChangesSchema, L as questDraftSchema, N as questEnrollmentInputSchema, O as questEnrollmentSchema, P as questExperienceSchema, S as questInstanceSchema, T as questInteraction, U as questOutcomePageSchema, V as questOutcomeQuerySchema, W as questOutcomeSchema, X as questPublicationPreviewSchema, Y as questRewardViewSchema, Z as questTypeVersionSchema, _ as questViewSchema, $ as rewardDeliveriesSchema, a0 as rewardDeliverySchema, a1 as roleReconciliationSchema, a2 as saveQuestDraftSchema } from './outcomes-kVB-Juzs.js';
|
|
7
7
|
export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress, f as automaticCatchUpConfirmSchema, g as automaticCatchUpInputSchema, h as automaticCatchUpPreviewSchema, i as automaticCatchUpResultSchema, j as automaticEventSchema, k as automaticOutcomePageSchema, l as automaticOutcomeQuerySchema, m as automaticOutcomeSchema, n as automaticSchedulingPageSchema, o as automaticSchedulingQuerySchema, p as automaticSchedulingRetrySchema, q as automaticSchedulingSchema, r as collectionBeginSchema, s as collectionCodeSchema, t as collectionPassSchema, u as collectionPreviewSchema, v as collectionResolveSchema, w as counterAchievementSchema, x as counterContributionSchema, y as counterGoalSchema, z as counterHistoryQuerySchema, B as counterHistorySchema, D as counterModerationResultSchema, E as counterModerationSchema, F as counterPolicySchema, G as counterProgressSchema, H as counterWindowSchema } from './automatic-outcomes-B1xrETxm.js';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as contentQualificationQuerySchema, r as catalogDeploymentSchema, a2 as saveQuestDraftSchema, G as publishQuestDraftSchema, n as RewardDeliveryAction, F as memberEnrollmentInputSchema, o as allocateQuestSchema } from '../outcomes-kVB-Juzs.js';
|
|
2
2
|
import { O as OpenIdentityKind, a1 as TrackerDataSchema, a9 as TrackerQuery, bV as trackerContentReadSchema, bY as trackerControlSchema, c4 as trackerIngestSchema, a5 as TrackerOutcomeQuery, c7 as trackerOutcomeRetrySchema, a8 as TrackerPreviewInput, aI as contentPerformanceQuerySchema, a as AttemptStatus, aE as configurePickupSchema, bn as questSettingsInputSchema, bI as submitSchema, bC as staffDecisionSchema, aB as beginHandoverSchema, aF as confirmHandoverSchema, aQ as entitlementCorrectionSchema, aK as createStockItemSchema } from '../schema-DfJzH2ci.js';
|
|
3
3
|
export { aS as entitlementSchema, b4 as memberIdentitySchema } from '../schema-DfJzH2ci.js';
|
|
4
|
-
import { r as collectionBeginSchema, z as counterHistoryQuerySchema, E as counterModerationSchema, o as automaticSchedulingQuerySchema, p as automaticSchedulingRetrySchema, l as automaticOutcomeQuerySchema, g as automaticCatchUpInputSchema, f as automaticCatchUpConfirmSchema } from '../automatic-outcomes-B1xrETxm.js';
|
|
5
4
|
import { z } from 'zod';
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { r as collectionBeginSchema, z as counterHistoryQuerySchema, E as counterModerationSchema, o as automaticSchedulingQuerySchema, p as automaticSchedulingRetrySchema, l as automaticOutcomeQuerySchema, g as automaticCatchUpInputSchema, f as automaticCatchUpConfirmSchema } from '../automatic-outcomes-B1xrETxm.js';
|
|
6
|
+
import { n as projectDeploymentSchema, q as publishDeploymentSchema, v as submitDeploymentSchema, t as rejectDeploymentSchema, o as promoteDeploymentSchema, u as rollbackDeploymentSchema, k as projectCalendarInputSchema } from '../activity-B8k9Sa_a.js';
|
|
7
|
+
export { c as activityTypeSchema, d as activityTypes } from '../activity-B8k9Sa_a.js';
|
|
8
8
|
import { O as engagementChangePreviewInputSchema, S as engagementChangeSchema, a1 as engagementVersionQuerySchema, V as engagementPageQuerySchema, X as engagementPublishSchema, ax as pointLedgerSchema, aA as pointsMutationSchema, aK as referralControlSchema, ac as leaderboardQuerySchema, a5 as leaderboardExclusionSchema, p as ProjectGroupReference, a6 as leaderboardGroupSchema, am as memberCampaignEnrollmentInputSchema, an as memberCampaignWithdrawalInputSchema, F as createPointLedgerSchema, ae as leaderboardSettlementApprovalSchema } from '../groups-Ck-OxzjD.js';
|
|
9
9
|
import { h as offerControlSchema, m as redemptionCancellationSchema } from '../offers-Cy-e4o5x.js';
|
|
10
10
|
import { C as profileSettingsInputSchema, z as profileModerationSchema } from '../profiles-D2aFcOxu.js';
|
|
@@ -12,6 +12,49 @@ import { i as identityIntegrationInputSchema } from '../identity-integration-GxA
|
|
|
12
12
|
export { a as identityIntegrationSchema, c as identityKindClaimSchema } from '../identity-integration-GxAHdKR2.js';
|
|
13
13
|
import { R as RequestError, b as RequestErrorKind } from '../request-error-DWduJCGV.js';
|
|
14
14
|
|
|
15
|
+
declare const testMemberSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
test: z.ZodLiteral<true>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
declare const testMemberCreateSchema: z.ZodObject<{
|
|
21
|
+
actionId: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
/** Uses the participant submission body. Photo uploads require a participant upload session. */
|
|
25
|
+
declare const testMemberActionSchema: z.ZodObject<{
|
|
26
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"quiz">;
|
|
28
|
+
release: z.ZodOptional<z.ZodString>;
|
|
29
|
+
answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
|
|
30
|
+
[k: string]: string;
|
|
31
|
+
}, Record<string, string>>>;
|
|
32
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
33
|
+
kind: z.ZodLiteral<"text">;
|
|
34
|
+
value: z.ZodString;
|
|
35
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
36
|
+
kind: z.ZodLiteral<"url">;
|
|
37
|
+
value: z.ZodString;
|
|
38
|
+
}, z.core.$strict>]>>;
|
|
39
|
+
actionId: z.ZodString;
|
|
40
|
+
quest: z.ZodString;
|
|
41
|
+
release: z.ZodOptional<z.ZodString>;
|
|
42
|
+
evidence: z.ZodOptional<z.ZodString>;
|
|
43
|
+
operation: z.ZodLiteral<"attempts.submit">;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
declare const testMemberResetSchema: z.ZodObject<{
|
|
46
|
+
actionId: z.ZodString;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
declare const testMemberResetResultSchema: z.ZodObject<{
|
|
49
|
+
member: z.ZodString;
|
|
50
|
+
deleted: z.ZodLiteral<true>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
type TestMember = z.infer<typeof testMemberSchema>;
|
|
53
|
+
type TestMemberCreateInput = z.input<typeof testMemberCreateSchema>;
|
|
54
|
+
type TestMemberActionInput = z.input<typeof testMemberActionSchema>;
|
|
55
|
+
type TestMemberResetInput = z.input<typeof testMemberResetSchema>;
|
|
56
|
+
type TestMemberResetResult = z.infer<typeof testMemberResetResultSchema>;
|
|
57
|
+
|
|
15
58
|
declare const webhookEventSchema: z.ZodObject<{
|
|
16
59
|
id: z.ZodString;
|
|
17
60
|
version: z.ZodLiteral<1>;
|
|
@@ -37589,6 +37632,8 @@ declare function hostedManagementClient(env: HostedManagementEnv): {
|
|
|
37589
37632
|
completions: number;
|
|
37590
37633
|
rewards: number;
|
|
37591
37634
|
lastActivity: number | null;
|
|
37635
|
+
test?: boolean | undefined;
|
|
37636
|
+
name?: string | null | undefined;
|
|
37592
37637
|
}[];
|
|
37593
37638
|
people: {
|
|
37594
37639
|
id: string;
|
|
@@ -37812,6 +37857,88 @@ declare function hostedManagementClient(env: HostedManagementEnv): {
|
|
|
37812
37857
|
reason: string | null;
|
|
37813
37858
|
} | null | undefined;
|
|
37814
37859
|
}>;
|
|
37860
|
+
testMembers: {
|
|
37861
|
+
create: (input: TestMemberCreateInput, call?: ManagementCallOptions) => Promise<{
|
|
37862
|
+
id: string;
|
|
37863
|
+
name: string;
|
|
37864
|
+
test: true;
|
|
37865
|
+
}>;
|
|
37866
|
+
list: (call?: ManagementCallOptions) => Promise<{
|
|
37867
|
+
id: string;
|
|
37868
|
+
name: string;
|
|
37869
|
+
test: true;
|
|
37870
|
+
}[]>;
|
|
37871
|
+
act: (member: string, input: TestMemberActionInput, call?: ManagementCallOptions) => Promise<{
|
|
37872
|
+
id: string;
|
|
37873
|
+
release: string;
|
|
37874
|
+
quest: string;
|
|
37875
|
+
member: string;
|
|
37876
|
+
evidence: string | null;
|
|
37877
|
+
status: AttemptStatus;
|
|
37878
|
+
reason: string | null;
|
|
37879
|
+
retries: number;
|
|
37880
|
+
generation: number;
|
|
37881
|
+
completion: string | null;
|
|
37882
|
+
reviewRewards: ({
|
|
37883
|
+
kind: "tier";
|
|
37884
|
+
reward: {
|
|
37885
|
+
id: string;
|
|
37886
|
+
title: string;
|
|
37887
|
+
tiers: {
|
|
37888
|
+
id: string;
|
|
37889
|
+
title: string;
|
|
37890
|
+
}[];
|
|
37891
|
+
inventory: {
|
|
37892
|
+
kind: "untracked";
|
|
37893
|
+
};
|
|
37894
|
+
fulfillment: {
|
|
37895
|
+
kind: "staff-handover";
|
|
37896
|
+
} | {
|
|
37897
|
+
kind: "automatic";
|
|
37898
|
+
};
|
|
37899
|
+
};
|
|
37900
|
+
tier: string;
|
|
37901
|
+
} | {
|
|
37902
|
+
kind: "points";
|
|
37903
|
+
balance: string;
|
|
37904
|
+
amount: number;
|
|
37905
|
+
} | {
|
|
37906
|
+
kind: "integration";
|
|
37907
|
+
provider: "discord";
|
|
37908
|
+
action: "grant-role";
|
|
37909
|
+
roleId: string;
|
|
37910
|
+
})[] | null;
|
|
37911
|
+
evaluationRun: number;
|
|
37912
|
+
deferCount: number;
|
|
37913
|
+
deferUntil: number | null;
|
|
37914
|
+
nextEvaluationAt: number | null;
|
|
37915
|
+
code: string | null;
|
|
37916
|
+
progress: {
|
|
37917
|
+
current: number;
|
|
37918
|
+
target: number;
|
|
37919
|
+
reason: string;
|
|
37920
|
+
} | null;
|
|
37921
|
+
requestedReview: boolean;
|
|
37922
|
+
createdAt: number;
|
|
37923
|
+
input?: {
|
|
37924
|
+
kind: "quiz";
|
|
37925
|
+
answers: {
|
|
37926
|
+
[k: string]: string;
|
|
37927
|
+
};
|
|
37928
|
+
release?: string | undefined;
|
|
37929
|
+
} | {
|
|
37930
|
+
kind: "text";
|
|
37931
|
+
value: string;
|
|
37932
|
+
} | {
|
|
37933
|
+
kind: "url";
|
|
37934
|
+
value: string;
|
|
37935
|
+
} | undefined;
|
|
37936
|
+
}>;
|
|
37937
|
+
reset: (member: string, input: TestMemberResetInput, call?: ManagementCallOptions) => Promise<{
|
|
37938
|
+
member: string;
|
|
37939
|
+
deleted: true;
|
|
37940
|
+
}>;
|
|
37941
|
+
};
|
|
37815
37942
|
members: {
|
|
37816
37943
|
counters: {
|
|
37817
37944
|
history: (member: string, quest: string, query?: z.input<typeof counterHistoryQuerySchema>, call?: ManagementCallOptions) => Promise<{
|
|
@@ -38420,6 +38547,8 @@ declare function hostedManagementClient(env: HostedManagementEnv): {
|
|
|
38420
38547
|
completions: number;
|
|
38421
38548
|
rewards: number;
|
|
38422
38549
|
lastActivity: number | null;
|
|
38550
|
+
test?: boolean | undefined;
|
|
38551
|
+
name?: string | null | undefined;
|
|
38423
38552
|
};
|
|
38424
38553
|
progress: {
|
|
38425
38554
|
member: string;
|
|
@@ -40145,6 +40274,8 @@ declare const questLifecycleSchema: z.ZodObject<{
|
|
|
40145
40274
|
type QuestLifecycle = z.infer<typeof questLifecycleSchema>;
|
|
40146
40275
|
declare const memberSchema: z.ZodObject<{
|
|
40147
40276
|
id: z.ZodString;
|
|
40277
|
+
test: z.ZodOptional<z.ZodBoolean>;
|
|
40278
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40148
40279
|
accounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
40149
40280
|
kind: z.ZodEnum<{
|
|
40150
40281
|
account: "account";
|
|
@@ -40866,6 +40997,8 @@ declare const pageSchema: z.ZodObject<{
|
|
|
40866
40997
|
}, z.core.$strip>;
|
|
40867
40998
|
members: z.ZodArray<z.ZodObject<{
|
|
40868
40999
|
id: z.ZodString;
|
|
41000
|
+
test: z.ZodOptional<z.ZodBoolean>;
|
|
41001
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40869
41002
|
accounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
40870
41003
|
kind: z.ZodEnum<{
|
|
40871
41004
|
account: "account";
|
|
@@ -41742,6 +41875,8 @@ declare const memberDetailSchema: z.ZodObject<{
|
|
|
41742
41875
|
}, z.core.$strip>;
|
|
41743
41876
|
member: z.ZodObject<{
|
|
41744
41877
|
id: z.ZodString;
|
|
41878
|
+
test: z.ZodOptional<z.ZodBoolean>;
|
|
41879
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41745
41880
|
accounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
41746
41881
|
kind: z.ZodEnum<{
|
|
41747
41882
|
account: "account";
|
|
@@ -42577,7 +42712,9 @@ type ManagementClientOptions = {
|
|
|
42577
42712
|
type ManagementRawInit = RequestInit & {
|
|
42578
42713
|
timeout?: number;
|
|
42579
42714
|
};
|
|
42580
|
-
type ManagementClient = ReturnType<typeof createManagementClient
|
|
42715
|
+
type ManagementClient = Omit<ReturnType<typeof createManagementClient>, "testMembers"> & {
|
|
42716
|
+
testMembers?: ReturnType<typeof createManagementClient>["testMembers"];
|
|
42717
|
+
};
|
|
42581
42718
|
declare function createManagementClient(options: ManagementClientOptions): {
|
|
42582
42719
|
raw: (path: string, init?: ManagementRawInit) => Promise<Response>;
|
|
42583
42720
|
request: <T>(path: string, schema: z.ZodType<T>, input?: unknown, method?: string, call?: ManagementCallOptions) => Promise<T>;
|
|
@@ -79205,6 +79342,8 @@ declare function createManagementClient(options: ManagementClientOptions): {
|
|
|
79205
79342
|
completions: number;
|
|
79206
79343
|
rewards: number;
|
|
79207
79344
|
lastActivity: number | null;
|
|
79345
|
+
test?: boolean | undefined;
|
|
79346
|
+
name?: string | null | undefined;
|
|
79208
79347
|
}[];
|
|
79209
79348
|
people: {
|
|
79210
79349
|
id: string;
|
|
@@ -79429,6 +79568,89 @@ declare function createManagementClient(options: ManagementClientOptions): {
|
|
|
79429
79568
|
reason: string | null;
|
|
79430
79569
|
} | null | undefined;
|
|
79431
79570
|
}>;
|
|
79571
|
+
/** Console sessions with publish permission, in test only. Reset deletes the member. */
|
|
79572
|
+
testMembers: {
|
|
79573
|
+
create: (input: TestMemberCreateInput, call?: ManagementCallOptions) => Promise<{
|
|
79574
|
+
id: string;
|
|
79575
|
+
name: string;
|
|
79576
|
+
test: true;
|
|
79577
|
+
}>;
|
|
79578
|
+
list: (call?: ManagementCallOptions) => Promise<{
|
|
79579
|
+
id: string;
|
|
79580
|
+
name: string;
|
|
79581
|
+
test: true;
|
|
79582
|
+
}[]>;
|
|
79583
|
+
act: (member: string, input: TestMemberActionInput, call?: ManagementCallOptions) => Promise<{
|
|
79584
|
+
id: string;
|
|
79585
|
+
release: string;
|
|
79586
|
+
quest: string;
|
|
79587
|
+
member: string;
|
|
79588
|
+
evidence: string | null;
|
|
79589
|
+
status: AttemptStatus;
|
|
79590
|
+
reason: string | null;
|
|
79591
|
+
retries: number;
|
|
79592
|
+
generation: number;
|
|
79593
|
+
completion: string | null;
|
|
79594
|
+
reviewRewards: ({
|
|
79595
|
+
kind: "tier";
|
|
79596
|
+
reward: {
|
|
79597
|
+
id: string;
|
|
79598
|
+
title: string;
|
|
79599
|
+
tiers: {
|
|
79600
|
+
id: string;
|
|
79601
|
+
title: string;
|
|
79602
|
+
}[];
|
|
79603
|
+
inventory: {
|
|
79604
|
+
kind: "untracked";
|
|
79605
|
+
};
|
|
79606
|
+
fulfillment: {
|
|
79607
|
+
kind: "staff-handover";
|
|
79608
|
+
} | {
|
|
79609
|
+
kind: "automatic";
|
|
79610
|
+
};
|
|
79611
|
+
};
|
|
79612
|
+
tier: string;
|
|
79613
|
+
} | {
|
|
79614
|
+
kind: "points";
|
|
79615
|
+
balance: string;
|
|
79616
|
+
amount: number;
|
|
79617
|
+
} | {
|
|
79618
|
+
kind: "integration";
|
|
79619
|
+
provider: "discord";
|
|
79620
|
+
action: "grant-role";
|
|
79621
|
+
roleId: string;
|
|
79622
|
+
})[] | null;
|
|
79623
|
+
evaluationRun: number;
|
|
79624
|
+
deferCount: number;
|
|
79625
|
+
deferUntil: number | null;
|
|
79626
|
+
nextEvaluationAt: number | null;
|
|
79627
|
+
code: string | null;
|
|
79628
|
+
progress: {
|
|
79629
|
+
current: number;
|
|
79630
|
+
target: number;
|
|
79631
|
+
reason: string;
|
|
79632
|
+
} | null;
|
|
79633
|
+
requestedReview: boolean;
|
|
79634
|
+
createdAt: number;
|
|
79635
|
+
input?: {
|
|
79636
|
+
kind: "quiz";
|
|
79637
|
+
answers: {
|
|
79638
|
+
[k: string]: string;
|
|
79639
|
+
};
|
|
79640
|
+
release?: string | undefined;
|
|
79641
|
+
} | {
|
|
79642
|
+
kind: "text";
|
|
79643
|
+
value: string;
|
|
79644
|
+
} | {
|
|
79645
|
+
kind: "url";
|
|
79646
|
+
value: string;
|
|
79647
|
+
} | undefined;
|
|
79648
|
+
}>;
|
|
79649
|
+
reset: (member: string, input: TestMemberResetInput, call?: ManagementCallOptions) => Promise<{
|
|
79650
|
+
member: string;
|
|
79651
|
+
deleted: true;
|
|
79652
|
+
}>;
|
|
79653
|
+
};
|
|
79432
79654
|
/** The project's members, as operators see them. */
|
|
79433
79655
|
members: {
|
|
79434
79656
|
counters: {
|
|
@@ -80039,6 +80261,8 @@ declare function createManagementClient(options: ManagementClientOptions): {
|
|
|
80039
80261
|
completions: number;
|
|
80040
80262
|
rewards: number;
|
|
80041
80263
|
lastActivity: number | null;
|
|
80264
|
+
test?: boolean | undefined;
|
|
80265
|
+
name?: string | null | undefined;
|
|
80042
80266
|
};
|
|
80043
80267
|
progress: {
|
|
80044
80268
|
member: string;
|
|
@@ -81495,4 +81719,4 @@ declare function createManagementClient(options: ManagementClientOptions): {
|
|
|
81495
81719
|
}>;
|
|
81496
81720
|
};
|
|
81497
81721
|
|
|
81498
|
-
export { APP_SECRET_LIMIT, type Access, type AppSecret, type AppSecretDeclaration, type AppSecretInput, type AppSecretList, type AuditRecord, type BalanceCheck, type BuildArtifacts, type BuildIdentity, type BuildSnapshot, type BuildStatus, type CompletionRevocation, type CompletionRevokeInput, DEFAULT_MANAGEMENT_TIMEOUT, type HostedAppSecrets, type HostedBuild, type HostedDeploymentKey, type HostedKey, type HostedKeyPermission, type HostedManagementEnv, type ListQuery, type ManagedMemberIdentity, type ManagedOAuthAccount, type ManagedResource, type ManagedWallet, type ManagementCallOptions, type ManagementClient, type ManagementClientOptions, ManagementError, ManagementErrorCode, type ManagementErrorInit, type ManagementErrorKind, type ManagementPage, type ManagementRawInit, type ParticipantSignIn, type ParticipantSignInInput, type Permission, type Person, type Project, type QuestLifecycle, type QuestLifecycleInput, type ResourceLifecycleInput, RevokedDeliveryOutcome, RevokedEntitlementOutcome, RevokedReferralOutcome, type StagedDeployment, type StagedDeploymentContent, type StagingAccess, type StagingAccessInput, type StagingLink, type StarterId, type StarterTemplate, WEBHOOK_MAX_BYTES, type WalletBalanceChains, type WebhookEvent, accessSchema, accountProfileSchema, appRoutingSchema, appSecretDeclarationSchema, appSecretDeclarationsSchema, appSecretInputSchema, appSecretListSchema, appSecretNameSchema, appSecretSchema, appSecretValueSchema, assetPathSchema, auditRecordSchema, balanceCheckSchema, buildArtifactsSchema, buildIdentitySchema, buildPhaseSchema, buildSnapshotSchema, buildStatusSchema, commitSchema, completionRevocationSchema, completionRevokeSchema, createManagementClient, createRepositorySchema, developmentPreflightSchema, deviceApproveSchema, deviceRedeemSchema, deviceStartSchema, entitlementCorrectionSchema, environmentSchema, grantRecordSchema, grantSchema, hostedAppSchema, hostedAppSecretsSchema, hostedBuildSchema, hostedDeploymentKeySchema, hostedKeyPermissions, hostedKeySchema, hostedKeySecretSchema, hostedManagementBindings, hostedManagementClient, ingestTrackerScopeSchema, inventorySchema, isManagementError, issuedTokenSchema, managedMemberIdentitySchema, managedOAuthAccountSchema, managedResourceSchema, managedWalletSchema, memberAccountSchema, memberDetailSchema, memberIdentityChangeInputSchema, memberLookupSchema, memberOAuthUnlinkInputSchema, memberSchema, memberWalletSignInInputSchema, memberWalletUnlinkInputSchema, metricsSchema, operationInputSchema, operationSchema, pageSchema, participantSignInInputSchema, participantSignInSchema, permissionSchema, personSchema, projectDeletionInputSchema, projectDeletionSchema, projectInputSchema, projectSchema, projectSetupSchema, projectTransferInputSchema, projectTransferSchema, querySchema, questLifecycleInputSchema, questLifecycleSchema, readinessSchema, repositorySchema, resourceLifecycleInputSchema, resourceLifecycleKindSchema, resourceLifecycleResultSchema, rolePermissions, roleSchema, stageRequestSchema, stagedDeploymentContentSchema, stagedDeploymentKey, stagedDeploymentLimits, stagedDeploymentSchema, stagingAccessInputSchema, stagingAccessModeSchema, stagingAccessSchema, stagingLinkSchema, stagingPathSchema, starterIdSchema, starterTemplates, stockAdditionSchema, stockInputSchema, teamSchema, tokenInputSchema, tokenSchema, tokenScopeInputSchema, verifiedPassSchema, verifyWebhook, walletBalanceChainsSchema, webhookDeliveryPageSchema, webhookDeliverySchema, webhookEndpointSchema, webhookEventSchema, webhookInputSchema, webhookQuerySchema, webhookSecretSchema, webhookUpdateSchema };
|
|
81722
|
+
export { APP_SECRET_LIMIT, type Access, type AppSecret, type AppSecretDeclaration, type AppSecretInput, type AppSecretList, type AuditRecord, type BalanceCheck, type BuildArtifacts, type BuildIdentity, type BuildSnapshot, type BuildStatus, type CompletionRevocation, type CompletionRevokeInput, DEFAULT_MANAGEMENT_TIMEOUT, type HostedAppSecrets, type HostedBuild, type HostedDeploymentKey, type HostedKey, type HostedKeyPermission, type HostedManagementEnv, type ListQuery, type ManagedMemberIdentity, type ManagedOAuthAccount, type ManagedResource, type ManagedWallet, type ManagementCallOptions, type ManagementClient, type ManagementClientOptions, ManagementError, ManagementErrorCode, type ManagementErrorInit, type ManagementErrorKind, type ManagementPage, type ManagementRawInit, type ParticipantSignIn, type ParticipantSignInInput, type Permission, type Person, type Project, type QuestLifecycle, type QuestLifecycleInput, type ResourceLifecycleInput, RevokedDeliveryOutcome, RevokedEntitlementOutcome, RevokedReferralOutcome, type StagedDeployment, type StagedDeploymentContent, type StagingAccess, type StagingAccessInput, type StagingLink, type StarterId, type StarterTemplate, type TestMember, type TestMemberActionInput, type TestMemberCreateInput, type TestMemberResetInput, type TestMemberResetResult, WEBHOOK_MAX_BYTES, type WalletBalanceChains, type WebhookEvent, accessSchema, accountProfileSchema, appRoutingSchema, appSecretDeclarationSchema, appSecretDeclarationsSchema, appSecretInputSchema, appSecretListSchema, appSecretNameSchema, appSecretSchema, appSecretValueSchema, assetPathSchema, auditRecordSchema, balanceCheckSchema, buildArtifactsSchema, buildIdentitySchema, buildPhaseSchema, buildSnapshotSchema, buildStatusSchema, commitSchema, completionRevocationSchema, completionRevokeSchema, createManagementClient, createRepositorySchema, developmentPreflightSchema, deviceApproveSchema, deviceRedeemSchema, deviceStartSchema, entitlementCorrectionSchema, environmentSchema, grantRecordSchema, grantSchema, hostedAppSchema, hostedAppSecretsSchema, hostedBuildSchema, hostedDeploymentKeySchema, hostedKeyPermissions, hostedKeySchema, hostedKeySecretSchema, hostedManagementBindings, hostedManagementClient, ingestTrackerScopeSchema, inventorySchema, isManagementError, issuedTokenSchema, managedMemberIdentitySchema, managedOAuthAccountSchema, managedResourceSchema, managedWalletSchema, memberAccountSchema, memberDetailSchema, memberIdentityChangeInputSchema, memberLookupSchema, memberOAuthUnlinkInputSchema, memberSchema, memberWalletSignInInputSchema, memberWalletUnlinkInputSchema, metricsSchema, operationInputSchema, operationSchema, pageSchema, participantSignInInputSchema, participantSignInSchema, permissionSchema, personSchema, projectDeletionInputSchema, projectDeletionSchema, projectInputSchema, projectSchema, projectSetupSchema, projectTransferInputSchema, projectTransferSchema, querySchema, questLifecycleInputSchema, questLifecycleSchema, readinessSchema, repositorySchema, resourceLifecycleInputSchema, resourceLifecycleKindSchema, resourceLifecycleResultSchema, rolePermissions, roleSchema, stageRequestSchema, stagedDeploymentContentSchema, stagedDeploymentKey, stagedDeploymentLimits, stagedDeploymentSchema, stagingAccessInputSchema, stagingAccessModeSchema, stagingAccessSchema, stagingLinkSchema, stagingPathSchema, starterIdSchema, starterTemplates, stockAdditionSchema, stockInputSchema, teamSchema, testMemberActionSchema, testMemberCreateSchema, testMemberResetResultSchema, testMemberResetSchema, testMemberSchema, tokenInputSchema, tokenSchema, tokenScopeInputSchema, verifiedPassSchema, verifyWebhook, walletBalanceChainsSchema, webhookDeliveryPageSchema, webhookDeliverySchema, webhookEndpointSchema, webhookEventSchema, webhookInputSchema, webhookQuerySchema, webhookSecretSchema, webhookUpdateSchema };
|