@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
package/dist/chunk-SE4PFJPT.js
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
identifier,
|
|
3
|
-
pageCursorSchema
|
|
4
|
-
} from "./chunk-ZDJLPN4L.js";
|
|
5
|
-
|
|
6
|
-
// src/point-ledgers.ts
|
|
7
|
-
import * as z from "zod";
|
|
8
|
-
var pointLedgerPropertiesSchema = z.object({
|
|
9
|
-
name: z.string().trim().min(1).max(120),
|
|
10
|
-
description: z.string().trim().max(1e3).default("")
|
|
11
|
-
}).strict();
|
|
12
|
-
var createPointLedgerSchema = pointLedgerPropertiesSchema.extend({ actionId: identifier, key: identifier.optional() }).strict();
|
|
13
|
-
var pointLedgerSchema = pointLedgerPropertiesSchema.extend({
|
|
14
|
-
id: identifier
|
|
15
|
-
});
|
|
16
|
-
var managedPointLedgerSchema = pointLedgerSchema.extend({
|
|
17
|
-
archivedAt: z.number().int().nonnegative().nullable()
|
|
18
|
-
});
|
|
19
|
-
var pointLedgerDeclarationSchema = pointLedgerPropertiesSchema.extend({ key: identifier }).strict();
|
|
20
|
-
var pointLedgerArtifactSchema = z.union([
|
|
21
|
-
pointLedgerDeclarationSchema,
|
|
22
|
-
z.object({ code: z.string().min(1).max(2e6) }).strict()
|
|
23
|
-
]);
|
|
24
|
-
var pointLedgerReferenceSchema = z.object({
|
|
25
|
-
id: identifier,
|
|
26
|
-
key: identifier.nullable(),
|
|
27
|
-
name: z.string()
|
|
28
|
-
});
|
|
29
|
-
var points = z.number().int().safe();
|
|
30
|
-
var pointBalanceSchema = z.object({
|
|
31
|
-
ledger: pointLedgerReferenceSchema,
|
|
32
|
-
balance: points,
|
|
33
|
-
available: points
|
|
34
|
-
});
|
|
35
|
-
var pointBalancesSchema = z.object({
|
|
36
|
-
items: z.array(pointBalanceSchema)
|
|
37
|
-
});
|
|
38
|
-
var PointEntryKind = {
|
|
39
|
-
/** Points a quest completion, an engagement settlement or an operator awarded. */
|
|
40
|
-
Award: "award",
|
|
41
|
-
/** Points the member spent. */
|
|
42
|
-
Spend: "spend",
|
|
43
|
-
/** A correction in either direction, by an operator or a referral payout. */
|
|
44
|
-
Adjust: "adjust",
|
|
45
|
-
/** Undoes part or all of an award or a positive adjustment (`reverses`). */
|
|
46
|
-
Reverse: "reverse"
|
|
47
|
-
};
|
|
48
|
-
var pointEntryKindSchema = z.string().min(1).max(64);
|
|
49
|
-
var pointEntrySchema = z.object({
|
|
50
|
-
id: identifier,
|
|
51
|
-
amount: points,
|
|
52
|
-
kind: pointEntryKindSchema,
|
|
53
|
-
/** When the entry took effect, in epoch milliseconds. A reversal keeps its source's. */
|
|
54
|
-
at: points.nonnegative(),
|
|
55
|
-
quest: identifier.nullable(),
|
|
56
|
-
reverses: identifier.nullable(),
|
|
57
|
-
/**
|
|
58
|
-
* True for an opening balance a member import recorded (an `adjust`). Absent from Relay
|
|
59
|
-
* versions without imports.
|
|
60
|
-
*/
|
|
61
|
-
imported: z.boolean().optional()
|
|
62
|
-
});
|
|
63
|
-
var pointHistoryQuerySchema = z.strictObject({
|
|
64
|
-
ledger: identifier,
|
|
65
|
-
cursor: pageCursorSchema.optional()
|
|
66
|
-
});
|
|
67
|
-
var pointHistoryPageSchema = z.object({
|
|
68
|
-
items: z.array(pointEntrySchema),
|
|
69
|
-
nextCursor: pageCursorSchema.nullable()
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// src/profiles.ts
|
|
73
|
-
import * as z2 from "zod";
|
|
74
|
-
var count = z2.number().int().nonnegative().safe();
|
|
75
|
-
var profileVisibilitySchema = z2.enum([
|
|
76
|
-
"private",
|
|
77
|
-
"participants",
|
|
78
|
-
"public"
|
|
79
|
-
]);
|
|
80
|
-
var avatarProviderSchema = z2.enum(["x", "discord", "google"]);
|
|
81
|
-
var profileDefaultProviderSchema = z2.enum(["x", "discord"]);
|
|
82
|
-
var profileDefaultsSchema = z2.array(profileDefaultProviderSchema).max(profileDefaultProviderSchema.options.length).refine(
|
|
83
|
-
(providers) => new Set(providers).size === providers.length,
|
|
84
|
-
"List each provider once"
|
|
85
|
-
);
|
|
86
|
-
var avatarSeedSchema = z2.string().min(1).max(100);
|
|
87
|
-
var profileAvatarSchema = z2.discriminatedUnion("source", [
|
|
88
|
-
z2.object({
|
|
89
|
-
source: z2.literal("upload"),
|
|
90
|
-
url: z2.string().url(),
|
|
91
|
-
seed: avatarSeedSchema
|
|
92
|
-
}),
|
|
93
|
-
z2.object({
|
|
94
|
-
source: z2.literal("account"),
|
|
95
|
-
provider: avatarProviderSchema,
|
|
96
|
-
url: z2.string().url(),
|
|
97
|
-
seed: avatarSeedSchema
|
|
98
|
-
}),
|
|
99
|
-
z2.object({ source: z2.literal("generated"), seed: avatarSeedSchema })
|
|
100
|
-
]);
|
|
101
|
-
var profileSummarySchema = z2.object({
|
|
102
|
-
id: identifier,
|
|
103
|
-
name: z2.string(),
|
|
104
|
-
avatar: profileAvatarSchema
|
|
105
|
-
});
|
|
106
|
-
var invisible = /[\p{Cc}----]/u;
|
|
107
|
-
var displayNameSchema = z2.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
|
|
108
|
-
z2.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
|
|
109
|
-
);
|
|
110
|
-
var profileUpdateSchema = z2.object({
|
|
111
|
-
displayName: displayNameSchema.nullable().optional(),
|
|
112
|
-
avatar: z2.discriminatedUnion("source", [
|
|
113
|
-
z2.object({
|
|
114
|
-
source: z2.literal("account"),
|
|
115
|
-
provider: avatarProviderSchema
|
|
116
|
-
}).strict(),
|
|
117
|
-
z2.object({ source: z2.literal("generated") }).strict()
|
|
118
|
-
]).nullable().optional(),
|
|
119
|
-
hidden: z2.boolean().optional()
|
|
120
|
-
}).strict().refine(
|
|
121
|
-
(value) => Object.values(value).some((field) => field !== void 0),
|
|
122
|
-
"Change at least one field"
|
|
123
|
-
);
|
|
124
|
-
var ownProfileSchema = profileSummarySchema.extend({
|
|
125
|
-
/** The name the member chose, or null for the default. */
|
|
126
|
-
displayName: z2.string().nullable(),
|
|
127
|
-
/** The avatar the member chose: `default` follows the project's defaults. */
|
|
128
|
-
avatarChoice: z2.enum(["default", "upload", "account", "generated"]),
|
|
129
|
-
/** The account of an `account` choice. */
|
|
130
|
-
avatarProvider: avatarProviderSchema.nullable(),
|
|
131
|
-
hidden: z2.boolean(),
|
|
132
|
-
/** An operator locked the name and avatar; the member can still hide the profile. */
|
|
133
|
-
locked: z2.boolean(),
|
|
134
|
-
/** Who can see profiles in this project, so the app can explain it. */
|
|
135
|
-
visibility: profileVisibilitySchema,
|
|
136
|
-
/** The member's connected accounts a picture or name can come from. */
|
|
137
|
-
options: z2.array(
|
|
138
|
-
z2.object({
|
|
139
|
-
provider: avatarProviderSchema,
|
|
140
|
-
name: z2.string().nullable(),
|
|
141
|
-
/**
|
|
142
|
-
* The account's first name, where the provider sends one (Google does; X and Discord don't).
|
|
143
|
-
* Only the member's own profile carries it.
|
|
144
|
-
*/
|
|
145
|
-
givenName: z2.string().nullable().default(null),
|
|
146
|
-
imageUrl: z2.string().url().nullable()
|
|
147
|
-
})
|
|
148
|
-
)
|
|
149
|
-
});
|
|
150
|
-
var cursor = z2.string().min(1).max(512);
|
|
151
|
-
var profileCompletionQuerySchema = z2.object({
|
|
152
|
-
limit: z2.coerce.number().int().min(1).max(100).default(20),
|
|
153
|
-
cursor: cursor.optional()
|
|
154
|
-
}).strict();
|
|
155
|
-
var profileCompletionSchema = z2.object({
|
|
156
|
-
quest: identifier,
|
|
157
|
-
key: identifier.optional(),
|
|
158
|
-
title: z2.string(),
|
|
159
|
-
completions: count.positive(),
|
|
160
|
-
/** Null for completions recorded before completion times were. */
|
|
161
|
-
lastCompletedAt: count.nullable()
|
|
162
|
-
});
|
|
163
|
-
var profileCompletionPageSchema = z2.object({
|
|
164
|
-
items: z2.array(profileCompletionSchema),
|
|
165
|
-
nextCursor: cursor.nullable()
|
|
166
|
-
});
|
|
167
|
-
var profileReferralSchema = z2.object({
|
|
168
|
-
program: identifier,
|
|
169
|
-
key: identifier.optional(),
|
|
170
|
-
title: z2.string(),
|
|
171
|
-
/** Members this member invited. Invitations are shared by every program. */
|
|
172
|
-
invited: count,
|
|
173
|
-
/** Invited members who qualified in this program. */
|
|
174
|
-
qualified: count,
|
|
175
|
-
milestones: z2.array(
|
|
176
|
-
z2.object({ id: identifier, count, reached: z2.boolean() })
|
|
177
|
-
)
|
|
178
|
-
});
|
|
179
|
-
var profileSettingsSchema = z2.object({
|
|
180
|
-
visibility: profileVisibilitySchema,
|
|
181
|
-
defaults: profileDefaultsSchema,
|
|
182
|
-
revision: count,
|
|
183
|
-
actor: z2.string().nullable(),
|
|
184
|
-
updatedAt: count.nullable()
|
|
185
|
-
});
|
|
186
|
-
var profileSettingsInputSchema = profileSettingsSchema.omit({ revision: true, actor: true, updatedAt: true }).extend({
|
|
187
|
-
actionId: identifier,
|
|
188
|
-
/** The revision the change was made against; a newer one is a 409. */
|
|
189
|
-
expectedRevision: count,
|
|
190
|
-
reason: z2.string().trim().min(1).max(500)
|
|
191
|
-
}).strict();
|
|
192
|
-
var profileModerationSchema = z2.object({
|
|
193
|
-
actionId: identifier,
|
|
194
|
-
resetName: z2.boolean().default(false),
|
|
195
|
-
removeAvatar: z2.boolean().default(false),
|
|
196
|
-
/** True locks the name and avatar, false unlocks them. */
|
|
197
|
-
lock: z2.boolean().optional(),
|
|
198
|
-
reason: z2.string().trim().min(1).max(1e3)
|
|
199
|
-
}).strict().refine(
|
|
200
|
-
(value) => value.resetName || value.removeAvatar || value.lock !== void 0,
|
|
201
|
-
"Choose an action"
|
|
202
|
-
);
|
|
203
|
-
var managedProfileSchema = ownProfileSchema.omit({ options: true }).extend({
|
|
204
|
-
member: identifier,
|
|
205
|
-
lockedAt: count.nullable(),
|
|
206
|
-
lockedBy: z2.string().nullable(),
|
|
207
|
-
lockedReason: z2.string().nullable(),
|
|
208
|
-
updatedAt: count
|
|
209
|
-
});
|
|
210
|
-
var AVATAR_UPLOAD_LIMIT = 5 * 1024 * 1024;
|
|
211
|
-
var avatarUploadTypes = ["image/jpeg", "image/png", "image/webp"];
|
|
212
|
-
|
|
213
|
-
export {
|
|
214
|
-
pointLedgerPropertiesSchema,
|
|
215
|
-
createPointLedgerSchema,
|
|
216
|
-
pointLedgerSchema,
|
|
217
|
-
managedPointLedgerSchema,
|
|
218
|
-
pointLedgerDeclarationSchema,
|
|
219
|
-
pointLedgerArtifactSchema,
|
|
220
|
-
pointLedgerReferenceSchema,
|
|
221
|
-
pointBalanceSchema,
|
|
222
|
-
pointBalancesSchema,
|
|
223
|
-
PointEntryKind,
|
|
224
|
-
pointEntrySchema,
|
|
225
|
-
pointHistoryQuerySchema,
|
|
226
|
-
pointHistoryPageSchema,
|
|
227
|
-
profileVisibilitySchema,
|
|
228
|
-
avatarProviderSchema,
|
|
229
|
-
profileDefaultProviderSchema,
|
|
230
|
-
profileDefaultsSchema,
|
|
231
|
-
avatarSeedSchema,
|
|
232
|
-
profileAvatarSchema,
|
|
233
|
-
profileSummarySchema,
|
|
234
|
-
displayNameSchema,
|
|
235
|
-
profileUpdateSchema,
|
|
236
|
-
ownProfileSchema,
|
|
237
|
-
profileCompletionQuerySchema,
|
|
238
|
-
profileCompletionSchema,
|
|
239
|
-
profileCompletionPageSchema,
|
|
240
|
-
profileReferralSchema,
|
|
241
|
-
profileSettingsSchema,
|
|
242
|
-
profileSettingsInputSchema,
|
|
243
|
-
profileModerationSchema,
|
|
244
|
-
managedProfileSchema,
|
|
245
|
-
AVATAR_UPLOAD_LIMIT,
|
|
246
|
-
avatarUploadTypes
|
|
247
|
-
};
|