@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,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RelayErrorCode,
|
|
3
|
+
clientError
|
|
4
|
+
} from "./chunk-GLH6MEI2.js";
|
|
5
|
+
|
|
6
|
+
// src/plugin-client.ts
|
|
7
|
+
var transportKey = /* @__PURE__ */ (() => /* @__PURE__ */ Symbol.for("@domino-sdk/relay:plugin-transport"))();
|
|
8
|
+
function setPluginTransport(client, transport) {
|
|
9
|
+
Object.defineProperty(client, transportKey, { value: transport });
|
|
10
|
+
}
|
|
11
|
+
function withPluginNamespace(client, name, build) {
|
|
12
|
+
if (!Object.hasOwn(client, name)) {
|
|
13
|
+
const transport = client[transportKey];
|
|
14
|
+
if (!transport) {
|
|
15
|
+
throw clientError(
|
|
16
|
+
"Pass a client that createRelayClient or createBrowserRelayClient made",
|
|
17
|
+
RelayErrorCode.InvalidInput
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(client, name, {
|
|
21
|
+
value: build(transport),
|
|
22
|
+
enumerable: true
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return client;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
setPluginTransport,
|
|
30
|
+
withPluginNamespace
|
|
31
|
+
};
|
|
@@ -6,7 +6,7 @@ var capabilityErrorCodes = [
|
|
|
6
6
|
"author-error"
|
|
7
7
|
];
|
|
8
8
|
var isKnown = (code) => capabilityErrorCodes.includes(code);
|
|
9
|
-
var capabilityFailureSchema = z.looseObject({
|
|
9
|
+
var capabilityFailureSchema = /* @__PURE__ */ (() => z.looseObject({
|
|
10
10
|
code: z.string().min(1),
|
|
11
11
|
message: z.string().min(1),
|
|
12
12
|
/**
|
|
@@ -16,8 +16,8 @@ var capabilityFailureSchema = z.looseObject({
|
|
|
16
16
|
* handles and moves past is final for the attempt; one that escapes the evaluation is retried.
|
|
17
17
|
*/
|
|
18
18
|
retryable: z.boolean()
|
|
19
|
-
});
|
|
20
|
-
var brand = /* @__PURE__ */ Symbol.for("@domino-sdk/relay/CapabilityError");
|
|
19
|
+
}))();
|
|
20
|
+
var brand = /* @__PURE__ */ (() => /* @__PURE__ */ Symbol.for("@domino-sdk/relay/CapabilityError"))();
|
|
21
21
|
var CapabilityError = class _CapabilityError extends Error {
|
|
22
22
|
code;
|
|
23
23
|
retryable;
|
|
@@ -1,77 +1,78 @@
|
|
|
1
1
|
import {
|
|
2
2
|
identifier
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ID3BZXFZ.js";
|
|
4
4
|
|
|
5
5
|
// src/auth.ts
|
|
6
6
|
import * as z from "zod";
|
|
7
|
-
var authScopeSchema = z.object({
|
|
7
|
+
var authScopeSchema = /* @__PURE__ */ (() => z.object({
|
|
8
8
|
organization: identifier,
|
|
9
9
|
project: identifier,
|
|
10
10
|
environment: z.enum(["test", "live"])
|
|
11
|
-
}).strict();
|
|
12
|
-
var principalSchema = z.discriminatedUnion("kind", [
|
|
11
|
+
}).strict())();
|
|
12
|
+
var principalSchema = /* @__PURE__ */ (() => z.discriminatedUnion("kind", [
|
|
13
13
|
z.object({ kind: z.literal("member"), member: identifier }),
|
|
14
14
|
z.object({ kind: z.literal("staff"), subject: identifier }),
|
|
15
15
|
z.object({ kind: z.literal("operator"), subject: identifier })
|
|
16
|
-
]);
|
|
17
|
-
var sessionSchema = z.object({
|
|
16
|
+
]))();
|
|
17
|
+
var sessionSchema = /* @__PURE__ */ (() => z.object({
|
|
18
18
|
...authScopeSchema.shape,
|
|
19
19
|
id: identifier,
|
|
20
20
|
principal: principalSchema,
|
|
21
21
|
expiresAt: z.number()
|
|
22
|
-
});
|
|
23
|
-
var knownPrincipalKinds = principalSchema.options.map(
|
|
22
|
+
}))();
|
|
23
|
+
var knownPrincipalKinds = /* @__PURE__ */ (() => principalSchema.options.map(
|
|
24
24
|
(option) => option.shape.kind.value
|
|
25
|
-
);
|
|
26
|
-
var participantPrincipalSchema = z.union([
|
|
25
|
+
))();
|
|
26
|
+
var participantPrincipalSchema = /* @__PURE__ */ (() => z.union([
|
|
27
27
|
principalSchema,
|
|
28
28
|
z.object({ kind: z.string().min(1) }).refine((principal) => !knownPrincipalKinds.includes(principal.kind))
|
|
29
|
-
]);
|
|
30
|
-
var participantSessionSchema = z.object({
|
|
29
|
+
]))();
|
|
30
|
+
var participantSessionSchema = /* @__PURE__ */ (() => z.object({
|
|
31
31
|
...authScopeSchema.shape,
|
|
32
32
|
id: identifier,
|
|
33
33
|
principal: participantPrincipalSchema,
|
|
34
34
|
expiresAt: z.number()
|
|
35
|
-
});
|
|
35
|
+
}))();
|
|
36
36
|
function sessionMember(session) {
|
|
37
37
|
const principal = session?.principal;
|
|
38
38
|
return principal?.kind === "member" && "member" in principal ? principal.member : null;
|
|
39
39
|
}
|
|
40
|
-
var memberSummarySchema = z.object({
|
|
40
|
+
var memberSummarySchema = /* @__PURE__ */ (() => z.object({
|
|
41
41
|
member: identifier,
|
|
42
42
|
avatarSeed: z.string().min(1).max(100),
|
|
43
43
|
/**
|
|
44
44
|
* The member's own email address for "signed in as": the first of `emails`, or null when they
|
|
45
|
-
* have none, such as after wallet-only sign-in. Only the member reads it.
|
|
46
|
-
* older than this field.
|
|
45
|
+
* have none, such as after wallet-only sign-in. Only the member reads it. Relay always sends
|
|
46
|
+
* it; the SDK reads one older than this field as null.
|
|
47
47
|
*/
|
|
48
|
-
email: z.string().min(1).nullable().
|
|
48
|
+
email: z.string().min(1).nullable().default(null),
|
|
49
49
|
/**
|
|
50
50
|
* The verified email addresses that sign the member in: each email-code sign-in address, then
|
|
51
51
|
* the verified email of each Google or Apple account enabled for sign-in. Accounts connected
|
|
52
|
-
* only for activity are left out. Empty when there are none
|
|
53
|
-
* this field.
|
|
52
|
+
* only for activity are left out. Empty when there are none, and read as empty from a Relay
|
|
53
|
+
* older than this field.
|
|
54
54
|
*/
|
|
55
|
-
emails: z.array(z.string().min(1)).
|
|
55
|
+
emails: z.array(z.string().min(1)).default([]),
|
|
56
56
|
/**
|
|
57
57
|
* The member's clock, which Relay judges their activity on. `now` is their current time in epoch
|
|
58
58
|
* milliseconds and `offsetMs` how far it runs ahead of real time: a test member's clock moves
|
|
59
59
|
* when the staging toolbar or `domino test-members advance` moves it, and every other member's
|
|
60
|
-
* offset is 0. `memberTime()` keeps it ticking. Absent from a Relay older than this field
|
|
60
|
+
* offset is 0. `memberTime()` keeps it ticking. Absent from a Relay older than this field;
|
|
61
|
+
* `relay.me.get()` then answers real time.
|
|
61
62
|
*/
|
|
62
63
|
clock: z.object({
|
|
63
64
|
now: z.number().int().nonnegative(),
|
|
64
65
|
offsetMs: z.number().int()
|
|
65
66
|
}).optional()
|
|
66
|
-
});
|
|
67
|
-
var exchangeSchema = authScopeSchema.extend({
|
|
67
|
+
}))();
|
|
68
|
+
var exchangeSchema = /* @__PURE__ */ (() => authScopeSchema.extend({
|
|
68
69
|
identity: z.object({ issuer: identifier, subject: z.string().min(1).max(200) }).strict(),
|
|
69
70
|
role: z.enum(["member", "staff", "operator"])
|
|
70
|
-
}).strict();
|
|
71
|
-
var exchangeResultSchema = z.object({
|
|
71
|
+
}).strict())();
|
|
72
|
+
var exchangeResultSchema = /* @__PURE__ */ (() => z.object({
|
|
72
73
|
token: z.string(),
|
|
73
74
|
session: sessionSchema
|
|
74
|
-
});
|
|
75
|
+
}))();
|
|
75
76
|
|
|
76
77
|
export {
|
|
77
78
|
authScopeSchema,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7X67QLPB.js";
|
|
8
8
|
import {
|
|
9
9
|
photoResultSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ID3BZXFZ.js";
|
|
11
11
|
|
|
12
12
|
// src/image-results.ts
|
|
13
13
|
import * as z from "zod";
|