@domino-sdk/relay 1.0.0-next.7 → 1.0.0-next.8
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 +11 -11
- package/dist/authoring.js +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/browser.d.ts +217 -2285
- package/dist/browser.js +6 -6
- package/dist/{chunk-AWLLGCKU.js → chunk-6A6K5RUD.js} +22 -8
- package/dist/{chunk-SKETUPST.js → chunk-77H7APVD.js} +1 -1
- package/dist/{chunk-UFXBQ6FN.js → chunk-MRIURJE3.js} +2 -2
- package/dist/{chunk-ADSP377G.js → chunk-QBOHLT7M.js} +26 -5
- package/dist/{chunk-X6FJIPXR.js → chunk-V5R2DMGY.js} +553 -435
- package/dist/{chunk-DJZB5RY5.js → chunk-V7EZUZ3Z.js} +345 -243
- package/dist/{chunk-UW6R2QGT.js → chunk-VARGF4JS.js} +619 -610
- package/dist/{chunk-7HSTFBMO.js → chunk-ZWY3R6B3.js} +5 -3
- package/dist/{client-BufGakEt.d.ts → client-CK4nwt7V.d.ts} +307 -2253
- package/dist/{images-e6FW9QSx.d.ts → images--vZ9U0kr.d.ts} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +19 -7
- package/dist/internal.d.ts +16 -5
- package/dist/internal.js +12 -5
- package/dist/{catalog-C09gnPYT.d.ts → pages-BzqJuI69.d.ts} +79 -21
- package/dist/portal-proxy.js +6 -6
- package/dist/{profiles-BtOXMGcC.d.ts → profiles-DDMFBRKe.d.ts} +1 -1
- package/dist/react/index.d.ts +156 -2224
- package/dist/react/index.js +12 -10
- package/dist/{schema-DCapSPHz.d.ts → schema-pnuWqvGn.d.ts} +8 -8
- package/dist/schema.d.ts +64 -64
- package/dist/schema.js +15 -5
- package/dist/{submission-input-Bter6XiI.d.ts → submission-input-C9qm9ixd.d.ts} +8 -8
- package/dist/{wallet-Bu6sqJvQ.d.ts → wallet-BGOfFkG9.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { P as PhotoResult } from './schema-
|
|
2
|
+
import { P as PhotoResult } from './schema-pnuWqvGn.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Quest code names an image; the platform fetches, decodes and pins it. No bytes or URLs cross the
|
|
@@ -231,4 +231,4 @@ interface ImageReader {
|
|
|
231
231
|
}): Promise<ImageSightings>;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
export { type ImageReader as I, type PublishedImage as P, type
|
|
234
|
+
export { type ImageReader as I, type PublishedImage as P, type ImageAssetArtifact as a, type ImageComparison as b, type ImageExtraction as c, type ImageFields as d, type ImageInspection as e, type ImageReference as f, type ImageRequest as g, type ImageSightings as h, imageAssetArtifactSchema as i, imageComparisonSchema as j, imageExtractionSchema as k, imageFieldSchema as l, imageFieldsSchema as m, imageInspectionSchema as n, imageReferenceSchema as o, imageRequestSchema as p, imageSightingsSchema as q, imageUploadRequestSchema as r, imageUploadsSchema as s, publishedImageSchema as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { C as ClaimSubmission, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayError, S as SubmissionDraft,
|
|
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, l as RequestError, m as RequestErrorDetails, n as RequestErrorKind, o as RequestRecovery, S as SubmissionDraft, p as SubmissionStatus, q as SubmissionStore, V as ValueSubmission, r as createRelayClient, s as isRelayError, t as isRequestError } from './client-CK4nwt7V.js';
|
|
2
2
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
3
|
-
export { A as AccountConnection, a as AuthProvider, L as LeaderboardDefinition, b as LeaderboardPage, c as LeaderboardPlacement, d as LeaderboardQuery, R as ReferralDefinition, T as TextEvidence, e as TextOptions, U as UrlEvidence, f as UrlOptions, V as ValueEvidence } from './submission-input-
|
|
4
|
-
export { E as ExchangeInput, M as MemberSummary, Q as QuestInteraction,
|
|
3
|
+
export { A as AccountConnection, a as AuthProvider, L as LeaderboardDefinition, b as LeaderboardPage, c as LeaderboardPlacement, d as LeaderboardQuery, R as ReferralDefinition, T as TextEvidence, e as TextOptions, U as UrlEvidence, f as UrlOptions, V as ValueEvidence } from './submission-input-C9qm9ixd.js';
|
|
4
|
+
export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantPrincipal, c as ParticipantSession, Q as QuestInteraction, d as QuestRewardView, e as QuestView, S as Session, s as sessionMember } from './pages-BzqJuI69.js';
|
|
5
5
|
export { C as CollectionPass } from './collection-BGneJ6Bk.js';
|
|
6
6
|
export { P as PointLedgerReference } from './point-ledgers-iS00Z_v0.js';
|
|
7
|
-
export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileReferral, e as ProfileSummary, f as ProfileUpdate, g as ProfileVisibility } from './profiles-
|
|
7
|
+
export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileReferral, e as ProfileSummary, f as ProfileUpdate, g as ProfileVisibility } from './profiles-DDMFBRKe.js';
|
|
8
8
|
export { Q as QuizContent, S as StreakProgress } from './streaks-CwGReWGt.js';
|
|
9
|
-
export { A as Attempt, E as Entitlement, M as MemberProgress, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, R as Reward, S as SubmissionEvidence, c as SubmitInput, T as TieredRewardReference } from './schema-
|
|
10
|
-
export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as
|
|
9
|
+
export { A as Attempt, E as Entitlement, M as MemberProgress, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, R as Reward, S as SubmissionEvidence, c as SubmitInput, T as TieredRewardReference } from './schema-pnuWqvGn.js';
|
|
10
|
+
export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletSignInNetwork, e as WalletSignature, f as WalletSigner, g as WalletUnlinkInput } from './wallet-BGOfFkG9.js';
|
|
11
11
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -4,17 +4,29 @@ import {
|
|
|
4
4
|
} from "./chunk-V7UKZLHA.js";
|
|
5
5
|
import {
|
|
6
6
|
QuestUpdatedError,
|
|
7
|
-
RelayError,
|
|
8
7
|
createRelayClient
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
} from "./chunk-V5R2DMGY.js";
|
|
9
|
+
import "./chunk-MRIURJE3.js";
|
|
10
|
+
import {
|
|
11
|
+
RelayError,
|
|
12
|
+
RelayErrorCode,
|
|
13
|
+
RequestError,
|
|
14
|
+
isRelayError,
|
|
15
|
+
isRequestError
|
|
16
|
+
} from "./chunk-V7EZUZ3Z.js";
|
|
17
|
+
import {
|
|
18
|
+
sessionMember
|
|
19
|
+
} from "./chunk-QBOHLT7M.js";
|
|
20
|
+
import "./chunk-VARGF4JS.js";
|
|
14
21
|
export {
|
|
15
22
|
QuestUpdatedError,
|
|
16
23
|
RelayError,
|
|
24
|
+
RelayErrorCode,
|
|
25
|
+
RequestError,
|
|
17
26
|
createRelayClient,
|
|
18
27
|
formatUnits,
|
|
19
|
-
|
|
28
|
+
isRelayError,
|
|
29
|
+
isRequestError,
|
|
30
|
+
parseUnits,
|
|
31
|
+
sessionMember
|
|
20
32
|
};
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as PublishedRelease } from './schema-
|
|
1
|
+
import { j as PublishedRelease } from './schema-pnuWqvGn.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { d as ImageFields, g as ImageRequest } from './images--vZ9U0kr.js';
|
|
4
4
|
|
|
5
5
|
/** Older releases did not record ownership. Preserve every value, including defaults. */
|
|
6
6
|
declare function questConfiguration(release: PublishedRelease): {
|
|
@@ -96,14 +96,25 @@ declare function isContentParticipantRoute(path: string, method: string): boolea
|
|
|
96
96
|
*/
|
|
97
97
|
declare function isProfileParticipantRoute(path: string, method: string): boolean;
|
|
98
98
|
/**
|
|
99
|
-
* The participant wallet paths. The gates admit GET and POST; the API answers
|
|
100
|
-
* wallet path with 405.
|
|
99
|
+
* The participant wallet paths the client calls. The gates admit GET and POST; the API answers
|
|
100
|
+
* another method on a wallet path with 405.
|
|
101
101
|
*/
|
|
102
102
|
declare function isWalletParticipantRoute(path: string): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The single-wallet routes only 0.x clients call (`wallet.*`). The API still admits them for
|
|
105
|
+
* those apps' proxies; v1 proxies do not forward them.
|
|
106
|
+
*/
|
|
107
|
+
declare function isLegacyWalletRoute(path: string): boolean;
|
|
103
108
|
/**
|
|
104
109
|
* Wallet sign-in (`/v1/auth/wallet/start` and `/verify`). Hosted proxies admit it; identity
|
|
105
110
|
* integrations do not, because their apps have their own login.
|
|
106
111
|
*/
|
|
107
112
|
declare function isWalletSignInRoute(path: string): boolean;
|
|
108
113
|
|
|
109
|
-
|
|
114
|
+
/**
|
|
115
|
+
* How Relay reads back a cursor it issued over a numeric position. Clients treat cursors as
|
|
116
|
+
* opaque strings (`pageCursorSchema`); only the server parses them, so the format can change.
|
|
117
|
+
*/
|
|
118
|
+
declare const sequenceCursorSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
|
|
119
|
+
|
|
120
|
+
export { identityIntegrationInputSchema, identityIntegrationSchema, identityIntegrationSecretSchema, isContentParticipantRoute, isLegacyWalletRoute, isProfileParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, parseImageExtraction, parseImageResult, participantExchangeSchema, questConfiguration, sequenceCursorSchema };
|
package/dist/internal.js
CHANGED
|
@@ -4,19 +4,20 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-77H7APVD.js";
|
|
8
8
|
import {
|
|
9
9
|
isContentParticipantRoute,
|
|
10
|
+
isLegacyWalletRoute,
|
|
10
11
|
isProfileParticipantRoute,
|
|
11
12
|
isWalletParticipantRoute,
|
|
12
13
|
isWalletSignInRoute
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZWY3R6B3.js";
|
|
14
15
|
import {
|
|
15
16
|
authScopeSchema
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QBOHLT7M.js";
|
|
17
18
|
import {
|
|
18
19
|
photoResultSchema
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VARGF4JS.js";
|
|
20
21
|
|
|
21
22
|
// src/configuration.ts
|
|
22
23
|
function questConfiguration(release) {
|
|
@@ -89,16 +90,22 @@ function parseImageResult(request, value) {
|
|
|
89
90
|
return imageSightingsSchema.parse(value);
|
|
90
91
|
}
|
|
91
92
|
}
|
|
93
|
+
|
|
94
|
+
// src/sequence-cursor.ts
|
|
95
|
+
import { z as z2 } from "zod";
|
|
96
|
+
var sequenceCursorSchema = z2.string().regex(/^[1-9][0-9]{0,15}$/, "Invalid cursor").transform(Number).pipe(z2.number().int().positive().safe());
|
|
92
97
|
export {
|
|
93
98
|
identityIntegrationInputSchema,
|
|
94
99
|
identityIntegrationSchema,
|
|
95
100
|
identityIntegrationSecretSchema,
|
|
96
101
|
isContentParticipantRoute,
|
|
102
|
+
isLegacyWalletRoute,
|
|
97
103
|
isProfileParticipantRoute,
|
|
98
104
|
isWalletParticipantRoute,
|
|
99
105
|
isWalletSignInRoute,
|
|
100
106
|
parseImageExtraction,
|
|
101
107
|
parseImageResult,
|
|
102
108
|
participantExchangeSchema,
|
|
103
|
-
questConfiguration
|
|
109
|
+
questConfiguration,
|
|
110
|
+
sequenceCursorSchema
|
|
104
111
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { q as questDescriptionSchema } from './schema-
|
|
2
|
+
import { q as questDescriptionSchema } from './schema-pnuWqvGn.js';
|
|
3
3
|
|
|
4
4
|
declare const authScopeSchema: z.ZodObject<{
|
|
5
5
|
organization: z.ZodString;
|
|
@@ -12,34 +12,79 @@ declare const authScopeSchema: z.ZodObject<{
|
|
|
12
12
|
declare const principalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
13
|
kind: z.ZodLiteral<"member">;
|
|
14
14
|
member: z.ZodString;
|
|
15
|
-
}, z.core.$
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
16
|
kind: z.ZodLiteral<"staff">;
|
|
17
17
|
subject: z.ZodString;
|
|
18
|
-
}, z.core.$
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
19
|
kind: z.ZodLiteral<"operator">;
|
|
20
20
|
subject: z.ZodString;
|
|
21
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$strip>], "kind">;
|
|
22
22
|
declare const sessionSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"member">;
|
|
26
|
+
member: z.ZodString;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"staff">;
|
|
29
|
+
subject: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"operator">;
|
|
32
|
+
subject: z.ZodString;
|
|
33
|
+
}, z.core.$strip>], "kind">;
|
|
34
|
+
expiresAt: z.ZodNumber;
|
|
23
35
|
organization: z.ZodString;
|
|
24
36
|
project: z.ZodString;
|
|
25
37
|
environment: z.ZodEnum<{
|
|
26
38
|
test: "test";
|
|
27
39
|
live: "live";
|
|
28
40
|
}>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type Session = z.infer<typeof sessionSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* A session's principal as the participant client reads it: a known kind, or `{ kind }` alone for
|
|
45
|
+
* a kind a newer Relay added, so reading the session never fails on it.
|
|
46
|
+
*/
|
|
47
|
+
declare const participantPrincipalSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"member">;
|
|
49
|
+
member: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"staff">;
|
|
52
|
+
subject: z.ZodString;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"operator">;
|
|
55
|
+
subject: z.ZodString;
|
|
56
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
57
|
+
kind: z.ZodString;
|
|
58
|
+
}, z.core.$strip>]>;
|
|
59
|
+
type ParticipantPrincipal = z.infer<typeof participantPrincipalSchema>;
|
|
60
|
+
/** The session the participant client returns (`auth.session()`). */
|
|
61
|
+
declare const participantSessionSchema: z.ZodObject<{
|
|
29
62
|
id: z.ZodString;
|
|
30
|
-
principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
63
|
+
principal: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
64
|
kind: z.ZodLiteral<"member">;
|
|
32
65
|
member: z.ZodString;
|
|
33
|
-
}, z.core.$
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
67
|
kind: z.ZodLiteral<"staff">;
|
|
35
68
|
subject: z.ZodString;
|
|
36
|
-
}, z.core.$
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
70
|
kind: z.ZodLiteral<"operator">;
|
|
38
71
|
subject: z.ZodString;
|
|
39
|
-
}, z.core.$
|
|
72
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
73
|
+
kind: z.ZodString;
|
|
74
|
+
}, z.core.$strip>]>;
|
|
40
75
|
expiresAt: z.ZodNumber;
|
|
41
|
-
|
|
42
|
-
|
|
76
|
+
organization: z.ZodString;
|
|
77
|
+
project: z.ZodString;
|
|
78
|
+
environment: z.ZodEnum<{
|
|
79
|
+
test: "test";
|
|
80
|
+
live: "live";
|
|
81
|
+
}>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
type ParticipantSession = z.infer<typeof participantSessionSchema>;
|
|
84
|
+
/** The member a session signs in, or null for a signed-out visitor or another principal kind. */
|
|
85
|
+
declare function sessionMember(session: {
|
|
86
|
+
principal: ParticipantPrincipal;
|
|
87
|
+
} | null | undefined): string | null;
|
|
43
88
|
/**
|
|
44
89
|
* The signed-in member (`GET /v1/me`). `avatarSeed` seeds the member's generated avatar
|
|
45
90
|
* (`defaultAvatar`): an HMAC of the member ID under a per-project secret, so it is stable in the
|
|
@@ -71,25 +116,25 @@ type ExchangeInput = z.infer<typeof exchangeSchema>;
|
|
|
71
116
|
declare const exchangeResultSchema: z.ZodObject<{
|
|
72
117
|
token: z.ZodString;
|
|
73
118
|
session: z.ZodObject<{
|
|
74
|
-
organization: z.ZodString;
|
|
75
|
-
project: z.ZodString;
|
|
76
|
-
environment: z.ZodEnum<{
|
|
77
|
-
test: "test";
|
|
78
|
-
live: "live";
|
|
79
|
-
}>;
|
|
80
119
|
id: z.ZodString;
|
|
81
120
|
principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
121
|
kind: z.ZodLiteral<"member">;
|
|
83
122
|
member: z.ZodString;
|
|
84
|
-
}, z.core.$
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
124
|
kind: z.ZodLiteral<"staff">;
|
|
86
125
|
subject: z.ZodString;
|
|
87
|
-
}, z.core.$
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
127
|
kind: z.ZodLiteral<"operator">;
|
|
89
128
|
subject: z.ZodString;
|
|
90
|
-
}, z.core.$
|
|
129
|
+
}, z.core.$strip>], "kind">;
|
|
91
130
|
expiresAt: z.ZodNumber;
|
|
92
|
-
|
|
131
|
+
organization: z.ZodString;
|
|
132
|
+
project: z.ZodString;
|
|
133
|
+
environment: z.ZodEnum<{
|
|
134
|
+
test: "test";
|
|
135
|
+
live: "live";
|
|
136
|
+
}>;
|
|
137
|
+
}, z.core.$strip>;
|
|
93
138
|
}, z.core.$strip>;
|
|
94
139
|
|
|
95
140
|
declare const interactionSchema: z.ZodEnum<{
|
|
@@ -3945,4 +3990,17 @@ declare const allocatedQuestSchema: z.ZodObject<{
|
|
|
3945
3990
|
id: z.ZodString;
|
|
3946
3991
|
}, z.core.$strip>;
|
|
3947
3992
|
|
|
3948
|
-
|
|
3993
|
+
/** A cursor as a client passes it back. */
|
|
3994
|
+
declare const pageCursorSchema: z.ZodString;
|
|
3995
|
+
/** A query that pages by cursor only. */
|
|
3996
|
+
declare const pageQuerySchema: z.ZodObject<{
|
|
3997
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
3998
|
+
}, z.core.$strict>;
|
|
3999
|
+
type PageQuery = z.input<typeof pageQuerySchema>;
|
|
4000
|
+
/** One page of a paged read. */
|
|
4001
|
+
type Page<T> = {
|
|
4002
|
+
items: T[];
|
|
4003
|
+
nextCursor: string | null;
|
|
4004
|
+
};
|
|
4005
|
+
|
|
4006
|
+
export { principalSchema as A, publishQuestDraftSchema as B, questCatalogSchema as C, questCollectionSchema as D, type ExchangeInput as E, questDraftChangesSchema as F, questDraftSchema as G, questInstanceSchema as H, questInteraction as I, questPublicationPreviewSchema as J, questRewardViewSchema as K, questTypeVersionSchema as L, type MemberSummary as M, questViewSchema as N, saveQuestDraftSchema as O, type Page as P, type QuestInteraction as Q, sessionSchema as R, type Session as S, type PageQuery as a, type ParticipantPrincipal as b, type ParticipantSession as c, type QuestRewardView as d, type QuestView as e, exchangeSchema as f, type QuestCatalog as g, type QuestDraft as h, type QuestInstance as i, allocateQuestSchema as j, allocatedQuestSchema as k, authScopeSchema as l, catalogDeploymentPreviewSchema as m, catalogDeploymentSchema as n, collectionSlotDeclarationSchema as o, collectionSlotSchema as p, questExperienceSchema as q, collectionViewSchema as r, sessionMember as s, exchangeResultSchema as t, interactionSchema as u, memberSummarySchema as v, pageCursorSchema as w, pageQuerySchema as x, participantPrincipalSchema as y, participantSessionSchema as z };
|
package/dist/portal-proxy.js
CHANGED
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
isProfileParticipantRoute,
|
|
4
4
|
isWalletParticipantRoute,
|
|
5
5
|
isWalletSignInRoute
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZWY3R6B3.js";
|
|
7
7
|
import {
|
|
8
8
|
exchangeResultSchema
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-QBOHLT7M.js";
|
|
10
|
+
import "./chunk-VARGF4JS.js";
|
|
11
11
|
|
|
12
12
|
// src/portal-proxy.ts
|
|
13
13
|
async function proxyParticipant(request, upstream) {
|
|
14
14
|
const incoming = new URL(request.url);
|
|
15
15
|
const path = incoming.pathname.slice("/relay".length);
|
|
16
|
-
const allowed = incoming.pathname.startsWith("/relay/") && (/^\/v1\/auth\/(providers|
|
|
16
|
+
const allowed = incoming.pathname.startsWith("/relay/") && (/^\/v1\/auth\/(providers|accounts(?:\/disconnect)?|start|authorize|complete|session|logout|email\/start|email\/verify|callback\/[a-z][a-z0-9-]*)$/.test(
|
|
17
17
|
path
|
|
18
|
-
) || /^\/v1\/me\/(progress|experience|attempts|evidence|
|
|
18
|
+
) || /^\/v1\/me\/(progress|experience|attempts|evidence|collection-pass)$/.test(
|
|
19
19
|
path
|
|
20
|
-
) || isWalletParticipantRoute(path) || isWalletSignInRoute(path) || path === "/v1/me" && request.method === "GET" || /^\/v1\/attempts\/[\w-]
|
|
20
|
+
) || isWalletParticipantRoute(path) || isWalletSignInRoute(path) || path === "/v1/me" && request.method === "GET" || /^\/v1\/attempts\/[\w-]+\/retry$/.test(path) || /^\/v1\/referrals(?:\/(me|history))?$/.test(path) && request.method === "GET" || isContentParticipantRoute(path, request.method) || isProfileParticipantRoute(path, request.method) || path === "/v1/reward-deliveries" && request.method === "GET" || path === "/v1/referrals/accept" && request.method === "POST" || request.method === "GET" && /^\/v1\/leaderboards(?:\/[\w-]+)?$/.test(path) || request.method === "GET" && (path === "/v1/point-ledgers" || path === "/v1/tiered-rewards"));
|
|
21
21
|
if (!allowed || !["GET", "POST"].includes(request.method)) {
|
|
22
22
|
return Response.json({ error: "Route not found" }, { status: 404 });
|
|
23
23
|
}
|
|
@@ -294,4 +294,4 @@ type ManagedProfile = z.infer<typeof managedProfileSchema>;
|
|
|
294
294
|
declare const AVATAR_UPLOAD_LIMIT: number;
|
|
295
295
|
declare const avatarUploadTypes: string[];
|
|
296
296
|
|
|
297
|
-
export { type AvatarProvider as A,
|
|
297
|
+
export { type AvatarProvider as A, profileModerationSchema as B, profileReferralSchema as C, profileSettingsInputSchema as D, profileSettingsSchema as E, profileSummarySchema as F, profileVisibilitySchema as G, type ManagedProfile as M, type OwnProfile as O, type ProfileAvatar as P, type ProfileCompletion as a, type ProfileCompletionPage as b, type ProfileCompletionQuery as c, type ProfileReferral as d, type ProfileSummary as e, type ProfileUpdate as f, type ProfileVisibility as g, AVATAR_UPLOAD_LIMIT as h, type ProfileDefaultProvider as i, type ProfileDefaults as j, type ProfileModeration as k, type ProfileSettings as l, type ProfileSettingsInput as m, avatarProviderSchema as n, avatarSeedSchema as o, profileUpdateSchema as p, avatarUploadTypes as q, displayNameSchema as r, managedProfileSchema as s, ownProfileSchema as t, profileAvatarSchema as u, profileCompletionPageSchema as v, profileCompletionQuerySchema as w, profileCompletionSchema as x, profileDefaultProviderSchema as y, profileDefaultsSchema as z };
|