@domino-sdk/relay 1.6.0 → 1.9.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/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{activity-mPUN4v5Q.d.ts → activity-CCe1e_7a.d.ts} +115 -115
- package/dist/authoring.d.ts +45 -45
- package/dist/authoring.js +1 -1
- package/dist/{automatic-outcomes-DmuqzQiH.d.ts → automatic-outcomes-Dyk0VTUs.d.ts} +1 -1
- package/dist/browser.d.ts +7 -6
- package/dist/browser.js +5 -4
- package/dist/{chunk-C25TDFHN.js → chunk-2N464DDE.js} +1 -1
- package/dist/{chunk-GMPPLZKH.js → chunk-2V74CHDL.js} +191 -191
- package/dist/{chunk-6RBF3UDA.js → chunk-734LYHWP.js} +2 -2
- package/dist/chunk-ETPL6AAJ.js +98 -0
- package/dist/{chunk-ZOUEEK5L.js → chunk-FWSSMSIA.js} +49 -21
- package/dist/{chunk-BFZHJA2B.js → chunk-L3QFIRGO.js} +2 -2
- package/dist/{client-CQuTAjSs.d.ts → client-CbASImpi.d.ts} +42 -36
- package/dist/{groups-D08JtrZu.d.ts → groups-Dvmd4CYk.d.ts} +1 -1
- package/dist/{images-D7en0Awp.d.ts → images-Dekv3DYF.d.ts} +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +7 -3
- package/dist/internal.d.ts +5 -119
- package/dist/internal.js +1 -1
- package/dist/{offers-BENZl5l5.d.ts → offers-BEGVSOTD.d.ts} +2 -2
- package/dist/{pages-CBa-_u_n.d.ts → pages-HmS6eedC.d.ts} +38 -38
- package/dist/react/index.d.ts +197 -10
- package/dist/react/index.js +253 -111
- package/dist/referral-reward-kinds-Flbb1D2q.d.ts +171 -0
- package/dist/{schema-BPdHSCAc.d.ts → schema-BCuiO7eD.d.ts} +16 -16
- package/dist/schema.d.ts +8 -8
- package/dist/schema.js +3 -3
- package/dist/server/index.d.ts +592 -45
- package/dist/server/index.js +209 -49
- package/dist/{sign-in-options-FPKoZMfo.d.ts → sign-in-options-z3wsfizk.d.ts} +2 -2
- package/dist/{submission-input-BzIWutQi.d.ts → submission-input-Bs14jIsu.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/identity-integration-BPovus6e.d.ts +0 -58
- /package/dist/{chunk-QGLHZ2E5.js → chunk-5ECM6AWV.js} +0 -0
package/dist/server/index.js
CHANGED
|
@@ -21,19 +21,38 @@ import {
|
|
|
21
21
|
publishDeploymentSchema,
|
|
22
22
|
rejectDeploymentSchema,
|
|
23
23
|
submitDeploymentSchema
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-734LYHWP.js";
|
|
25
25
|
import "../chunk-MC6V6VMG.js";
|
|
26
26
|
import {
|
|
27
|
+
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
28
|
+
containsReferralIntegrationReward,
|
|
27
29
|
identityIntegrationInputSchema,
|
|
28
30
|
identityIntegrationSchema,
|
|
29
31
|
identityIntegrationSecretSchema,
|
|
30
|
-
identityKindClaimSchema
|
|
31
|
-
|
|
32
|
+
identityKindClaimSchema,
|
|
33
|
+
parseImageExtraction,
|
|
34
|
+
parseImageResult,
|
|
35
|
+
participantExchangeSchema,
|
|
36
|
+
questConfiguration,
|
|
37
|
+
sequenceCursorSchema
|
|
38
|
+
} from "../chunk-5ECM6AWV.js";
|
|
32
39
|
import {
|
|
33
40
|
imageAssetArtifactSchema
|
|
34
41
|
} from "../chunk-JW4G3SY5.js";
|
|
35
|
-
import
|
|
36
|
-
|
|
42
|
+
import {
|
|
43
|
+
sourceDataSchema,
|
|
44
|
+
sourceRoles,
|
|
45
|
+
validateQuestShape
|
|
46
|
+
} from "../chunk-23QJ7WH4.js";
|
|
47
|
+
import {
|
|
48
|
+
isIntegrationParticipantPath,
|
|
49
|
+
isParticipantRoute,
|
|
50
|
+
participantRoutePattern,
|
|
51
|
+
participantRoutes
|
|
52
|
+
} from "../chunk-AXRMT33W.js";
|
|
53
|
+
import {
|
|
54
|
+
withActionId
|
|
55
|
+
} from "../chunk-ETPL6AAJ.js";
|
|
37
56
|
import {
|
|
38
57
|
allocateQuestSchema,
|
|
39
58
|
allocatedQuestSchema,
|
|
@@ -51,7 +70,7 @@ import {
|
|
|
51
70
|
rewardDeliveriesSchema,
|
|
52
71
|
rewardDeliverySchema,
|
|
53
72
|
saveQuestDraftSchema
|
|
54
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-2N464DDE.js";
|
|
55
74
|
import {
|
|
56
75
|
cosmosNetworkSchema,
|
|
57
76
|
createPointLedgerSchema,
|
|
@@ -102,7 +121,7 @@ import {
|
|
|
102
121
|
walletBalanceSchema,
|
|
103
122
|
walletSignInNetworksSchema,
|
|
104
123
|
walletUnlinkInputSchema
|
|
105
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-2V74CHDL.js";
|
|
106
125
|
import {
|
|
107
126
|
MANAGEMENT_TIMEOUT,
|
|
108
127
|
lifetime,
|
|
@@ -166,6 +185,8 @@ import {
|
|
|
166
185
|
trackerContentReadSchema,
|
|
167
186
|
trackerContentSchema,
|
|
168
187
|
trackerControlSchema,
|
|
188
|
+
trackerDataIssue,
|
|
189
|
+
trackerDataIssues,
|
|
169
190
|
trackerIngestResultSchema,
|
|
170
191
|
trackerIngestSchema,
|
|
171
192
|
trackerOutcomePageSchema,
|
|
@@ -180,7 +201,8 @@ import {
|
|
|
180
201
|
trackerSummarySchema,
|
|
181
202
|
trackerTriggerOutcomePageSchema,
|
|
182
203
|
trackerTriggerOutcomeQuerySchema,
|
|
183
|
-
updateGroupSchema
|
|
204
|
+
updateGroupSchema,
|
|
205
|
+
whereSchemaIssue
|
|
184
206
|
} from "../chunk-KGJSKGKI.js";
|
|
185
207
|
|
|
186
208
|
// src/server/test-members.ts
|
|
@@ -251,6 +273,7 @@ var webhookEventSchema = z2.object({
|
|
|
251
273
|
environment: z2.enum(["test", "live"]),
|
|
252
274
|
data: z2.record(z2.string(), z2.json())
|
|
253
275
|
});
|
|
276
|
+
var webhookControlInputSchema = z2.object({ actionId: z2.string().uuid().optional() }).strict();
|
|
254
277
|
var webhookInputSchema = z2.object({
|
|
255
278
|
url: z2.url().max(2048).refine((value) => {
|
|
256
279
|
const url = new URL(value);
|
|
@@ -370,6 +393,21 @@ var resourceLifecycleResultSchema = z3.object({
|
|
|
370
393
|
resource: managedResourceSchema,
|
|
371
394
|
changed: z3.boolean()
|
|
372
395
|
});
|
|
396
|
+
var resourceLifecyclePaths = {
|
|
397
|
+
tracker: "/trackers",
|
|
398
|
+
referral: "/referral-programs",
|
|
399
|
+
leaderboard: "/leaderboards",
|
|
400
|
+
engagement: "/engagement/rules",
|
|
401
|
+
collection: "/collections",
|
|
402
|
+
"quest-type": "/quest-types",
|
|
403
|
+
image: "/images",
|
|
404
|
+
"point-ledger": "/point-ledgers"
|
|
405
|
+
};
|
|
406
|
+
var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
|
|
407
|
+
kind: true,
|
|
408
|
+
resource: true,
|
|
409
|
+
archived: true
|
|
410
|
+
});
|
|
373
411
|
|
|
374
412
|
// src/server/index.ts
|
|
375
413
|
import { z as z9 } from "zod";
|
|
@@ -1493,9 +1531,6 @@ var verifiedPassSchema = z9.object({
|
|
|
1493
1531
|
member: identifier,
|
|
1494
1532
|
quest: identifier
|
|
1495
1533
|
}).strict();
|
|
1496
|
-
function withActionId(input) {
|
|
1497
|
-
return { ...input, actionId: input.actionId ?? crypto.randomUUID() };
|
|
1498
|
-
}
|
|
1499
1534
|
function actionIdOf(input) {
|
|
1500
1535
|
return typeof input === "object" && input !== null && "actionId" in input && typeof input.actionId === "string" ? input.actionId : void 0;
|
|
1501
1536
|
}
|
|
@@ -1812,7 +1847,7 @@ function managementClient(options) {
|
|
|
1812
1847
|
return post(
|
|
1813
1848
|
"/points",
|
|
1814
1849
|
pointsResultSchema,
|
|
1815
|
-
pointsMutationSchema.parse(input),
|
|
1850
|
+
pointsMutationSchema.parse(withActionId(input)),
|
|
1816
1851
|
call
|
|
1817
1852
|
);
|
|
1818
1853
|
}
|
|
@@ -1854,10 +1889,63 @@ function managementClient(options) {
|
|
|
1854
1889
|
typeof target === "string" ? call : inputOrCall
|
|
1855
1890
|
);
|
|
1856
1891
|
}
|
|
1892
|
+
function archiveManagedPointLedger(ledger, inputOrCall, call) {
|
|
1893
|
+
const input = inputOrCall && "reason" in inputOrCall ? resourceArchiveInputSchema.parse(withActionId(inputOrCall)) : {};
|
|
1894
|
+
const options2 = inputOrCall && "reason" in inputOrCall ? call : inputOrCall;
|
|
1895
|
+
return post(
|
|
1896
|
+
`/point-ledgers/${identifier.parse(ledger)}/archive`,
|
|
1897
|
+
managedPointLedgerSchema,
|
|
1898
|
+
input,
|
|
1899
|
+
options2
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
const archiveResource = (kind, resource, archived, input, call) => post(
|
|
1903
|
+
`${resourceLifecyclePaths[kind]}/${identifier.parse(resource)}/${archived ? "archive" : "unarchive"}`,
|
|
1904
|
+
resourceLifecycleResultSchema,
|
|
1905
|
+
resourceArchiveInputSchema.parse(withActionId(input)),
|
|
1906
|
+
call
|
|
1907
|
+
);
|
|
1908
|
+
const resourceArchiveMethods = (kind) => ({
|
|
1909
|
+
archive: (resource, input, call) => archiveResource(kind, resource, true, input, call),
|
|
1910
|
+
unarchive: (resource, input, call) => archiveResource(kind, resource, false, input, call)
|
|
1911
|
+
});
|
|
1912
|
+
const operationVerb = (target, paused, input, call) => {
|
|
1913
|
+
const {
|
|
1914
|
+
target: _target,
|
|
1915
|
+
paused: _paused,
|
|
1916
|
+
...body
|
|
1917
|
+
} = operationInputSchema.parse(withActionId({ ...input, target, paused }));
|
|
1918
|
+
const path = target === "redemptions" ? "/redemptions" : `/quests/${identifier.parse(target.slice("quest:".length))}`;
|
|
1919
|
+
return post(
|
|
1920
|
+
`${path}/${paused ? "pause" : "resume"}`,
|
|
1921
|
+
operationSchema,
|
|
1922
|
+
body,
|
|
1923
|
+
call
|
|
1924
|
+
);
|
|
1925
|
+
};
|
|
1857
1926
|
return guarded({
|
|
1858
1927
|
raw,
|
|
1859
1928
|
request,
|
|
1860
1929
|
trackers: {
|
|
1930
|
+
pause: (reference, input = {}, call) => post(
|
|
1931
|
+
`/trackers/${identifier.parse(reference)}/pause`,
|
|
1932
|
+
trackerStatusSchema,
|
|
1933
|
+
trackerControlSchema.omit({ action: true }).parse(withActionId(input)),
|
|
1934
|
+
call
|
|
1935
|
+
),
|
|
1936
|
+
resume: (reference, input = {}, call) => post(
|
|
1937
|
+
`/trackers/${identifier.parse(reference)}/resume`,
|
|
1938
|
+
trackerStatusSchema,
|
|
1939
|
+
trackerControlSchema.omit({ action: true }).parse(withActionId(input)),
|
|
1940
|
+
call
|
|
1941
|
+
),
|
|
1942
|
+
refresh: (reference, input = {}, call) => post(
|
|
1943
|
+
`/trackers/${identifier.parse(reference)}/refresh`,
|
|
1944
|
+
trackerStatusSchema,
|
|
1945
|
+
trackerControlSchema.omit({ action: true }).parse(withActionId(input)),
|
|
1946
|
+
call
|
|
1947
|
+
),
|
|
1948
|
+
...resourceArchiveMethods("tracker"),
|
|
1861
1949
|
list: (call) => get("/trackers", z9.array(trackerStatusSchema), call),
|
|
1862
1950
|
get: (reference, call) => get(
|
|
1863
1951
|
`/trackers/${identifier.parse(reference)}`,
|
|
@@ -1879,16 +1967,17 @@ function managementClient(options) {
|
|
|
1879
1967
|
trackerContentSchema,
|
|
1880
1968
|
call
|
|
1881
1969
|
),
|
|
1970
|
+
/** @deprecated Use pause, resume or refresh. Removed in 2.0.0. */
|
|
1882
1971
|
control: (reference, input, call) => post(
|
|
1883
1972
|
`/trackers/${identifier.parse(reference)}/control`,
|
|
1884
1973
|
trackerStatusSchema,
|
|
1885
|
-
trackerControlSchema.parse(input),
|
|
1974
|
+
trackerControlSchema.parse(withActionId(input)),
|
|
1886
1975
|
call
|
|
1887
1976
|
),
|
|
1888
1977
|
ingest: (reference, input, call) => post(
|
|
1889
1978
|
`/trackers/${identifier.parse(reference)}/records`,
|
|
1890
1979
|
trackerIngestResultSchema,
|
|
1891
|
-
trackerIngestSchema.parse(input),
|
|
1980
|
+
trackerIngestSchema.parse(withActionId(input)),
|
|
1892
1981
|
call
|
|
1893
1982
|
),
|
|
1894
1983
|
/**
|
|
@@ -1919,7 +2008,7 @@ function managementClient(options) {
|
|
|
1919
2008
|
retryOutcome: (reference, input, call) => post(
|
|
1920
2009
|
`/trackers/${identifier.parse(reference)}/outcomes/retry`,
|
|
1921
2010
|
trackerOutcomeSchema,
|
|
1922
|
-
trackerOutcomeRetrySchema.parse(input),
|
|
2011
|
+
trackerOutcomeRetrySchema.parse(withActionId(input)),
|
|
1923
2012
|
call
|
|
1924
2013
|
),
|
|
1925
2014
|
/** A bounded X search sample to explore a query before defining a tracker. Stores nothing. */
|
|
@@ -1931,16 +2020,19 @@ function managementClient(options) {
|
|
|
1931
2020
|
)
|
|
1932
2021
|
},
|
|
1933
2022
|
engagement: {
|
|
2023
|
+
...resourceArchiveMethods("engagement"),
|
|
2024
|
+
/** @deprecated Use deployments.preview and deployments.publish with engagement rules. Removed in 2.0.0. */
|
|
1934
2025
|
previewChange: (input, call) => post(
|
|
1935
2026
|
"/engagement/preview-change",
|
|
1936
2027
|
engagementChangePreviewSchema,
|
|
1937
2028
|
engagementChangePreviewInputSchema.parse(input),
|
|
1938
2029
|
call
|
|
1939
2030
|
),
|
|
2031
|
+
/** @deprecated Use deployments.preview and deployments.publish with engagement rules. Removed in 2.0.0. */
|
|
1940
2032
|
change: (input, call) => post(
|
|
1941
2033
|
"/engagement/change",
|
|
1942
2034
|
engagementRuleSchema,
|
|
1943
|
-
engagementChangeSchema.parse(input),
|
|
2035
|
+
engagementChangeSchema.parse(withActionId(input)),
|
|
1944
2036
|
call
|
|
1945
2037
|
),
|
|
1946
2038
|
/** @deprecated Use `ruleVersions(rule, { cursor })`. Removed in 2.0.0. */
|
|
@@ -1963,10 +2055,11 @@ function managementClient(options) {
|
|
|
1963
2055
|
engagementBoundaryPageSchema,
|
|
1964
2056
|
call
|
|
1965
2057
|
),
|
|
2058
|
+
/** @deprecated Use deployments.preview and deployments.publish with engagement rules. Removed in 2.0.0. */
|
|
1966
2059
|
publish: (input, call) => post(
|
|
1967
2060
|
"/engagement/publish",
|
|
1968
2061
|
engagementRuleSchema,
|
|
1969
|
-
engagementPublishSchema.parse(input),
|
|
2062
|
+
engagementPublishSchema.parse(withActionId(input)),
|
|
1970
2063
|
call
|
|
1971
2064
|
),
|
|
1972
2065
|
list: (call) => get("/engagement", z9.array(engagementRuleSchema), call),
|
|
@@ -1989,6 +2082,7 @@ function managementClient(options) {
|
|
|
1989
2082
|
)
|
|
1990
2083
|
},
|
|
1991
2084
|
pointLedgers: {
|
|
2085
|
+
unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
|
|
1992
2086
|
list: (call) => get("/point-ledgers", z9.array(managedPointLedgerSchema), call),
|
|
1993
2087
|
/**
|
|
1994
2088
|
* Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
|
|
@@ -2015,12 +2109,7 @@ function managementClient(options) {
|
|
|
2015
2109
|
call
|
|
2016
2110
|
);
|
|
2017
2111
|
},
|
|
2018
|
-
archive:
|
|
2019
|
-
`/point-ledgers/${identifier.parse(ledger)}/archive`,
|
|
2020
|
-
managedPointLedgerSchema,
|
|
2021
|
-
{},
|
|
2022
|
-
call
|
|
2023
|
-
)
|
|
2112
|
+
archive: archiveManagedPointLedger
|
|
2024
2113
|
},
|
|
2025
2114
|
points: {
|
|
2026
2115
|
/** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
|
|
@@ -2043,6 +2132,19 @@ function managementClient(options) {
|
|
|
2043
2132
|
history: pointHistory
|
|
2044
2133
|
},
|
|
2045
2134
|
referrals: {
|
|
2135
|
+
pause: (member, input, call) => post(
|
|
2136
|
+
`/referral-relationships/${identifier.parse(member)}/pause`,
|
|
2137
|
+
referralManagementSchema,
|
|
2138
|
+
referralSuspensionSchema.omit({ suspended: true }).parse(withActionId(input)),
|
|
2139
|
+
call
|
|
2140
|
+
),
|
|
2141
|
+
resume: (member, input, call) => post(
|
|
2142
|
+
`/referral-relationships/${identifier.parse(member)}/resume`,
|
|
2143
|
+
referralManagementSchema,
|
|
2144
|
+
referralSuspensionSchema.omit({ suspended: true }).parse(withActionId(input)),
|
|
2145
|
+
call
|
|
2146
|
+
),
|
|
2147
|
+
...resourceArchiveMethods("referral"),
|
|
2046
2148
|
/** A member's referral point history, newest first. Pass `nextCursor` as `cursor`. */
|
|
2047
2149
|
history: (member, query = {}, call) => get(
|
|
2048
2150
|
`/referrals/history/${identifier.parse(member)}${queryString({ cursor: query.cursor })}`,
|
|
@@ -2055,6 +2157,7 @@ function managementClient(options) {
|
|
|
2055
2157
|
* Suspends or restores a member's referral relationship, with a reason; requires `publish`.
|
|
2056
2158
|
* A suspended member earns their inviter nothing.
|
|
2057
2159
|
*/
|
|
2160
|
+
/** @deprecated Use pause or resume. Removed in 2.0.0. */
|
|
2058
2161
|
suspend: (member, input, call) => post(
|
|
2059
2162
|
`/referral-relationships/${identifier.parse(member)}/suspend`,
|
|
2060
2163
|
ok,
|
|
@@ -2083,7 +2186,7 @@ function managementClient(options) {
|
|
|
2083
2186
|
),
|
|
2084
2187
|
/** @deprecated Use `suspend`, `qualify` or `resolveReward`. Removed in 2.0.0. */
|
|
2085
2188
|
control: (input, call) => {
|
|
2086
|
-
const parsed = referralControlSchema.parse(input);
|
|
2189
|
+
const parsed = referralControlSchema.parse(withActionId(input));
|
|
2087
2190
|
const { actionId, reason } = parsed;
|
|
2088
2191
|
if (parsed.kind === "suspend") {
|
|
2089
2192
|
return post(
|
|
@@ -2110,6 +2213,7 @@ function managementClient(options) {
|
|
|
2110
2213
|
}
|
|
2111
2214
|
},
|
|
2112
2215
|
leaderboards: {
|
|
2216
|
+
...resourceArchiveMethods("leaderboard"),
|
|
2113
2217
|
list: (call) => get("/leaderboards", z9.array(publishedLeaderboardSchema), call),
|
|
2114
2218
|
standings: (board, input = {}, call) => {
|
|
2115
2219
|
const query = leaderboardQuerySchema.parse(input);
|
|
@@ -2135,7 +2239,7 @@ function managementClient(options) {
|
|
|
2135
2239
|
exclude: (board, input, call) => post(
|
|
2136
2240
|
`/leaderboards/${identifier.parse(board)}/exclusions`,
|
|
2137
2241
|
ok,
|
|
2138
|
-
leaderboardExclusionSchema.parse(input),
|
|
2242
|
+
leaderboardExclusionSchema.parse(withActionId(input)),
|
|
2139
2243
|
call
|
|
2140
2244
|
),
|
|
2141
2245
|
/**
|
|
@@ -2148,7 +2252,7 @@ function managementClient(options) {
|
|
|
2148
2252
|
group: (group, input, call) => post(
|
|
2149
2253
|
`/leaderboard-groups/${groupKey(group)}`,
|
|
2150
2254
|
ok,
|
|
2151
|
-
leaderboardGroupSchema.parse(input),
|
|
2255
|
+
leaderboardGroupSchema.parse(withActionId(input)),
|
|
2152
2256
|
call
|
|
2153
2257
|
),
|
|
2154
2258
|
settlements: (board, call) => get(
|
|
@@ -2263,12 +2367,14 @@ function managementClient(options) {
|
|
|
2263
2367
|
call
|
|
2264
2368
|
),
|
|
2265
2369
|
read: (call) => get("/catalog", questCatalogSchema, call),
|
|
2370
|
+
/** @deprecated Use deployments.preview. Removed in 2.0.0. */
|
|
2266
2371
|
previewDeployment: (input, call) => post(
|
|
2267
2372
|
"/catalog/deploy/preview",
|
|
2268
2373
|
catalogDeploymentPreviewSchema,
|
|
2269
2374
|
catalogDeploymentSchema.parse(input),
|
|
2270
2375
|
call
|
|
2271
2376
|
),
|
|
2377
|
+
/** @deprecated Use deployments.preview then deployments.publish. Removed in 2.0.0. */
|
|
2272
2378
|
deploy: (input, call) => post(
|
|
2273
2379
|
"/catalog/deploy",
|
|
2274
2380
|
questCatalogSchema,
|
|
@@ -2278,7 +2384,7 @@ function managementClient(options) {
|
|
|
2278
2384
|
saveDraft: (input, call) => post(
|
|
2279
2385
|
"/catalog/drafts",
|
|
2280
2386
|
questDraftSchema,
|
|
2281
|
-
saveQuestDraftSchema.parse(input),
|
|
2387
|
+
saveQuestDraftSchema.parse(withActionId(input)),
|
|
2282
2388
|
call
|
|
2283
2389
|
),
|
|
2284
2390
|
preview: (input, call) => post(
|
|
@@ -2461,7 +2567,7 @@ function managementClient(options) {
|
|
|
2461
2567
|
begin: (input, call) => post(
|
|
2462
2568
|
"/collection/begin",
|
|
2463
2569
|
entitlementSchema,
|
|
2464
|
-
collectionBeginSchema.parse(input),
|
|
2570
|
+
collectionBeginSchema.parse(withActionId(input)),
|
|
2465
2571
|
call
|
|
2466
2572
|
)
|
|
2467
2573
|
},
|
|
@@ -2472,6 +2578,7 @@ function managementClient(options) {
|
|
|
2472
2578
|
* Pauses or resumes redemptions or one quest's participation, against the `revision` the
|
|
2473
2579
|
* operator saw, with a reason; requires `publish` permission.
|
|
2474
2580
|
*/
|
|
2581
|
+
/** @deprecated Use quests.pause/resume or redemptions.pause/resume. Removed in 2.0.0. */
|
|
2475
2582
|
configure: (input, call) => post(
|
|
2476
2583
|
"/operations",
|
|
2477
2584
|
operationSchema,
|
|
@@ -2479,6 +2586,10 @@ function managementClient(options) {
|
|
|
2479
2586
|
call
|
|
2480
2587
|
)
|
|
2481
2588
|
},
|
|
2589
|
+
redemptions: {
|
|
2590
|
+
pause: (input, call) => operationVerb("redemptions", true, input, call),
|
|
2591
|
+
resume: (input, call) => operationVerb("redemptions", false, input, call)
|
|
2592
|
+
},
|
|
2482
2593
|
inventory: {
|
|
2483
2594
|
/** Every stock item with its counts and the offers that sell it; requires `read` permission. */
|
|
2484
2595
|
list: (call) => get("/stock-items", z9.array(managedStockItemSchema), call),
|
|
@@ -2500,7 +2611,7 @@ function managementClient(options) {
|
|
|
2500
2611
|
configure: (input, call) => post(
|
|
2501
2612
|
"/pickup-inventory",
|
|
2502
2613
|
pickupCatalogSchema,
|
|
2503
|
-
configurePickupSchema.parse(input),
|
|
2614
|
+
configurePickupSchema.parse(withActionId(input)),
|
|
2504
2615
|
call
|
|
2505
2616
|
),
|
|
2506
2617
|
availability: (entitlement, call) => get(
|
|
@@ -2510,6 +2621,18 @@ function managementClient(options) {
|
|
|
2510
2621
|
)
|
|
2511
2622
|
},
|
|
2512
2623
|
offers: {
|
|
2624
|
+
pause: (offer, input, call) => post(
|
|
2625
|
+
`/offers/${identifier.parse(offer)}/pause`,
|
|
2626
|
+
offerSchema,
|
|
2627
|
+
offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
|
|
2628
|
+
call
|
|
2629
|
+
),
|
|
2630
|
+
resume: (offer, input, call) => post(
|
|
2631
|
+
`/offers/${identifier.parse(offer)}/resume`,
|
|
2632
|
+
offerSchema,
|
|
2633
|
+
offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
|
|
2634
|
+
call
|
|
2635
|
+
),
|
|
2513
2636
|
list: (call) => get("/offers", z9.array(offerSchema), call),
|
|
2514
2637
|
redemptions: (input = {}, call) => get(
|
|
2515
2638
|
`/redemptions${queryString({ member: input.member })}`,
|
|
@@ -2517,6 +2640,7 @@ function managementClient(options) {
|
|
|
2517
2640
|
call
|
|
2518
2641
|
),
|
|
2519
2642
|
/** Pauses or resumes an offer at the revision the operator saw. */
|
|
2643
|
+
/** @deprecated Use pause or resume. Removed in 2.0.0. */
|
|
2520
2644
|
control: (offer, input, call) => post(
|
|
2521
2645
|
`/offers/${identifier.parse(offer)}/control`,
|
|
2522
2646
|
offerSchema,
|
|
@@ -2601,6 +2725,18 @@ function managementClient(options) {
|
|
|
2601
2725
|
},
|
|
2602
2726
|
/** Signed activity notifications for one project/environment; writes require publish permission. */
|
|
2603
2727
|
webhooks: {
|
|
2728
|
+
pause: (id, input = {}, call) => post(
|
|
2729
|
+
`/webhooks/${z9.string().uuid().parse(id)}/pause`,
|
|
2730
|
+
webhookEndpointSchema,
|
|
2731
|
+
webhookControlInputSchema.parse(withActionId(input)),
|
|
2732
|
+
call
|
|
2733
|
+
),
|
|
2734
|
+
resume: (id, input = {}, call) => post(
|
|
2735
|
+
`/webhooks/${z9.string().uuid().parse(id)}/resume`,
|
|
2736
|
+
webhookEndpointSchema,
|
|
2737
|
+
webhookControlInputSchema.parse(withActionId(input)),
|
|
2738
|
+
call
|
|
2739
|
+
),
|
|
2604
2740
|
list: (call) => get("/webhooks", z9.array(webhookEndpointSchema), call),
|
|
2605
2741
|
create: (input, call) => post(
|
|
2606
2742
|
"/webhooks",
|
|
@@ -2615,6 +2751,7 @@ function managementClient(options) {
|
|
|
2615
2751
|
"PUT",
|
|
2616
2752
|
call
|
|
2617
2753
|
),
|
|
2754
|
+
/** @deprecated Use pause. Removed in 2.0.0. */
|
|
2618
2755
|
disable: (id, call) => post(
|
|
2619
2756
|
`/webhooks/${z9.string().uuid().parse(id)}/disable`,
|
|
2620
2757
|
webhookEndpointSchema,
|
|
@@ -2721,16 +2858,20 @@ function managementClient(options) {
|
|
|
2721
2858
|
call
|
|
2722
2859
|
)
|
|
2723
2860
|
},
|
|
2861
|
+
collections: resourceArchiveMethods("collection"),
|
|
2862
|
+
questTypes: resourceArchiveMethods("quest-type"),
|
|
2863
|
+
images: resourceArchiveMethods("image"),
|
|
2724
2864
|
resources: {
|
|
2725
2865
|
list: (call) => get(
|
|
2726
2866
|
"/resources",
|
|
2727
2867
|
z9.object({ resources: z9.array(managedResourceSchema) }),
|
|
2728
2868
|
call
|
|
2729
2869
|
),
|
|
2870
|
+
/** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
|
|
2730
2871
|
lifecycle: (input, call) => post(
|
|
2731
2872
|
"/resources/lifecycle",
|
|
2732
2873
|
resourceLifecycleResultSchema,
|
|
2733
|
-
resourceLifecycleInputSchema.parse(input),
|
|
2874
|
+
resourceLifecycleInputSchema.parse(withActionId(input)),
|
|
2734
2875
|
call
|
|
2735
2876
|
)
|
|
2736
2877
|
},
|
|
@@ -2757,7 +2898,7 @@ function managementClient(options) {
|
|
|
2757
2898
|
create: (input, call) => post(
|
|
2758
2899
|
"/test-members",
|
|
2759
2900
|
testMemberSchema,
|
|
2760
|
-
testMemberCreateSchema.parse(input),
|
|
2901
|
+
testMemberCreateSchema.parse(withActionId(input)),
|
|
2761
2902
|
call
|
|
2762
2903
|
),
|
|
2763
2904
|
list: (call) => get("/test-members", z9.array(testMemberSchema), call),
|
|
@@ -2769,20 +2910,20 @@ function managementClient(options) {
|
|
|
2769
2910
|
act: (member, input, call) => post(
|
|
2770
2911
|
`/test-members/${identifier.parse(member)}/actions`,
|
|
2771
2912
|
attemptSchema,
|
|
2772
|
-
testMemberActionSchema.parse(input),
|
|
2913
|
+
testMemberActionSchema.parse(withActionId(input)),
|
|
2773
2914
|
call
|
|
2774
2915
|
),
|
|
2775
2916
|
/** Move forward 1–30 project-calendar days, up to 90 total. Reset deletes the member. */
|
|
2776
2917
|
advance: (member, input, call) => post(
|
|
2777
2918
|
`/test-members/${identifier.parse(member)}/clock`,
|
|
2778
2919
|
testMemberSchema,
|
|
2779
|
-
testMemberAdvanceSchema.parse(input),
|
|
2920
|
+
testMemberAdvanceSchema.parse(withActionId(input)),
|
|
2780
2921
|
call
|
|
2781
2922
|
),
|
|
2782
2923
|
reset: (member, input, call) => post(
|
|
2783
2924
|
`/test-members/${identifier.parse(member)}/reset`,
|
|
2784
2925
|
testMemberResetResultSchema,
|
|
2785
|
-
testMemberResetSchema.parse(input),
|
|
2926
|
+
testMemberResetSchema.parse(withActionId(input)),
|
|
2786
2927
|
call
|
|
2787
2928
|
)
|
|
2788
2929
|
},
|
|
@@ -2797,7 +2938,7 @@ function managementClient(options) {
|
|
|
2797
2938
|
moderate: (member, quest, contribution, input, call) => post(
|
|
2798
2939
|
`/members/${identifier.parse(member)}/counters/${identifier.parse(quest)}/${identifier.parse(contribution)}/moderate`,
|
|
2799
2940
|
counterModerationResultSchema,
|
|
2800
|
-
counterModerationSchema.parse(input),
|
|
2941
|
+
counterModerationSchema.parse(withActionId(input)),
|
|
2801
2942
|
call
|
|
2802
2943
|
)
|
|
2803
2944
|
},
|
|
@@ -3006,18 +3147,20 @@ function managementClient(options) {
|
|
|
3006
3147
|
enroll: (input, call) => post(
|
|
3007
3148
|
"/campaigns/enrollments",
|
|
3008
3149
|
campaignEnrollmentSchema,
|
|
3009
|
-
memberCampaignEnrollmentInputSchema.parse(input),
|
|
3150
|
+
memberCampaignEnrollmentInputSchema.parse(withActionId(input)),
|
|
3010
3151
|
call
|
|
3011
3152
|
),
|
|
3012
3153
|
/** Pauses a member's new campaign admissions while preserving history and completed work. */
|
|
3013
3154
|
withdraw: (input, call) => post(
|
|
3014
3155
|
"/campaigns/enrollments/withdraw",
|
|
3015
3156
|
campaignEnrollmentSchema,
|
|
3016
|
-
memberCampaignWithdrawalInputSchema.parse(input),
|
|
3157
|
+
memberCampaignWithdrawalInputSchema.parse(withActionId(input)),
|
|
3017
3158
|
call
|
|
3018
3159
|
)
|
|
3019
3160
|
},
|
|
3020
3161
|
quests: {
|
|
3162
|
+
pause: (quest, input, call) => operationVerb(`quest:${identifier.parse(quest)}`, true, input, call),
|
|
3163
|
+
resume: (quest, input, call) => operationVerb(`quest:${identifier.parse(quest)}`, false, input, call),
|
|
3021
3164
|
/**
|
|
3022
3165
|
* Each quest's current release, the most recently published first, archived quests
|
|
3023
3166
|
* included; requires `read` permission.
|
|
@@ -3033,7 +3176,7 @@ function managementClient(options) {
|
|
|
3033
3176
|
retryAutomaticScheduling: (input, call) => post(
|
|
3034
3177
|
"/quests/automatic-scheduling/retry",
|
|
3035
3178
|
automaticSchedulingSchema,
|
|
3036
|
-
automaticSchedulingRetrySchema.parse(input),
|
|
3179
|
+
automaticSchedulingRetrySchema.parse(withActionId(input)),
|
|
3037
3180
|
call
|
|
3038
3181
|
),
|
|
3039
3182
|
/** Prerequisite-only automatic decisions, including stable skip reasons. Requires read. */
|
|
@@ -3053,7 +3196,7 @@ function managementClient(options) {
|
|
|
3053
3196
|
catchUpAutomatic: (input, call) => post(
|
|
3054
3197
|
"/quests/automatic-outcomes/catch-up",
|
|
3055
3198
|
automaticCatchUpResultSchema,
|
|
3056
|
-
automaticCatchUpConfirmSchema.parse(input),
|
|
3199
|
+
automaticCatchUpConfirmSchema.parse(withActionId(input)),
|
|
3057
3200
|
call
|
|
3058
3201
|
),
|
|
3059
3202
|
/**
|
|
@@ -3065,7 +3208,7 @@ function managementClient(options) {
|
|
|
3065
3208
|
enroll: (input, call) => post(
|
|
3066
3209
|
"/quests/enrollments",
|
|
3067
3210
|
questEnrollmentSchema,
|
|
3068
|
-
memberEnrollmentInputSchema.parse(input),
|
|
3211
|
+
memberEnrollmentInputSchema.parse(withActionId(input)),
|
|
3069
3212
|
call
|
|
3070
3213
|
),
|
|
3071
3214
|
/**
|
|
@@ -3073,11 +3216,9 @@ function managementClient(options) {
|
|
|
3073
3216
|
* attempts and rewards stay. Deploying the quest's code again keeps it archived.
|
|
3074
3217
|
*/
|
|
3075
3218
|
archive: (quest, input, call) => post(
|
|
3076
|
-
|
|
3219
|
+
`/quests/${identifier.parse(quest)}/archive`,
|
|
3077
3220
|
questLifecycleSchema,
|
|
3078
|
-
questLifecycleInputSchema.parse(
|
|
3079
|
-
withActionId({ ...input, quest, archived: true })
|
|
3080
|
-
),
|
|
3221
|
+
questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
|
|
3081
3222
|
call
|
|
3082
3223
|
),
|
|
3083
3224
|
/**
|
|
@@ -3085,11 +3226,9 @@ function managementClient(options) {
|
|
|
3085
3226
|
* app's supported interactions; it stays paused while a resource setting is empty.
|
|
3086
3227
|
*/
|
|
3087
3228
|
unarchive: (quest, input, call) => post(
|
|
3088
|
-
|
|
3229
|
+
`/quests/${identifier.parse(quest)}/unarchive`,
|
|
3089
3230
|
questLifecycleSchema,
|
|
3090
|
-
questLifecycleInputSchema.parse(
|
|
3091
|
-
withActionId({ ...input, quest, archived: false })
|
|
3092
|
-
),
|
|
3231
|
+
questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
|
|
3093
3232
|
call
|
|
3094
3233
|
),
|
|
3095
3234
|
/**
|
|
@@ -3129,6 +3268,7 @@ export {
|
|
|
3129
3268
|
ManagementError,
|
|
3130
3269
|
ManagementErrorCode,
|
|
3131
3270
|
PayoutSourceKind,
|
|
3271
|
+
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
3132
3272
|
RevokedDeliveryOutcome,
|
|
3133
3273
|
RevokedEntitlementOutcome,
|
|
3134
3274
|
RevokedReferralOutcome,
|
|
@@ -3171,6 +3311,7 @@ export {
|
|
|
3171
3311
|
completionRevocationSchema,
|
|
3172
3312
|
completionRevocationShortfallSchema,
|
|
3173
3313
|
completionRevokeSchema,
|
|
3314
|
+
containsReferralIntegrationReward,
|
|
3174
3315
|
createGroupSchema,
|
|
3175
3316
|
createManagementClient,
|
|
3176
3317
|
createRepositorySchema,
|
|
@@ -3199,11 +3340,14 @@ export {
|
|
|
3199
3340
|
hostedKeySecretSchema,
|
|
3200
3341
|
hostedManagementBindings,
|
|
3201
3342
|
hostedManagementClient,
|
|
3343
|
+
identityIntegrationInputSchema,
|
|
3202
3344
|
identityIntegrationSchema,
|
|
3203
3345
|
identityKindClaimSchema,
|
|
3204
3346
|
ingestTrackerScopeSchema,
|
|
3205
3347
|
inventorySchema,
|
|
3348
|
+
isIntegrationParticipantPath,
|
|
3206
3349
|
isManagementError,
|
|
3350
|
+
isParticipantRoute,
|
|
3207
3351
|
issuedTokenSchema,
|
|
3208
3352
|
managedAttemptPageSchema,
|
|
3209
3353
|
managedAttemptQuerySchema,
|
|
@@ -3235,6 +3379,11 @@ export {
|
|
|
3235
3379
|
operationSchema,
|
|
3236
3380
|
operatorUserSchema,
|
|
3237
3381
|
pageSchema,
|
|
3382
|
+
parseImageExtraction,
|
|
3383
|
+
parseImageResult,
|
|
3384
|
+
participantExchangeSchema,
|
|
3385
|
+
participantRoutePattern,
|
|
3386
|
+
participantRoutes,
|
|
3238
3387
|
participantSignInInputSchema,
|
|
3239
3388
|
participantSignInSchema,
|
|
3240
3389
|
permissionSchema,
|
|
@@ -3250,6 +3399,7 @@ export {
|
|
|
3250
3399
|
projectTransferSchema,
|
|
3251
3400
|
projectUpdateInputSchema,
|
|
3252
3401
|
querySchema,
|
|
3402
|
+
questConfiguration,
|
|
3253
3403
|
questLifecycleInputSchema,
|
|
3254
3404
|
questLifecycleSchema,
|
|
3255
3405
|
readinessSchema,
|
|
@@ -3259,11 +3409,16 @@ export {
|
|
|
3259
3409
|
referralSuspensionSchema,
|
|
3260
3410
|
removeGroupMemberSchema,
|
|
3261
3411
|
repositorySchema,
|
|
3412
|
+
resourceArchiveInputSchema,
|
|
3262
3413
|
resourceLifecycleInputSchema,
|
|
3263
3414
|
resourceLifecycleKindSchema,
|
|
3415
|
+
resourceLifecyclePaths,
|
|
3264
3416
|
resourceLifecycleResultSchema,
|
|
3265
3417
|
rolePermissions,
|
|
3266
3418
|
roleSchema,
|
|
3419
|
+
sequenceCursorSchema,
|
|
3420
|
+
sourceDataSchema,
|
|
3421
|
+
sourceRoles,
|
|
3267
3422
|
stageRequestSchema,
|
|
3268
3423
|
stagedDeploymentContentSchema,
|
|
3269
3424
|
stagedDeploymentKey,
|
|
@@ -3290,11 +3445,15 @@ export {
|
|
|
3290
3445
|
tokenInputSchema,
|
|
3291
3446
|
tokenSchema,
|
|
3292
3447
|
tokenScopeInputSchema,
|
|
3448
|
+
trackerDataIssue,
|
|
3449
|
+
trackerDataIssues,
|
|
3293
3450
|
trackerTriggerOutcomePageSchema,
|
|
3294
3451
|
updateGroupSchema,
|
|
3452
|
+
validateQuestShape,
|
|
3295
3453
|
verifiedPassSchema,
|
|
3296
3454
|
verifyWebhook,
|
|
3297
3455
|
walletBalanceChainsSchema,
|
|
3456
|
+
webhookControlInputSchema,
|
|
3298
3457
|
webhookDeliveryPageSchema,
|
|
3299
3458
|
webhookDeliverySchema,
|
|
3300
3459
|
webhookEndpointSchema,
|
|
@@ -3302,5 +3461,6 @@ export {
|
|
|
3302
3461
|
webhookInputSchema,
|
|
3303
3462
|
webhookQuerySchema,
|
|
3304
3463
|
webhookSecretSchema,
|
|
3305
|
-
webhookUpdateSchema
|
|
3464
|
+
webhookUpdateSchema,
|
|
3465
|
+
whereSchemaIssue
|
|
3306
3466
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AuthProvider } from './submission-input-
|
|
2
|
-
import { n as createRelayClient, g as RelayError } from './client-
|
|
1
|
+
import { a as AuthProvider } from './submission-input-Bs14jIsu.js';
|
|
2
|
+
import { n as createRelayClient, g as RelayError } from './client-CbASImpi.js';
|
|
3
3
|
import { C as CosmosChain, a as CosmosNetwork, f as WalletSigner, d as WalletSignInNetwork } from './wallet-YssWxGg8.js';
|
|
4
4
|
|
|
5
5
|
/** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import { p as ProjectGroupReference } from './groups-
|
|
2
|
+
import { cX as LedgerReference, cW as QuestHandle } from './schema-BCuiO7eD.js';
|
|
3
|
+
import { p as ProjectGroupReference } from './groups-Dvmd4CYk.js';
|
|
4
4
|
|
|
5
5
|
/** A Discord message as `ctx.discord.message()` reads it, from the project's Discord server. */
|
|
6
6
|
declare const discordMessageSchema: z.ZodObject<{
|