@domino-sdk/relay 1.7.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.
Files changed (32) hide show
  1. package/dist/action-9Xl0StBg.d.ts +33 -0
  2. package/dist/{activity-Br6vyYze.d.ts → activity-CCe1e_7a.d.ts} +115 -115
  3. package/dist/authoring.d.ts +45 -45
  4. package/dist/authoring.js +1 -1
  5. package/dist/{automatic-outcomes-C1Q9LrDb.d.ts → automatic-outcomes-Dyk0VTUs.d.ts} +1 -1
  6. package/dist/browser.d.ts +7 -6
  7. package/dist/browser.js +5 -4
  8. package/dist/{chunk-C25TDFHN.js → chunk-2N464DDE.js} +1 -1
  9. package/dist/{chunk-GMPPLZKH.js → chunk-2V74CHDL.js} +191 -191
  10. package/dist/{chunk-6RBF3UDA.js → chunk-734LYHWP.js} +2 -2
  11. package/dist/chunk-ETPL6AAJ.js +98 -0
  12. package/dist/{chunk-ZOUEEK5L.js → chunk-FWSSMSIA.js} +49 -21
  13. package/dist/{chunk-BFZHJA2B.js → chunk-L3QFIRGO.js} +2 -2
  14. package/dist/{client-pfml_XAa.d.ts → client-CbASImpi.d.ts} +42 -36
  15. package/dist/{groups-BpWEqaPn.d.ts → groups-Dvmd4CYk.d.ts} +1 -1
  16. package/dist/{images-BaKYd0fl.d.ts → images-Dekv3DYF.d.ts} +1 -1
  17. package/dist/index.d.ts +8 -7
  18. package/dist/index.js +7 -3
  19. package/dist/internal.d.ts +3 -3
  20. package/dist/{offers-CYtal8jO.d.ts → offers-BEGVSOTD.d.ts} +2 -2
  21. package/dist/{pages-CixTNnF4.d.ts → pages-HmS6eedC.d.ts} +38 -38
  22. package/dist/react/index.d.ts +197 -10
  23. package/dist/react/index.js +253 -111
  24. package/dist/{referral-reward-kinds-ClxAuCGx.d.ts → referral-reward-kinds-Flbb1D2q.d.ts} +2 -2
  25. package/dist/schema.d.ts +8 -8
  26. package/dist/schema.js +3 -3
  27. package/dist/server/index.d.ts +592 -46
  28. package/dist/server/index.js +166 -43
  29. package/dist/{sign-in-options-CtXUFV7E.d.ts → sign-in-options-z3wsfizk.d.ts} +2 -2
  30. package/dist/{submission-input-CLefHTrj.d.ts → submission-input-Bs14jIsu.d.ts} +2 -2
  31. package/package.json +1 -1
  32. package/dist/{schema-CQydLqw4.d.ts → schema-BCuiO7eD.d.ts} +15 -15
@@ -21,7 +21,7 @@ import {
21
21
  publishDeploymentSchema,
22
22
  rejectDeploymentSchema,
23
23
  submitDeploymentSchema
24
- } from "../chunk-6RBF3UDA.js";
24
+ } from "../chunk-734LYHWP.js";
25
25
  import "../chunk-MC6V6VMG.js";
26
26
  import {
27
27
  REFERRAL_INTEGRATION_REWARD_ERROR,
@@ -50,6 +50,9 @@ import {
50
50
  participantRoutePattern,
51
51
  participantRoutes
52
52
  } from "../chunk-AXRMT33W.js";
53
+ import {
54
+ withActionId
55
+ } from "../chunk-ETPL6AAJ.js";
53
56
  import {
54
57
  allocateQuestSchema,
55
58
  allocatedQuestSchema,
@@ -67,7 +70,7 @@ import {
67
70
  rewardDeliveriesSchema,
68
71
  rewardDeliverySchema,
69
72
  saveQuestDraftSchema
70
- } from "../chunk-C25TDFHN.js";
73
+ } from "../chunk-2N464DDE.js";
71
74
  import {
72
75
  cosmosNetworkSchema,
73
76
  createPointLedgerSchema,
@@ -118,7 +121,7 @@ import {
118
121
  walletBalanceSchema,
119
122
  walletSignInNetworksSchema,
120
123
  walletUnlinkInputSchema
121
- } from "../chunk-GMPPLZKH.js";
124
+ } from "../chunk-2V74CHDL.js";
122
125
  import {
123
126
  MANAGEMENT_TIMEOUT,
124
127
  lifetime,
@@ -270,6 +273,7 @@ var webhookEventSchema = z2.object({
270
273
  environment: z2.enum(["test", "live"]),
271
274
  data: z2.record(z2.string(), z2.json())
272
275
  });
276
+ var webhookControlInputSchema = z2.object({ actionId: z2.string().uuid().optional() }).strict();
273
277
  var webhookInputSchema = z2.object({
274
278
  url: z2.url().max(2048).refine((value) => {
275
279
  const url = new URL(value);
@@ -389,6 +393,21 @@ var resourceLifecycleResultSchema = z3.object({
389
393
  resource: managedResourceSchema,
390
394
  changed: z3.boolean()
391
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
+ });
392
411
 
393
412
  // src/server/index.ts
394
413
  import { z as z9 } from "zod";
@@ -1512,9 +1531,6 @@ var verifiedPassSchema = z9.object({
1512
1531
  member: identifier,
1513
1532
  quest: identifier
1514
1533
  }).strict();
1515
- function withActionId(input) {
1516
- return { ...input, actionId: input.actionId ?? crypto.randomUUID() };
1517
- }
1518
1534
  function actionIdOf(input) {
1519
1535
  return typeof input === "object" && input !== null && "actionId" in input && typeof input.actionId === "string" ? input.actionId : void 0;
1520
1536
  }
@@ -1831,7 +1847,7 @@ function managementClient(options) {
1831
1847
  return post(
1832
1848
  "/points",
1833
1849
  pointsResultSchema,
1834
- pointsMutationSchema.parse(input),
1850
+ pointsMutationSchema.parse(withActionId(input)),
1835
1851
  call
1836
1852
  );
1837
1853
  }
@@ -1873,10 +1889,63 @@ function managementClient(options) {
1873
1889
  typeof target === "string" ? call : inputOrCall
1874
1890
  );
1875
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
+ };
1876
1926
  return guarded({
1877
1927
  raw,
1878
1928
  request,
1879
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"),
1880
1949
  list: (call) => get("/trackers", z9.array(trackerStatusSchema), call),
1881
1950
  get: (reference, call) => get(
1882
1951
  `/trackers/${identifier.parse(reference)}`,
@@ -1898,16 +1967,17 @@ function managementClient(options) {
1898
1967
  trackerContentSchema,
1899
1968
  call
1900
1969
  ),
1970
+ /** @deprecated Use pause, resume or refresh. Removed in 2.0.0. */
1901
1971
  control: (reference, input, call) => post(
1902
1972
  `/trackers/${identifier.parse(reference)}/control`,
1903
1973
  trackerStatusSchema,
1904
- trackerControlSchema.parse(input),
1974
+ trackerControlSchema.parse(withActionId(input)),
1905
1975
  call
1906
1976
  ),
1907
1977
  ingest: (reference, input, call) => post(
1908
1978
  `/trackers/${identifier.parse(reference)}/records`,
1909
1979
  trackerIngestResultSchema,
1910
- trackerIngestSchema.parse(input),
1980
+ trackerIngestSchema.parse(withActionId(input)),
1911
1981
  call
1912
1982
  ),
1913
1983
  /**
@@ -1938,7 +2008,7 @@ function managementClient(options) {
1938
2008
  retryOutcome: (reference, input, call) => post(
1939
2009
  `/trackers/${identifier.parse(reference)}/outcomes/retry`,
1940
2010
  trackerOutcomeSchema,
1941
- trackerOutcomeRetrySchema.parse(input),
2011
+ trackerOutcomeRetrySchema.parse(withActionId(input)),
1942
2012
  call
1943
2013
  ),
1944
2014
  /** A bounded X search sample to explore a query before defining a tracker. Stores nothing. */
@@ -1950,16 +2020,19 @@ function managementClient(options) {
1950
2020
  )
1951
2021
  },
1952
2022
  engagement: {
2023
+ ...resourceArchiveMethods("engagement"),
2024
+ /** @deprecated Use deployments.preview and deployments.publish with engagement rules. Removed in 2.0.0. */
1953
2025
  previewChange: (input, call) => post(
1954
2026
  "/engagement/preview-change",
1955
2027
  engagementChangePreviewSchema,
1956
2028
  engagementChangePreviewInputSchema.parse(input),
1957
2029
  call
1958
2030
  ),
2031
+ /** @deprecated Use deployments.preview and deployments.publish with engagement rules. Removed in 2.0.0. */
1959
2032
  change: (input, call) => post(
1960
2033
  "/engagement/change",
1961
2034
  engagementRuleSchema,
1962
- engagementChangeSchema.parse(input),
2035
+ engagementChangeSchema.parse(withActionId(input)),
1963
2036
  call
1964
2037
  ),
1965
2038
  /** @deprecated Use `ruleVersions(rule, { cursor })`. Removed in 2.0.0. */
@@ -1982,10 +2055,11 @@ function managementClient(options) {
1982
2055
  engagementBoundaryPageSchema,
1983
2056
  call
1984
2057
  ),
2058
+ /** @deprecated Use deployments.preview and deployments.publish with engagement rules. Removed in 2.0.0. */
1985
2059
  publish: (input, call) => post(
1986
2060
  "/engagement/publish",
1987
2061
  engagementRuleSchema,
1988
- engagementPublishSchema.parse(input),
2062
+ engagementPublishSchema.parse(withActionId(input)),
1989
2063
  call
1990
2064
  ),
1991
2065
  list: (call) => get("/engagement", z9.array(engagementRuleSchema), call),
@@ -2008,6 +2082,7 @@ function managementClient(options) {
2008
2082
  )
2009
2083
  },
2010
2084
  pointLedgers: {
2085
+ unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
2011
2086
  list: (call) => get("/point-ledgers", z9.array(managedPointLedgerSchema), call),
2012
2087
  /**
2013
2088
  * Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
@@ -2034,12 +2109,7 @@ function managementClient(options) {
2034
2109
  call
2035
2110
  );
2036
2111
  },
2037
- archive: (ledger, call) => post(
2038
- `/point-ledgers/${identifier.parse(ledger)}/archive`,
2039
- managedPointLedgerSchema,
2040
- {},
2041
- call
2042
- )
2112
+ archive: archiveManagedPointLedger
2043
2113
  },
2044
2114
  points: {
2045
2115
  /** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
@@ -2062,6 +2132,19 @@ function managementClient(options) {
2062
2132
  history: pointHistory
2063
2133
  },
2064
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"),
2065
2148
  /** A member's referral point history, newest first. Pass `nextCursor` as `cursor`. */
2066
2149
  history: (member, query = {}, call) => get(
2067
2150
  `/referrals/history/${identifier.parse(member)}${queryString({ cursor: query.cursor })}`,
@@ -2074,6 +2157,7 @@ function managementClient(options) {
2074
2157
  * Suspends or restores a member's referral relationship, with a reason; requires `publish`.
2075
2158
  * A suspended member earns their inviter nothing.
2076
2159
  */
2160
+ /** @deprecated Use pause or resume. Removed in 2.0.0. */
2077
2161
  suspend: (member, input, call) => post(
2078
2162
  `/referral-relationships/${identifier.parse(member)}/suspend`,
2079
2163
  ok,
@@ -2102,7 +2186,7 @@ function managementClient(options) {
2102
2186
  ),
2103
2187
  /** @deprecated Use `suspend`, `qualify` or `resolveReward`. Removed in 2.0.0. */
2104
2188
  control: (input, call) => {
2105
- const parsed = referralControlSchema.parse(input);
2189
+ const parsed = referralControlSchema.parse(withActionId(input));
2106
2190
  const { actionId, reason } = parsed;
2107
2191
  if (parsed.kind === "suspend") {
2108
2192
  return post(
@@ -2129,6 +2213,7 @@ function managementClient(options) {
2129
2213
  }
2130
2214
  },
2131
2215
  leaderboards: {
2216
+ ...resourceArchiveMethods("leaderboard"),
2132
2217
  list: (call) => get("/leaderboards", z9.array(publishedLeaderboardSchema), call),
2133
2218
  standings: (board, input = {}, call) => {
2134
2219
  const query = leaderboardQuerySchema.parse(input);
@@ -2154,7 +2239,7 @@ function managementClient(options) {
2154
2239
  exclude: (board, input, call) => post(
2155
2240
  `/leaderboards/${identifier.parse(board)}/exclusions`,
2156
2241
  ok,
2157
- leaderboardExclusionSchema.parse(input),
2242
+ leaderboardExclusionSchema.parse(withActionId(input)),
2158
2243
  call
2159
2244
  ),
2160
2245
  /**
@@ -2167,7 +2252,7 @@ function managementClient(options) {
2167
2252
  group: (group, input, call) => post(
2168
2253
  `/leaderboard-groups/${groupKey(group)}`,
2169
2254
  ok,
2170
- leaderboardGroupSchema.parse(input),
2255
+ leaderboardGroupSchema.parse(withActionId(input)),
2171
2256
  call
2172
2257
  ),
2173
2258
  settlements: (board, call) => get(
@@ -2282,12 +2367,14 @@ function managementClient(options) {
2282
2367
  call
2283
2368
  ),
2284
2369
  read: (call) => get("/catalog", questCatalogSchema, call),
2370
+ /** @deprecated Use deployments.preview. Removed in 2.0.0. */
2285
2371
  previewDeployment: (input, call) => post(
2286
2372
  "/catalog/deploy/preview",
2287
2373
  catalogDeploymentPreviewSchema,
2288
2374
  catalogDeploymentSchema.parse(input),
2289
2375
  call
2290
2376
  ),
2377
+ /** @deprecated Use deployments.preview then deployments.publish. Removed in 2.0.0. */
2291
2378
  deploy: (input, call) => post(
2292
2379
  "/catalog/deploy",
2293
2380
  questCatalogSchema,
@@ -2297,7 +2384,7 @@ function managementClient(options) {
2297
2384
  saveDraft: (input, call) => post(
2298
2385
  "/catalog/drafts",
2299
2386
  questDraftSchema,
2300
- saveQuestDraftSchema.parse(input),
2387
+ saveQuestDraftSchema.parse(withActionId(input)),
2301
2388
  call
2302
2389
  ),
2303
2390
  preview: (input, call) => post(
@@ -2480,7 +2567,7 @@ function managementClient(options) {
2480
2567
  begin: (input, call) => post(
2481
2568
  "/collection/begin",
2482
2569
  entitlementSchema,
2483
- collectionBeginSchema.parse(input),
2570
+ collectionBeginSchema.parse(withActionId(input)),
2484
2571
  call
2485
2572
  )
2486
2573
  },
@@ -2491,6 +2578,7 @@ function managementClient(options) {
2491
2578
  * Pauses or resumes redemptions or one quest's participation, against the `revision` the
2492
2579
  * operator saw, with a reason; requires `publish` permission.
2493
2580
  */
2581
+ /** @deprecated Use quests.pause/resume or redemptions.pause/resume. Removed in 2.0.0. */
2494
2582
  configure: (input, call) => post(
2495
2583
  "/operations",
2496
2584
  operationSchema,
@@ -2498,6 +2586,10 @@ function managementClient(options) {
2498
2586
  call
2499
2587
  )
2500
2588
  },
2589
+ redemptions: {
2590
+ pause: (input, call) => operationVerb("redemptions", true, input, call),
2591
+ resume: (input, call) => operationVerb("redemptions", false, input, call)
2592
+ },
2501
2593
  inventory: {
2502
2594
  /** Every stock item with its counts and the offers that sell it; requires `read` permission. */
2503
2595
  list: (call) => get("/stock-items", z9.array(managedStockItemSchema), call),
@@ -2519,7 +2611,7 @@ function managementClient(options) {
2519
2611
  configure: (input, call) => post(
2520
2612
  "/pickup-inventory",
2521
2613
  pickupCatalogSchema,
2522
- configurePickupSchema.parse(input),
2614
+ configurePickupSchema.parse(withActionId(input)),
2523
2615
  call
2524
2616
  ),
2525
2617
  availability: (entitlement, call) => get(
@@ -2529,6 +2621,18 @@ function managementClient(options) {
2529
2621
  )
2530
2622
  },
2531
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
+ ),
2532
2636
  list: (call) => get("/offers", z9.array(offerSchema), call),
2533
2637
  redemptions: (input = {}, call) => get(
2534
2638
  `/redemptions${queryString({ member: input.member })}`,
@@ -2536,6 +2640,7 @@ function managementClient(options) {
2536
2640
  call
2537
2641
  ),
2538
2642
  /** Pauses or resumes an offer at the revision the operator saw. */
2643
+ /** @deprecated Use pause or resume. Removed in 2.0.0. */
2539
2644
  control: (offer, input, call) => post(
2540
2645
  `/offers/${identifier.parse(offer)}/control`,
2541
2646
  offerSchema,
@@ -2620,6 +2725,18 @@ function managementClient(options) {
2620
2725
  },
2621
2726
  /** Signed activity notifications for one project/environment; writes require publish permission. */
2622
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
+ ),
2623
2740
  list: (call) => get("/webhooks", z9.array(webhookEndpointSchema), call),
2624
2741
  create: (input, call) => post(
2625
2742
  "/webhooks",
@@ -2634,6 +2751,7 @@ function managementClient(options) {
2634
2751
  "PUT",
2635
2752
  call
2636
2753
  ),
2754
+ /** @deprecated Use pause. Removed in 2.0.0. */
2637
2755
  disable: (id, call) => post(
2638
2756
  `/webhooks/${z9.string().uuid().parse(id)}/disable`,
2639
2757
  webhookEndpointSchema,
@@ -2740,16 +2858,20 @@ function managementClient(options) {
2740
2858
  call
2741
2859
  )
2742
2860
  },
2861
+ collections: resourceArchiveMethods("collection"),
2862
+ questTypes: resourceArchiveMethods("quest-type"),
2863
+ images: resourceArchiveMethods("image"),
2743
2864
  resources: {
2744
2865
  list: (call) => get(
2745
2866
  "/resources",
2746
2867
  z9.object({ resources: z9.array(managedResourceSchema) }),
2747
2868
  call
2748
2869
  ),
2870
+ /** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
2749
2871
  lifecycle: (input, call) => post(
2750
2872
  "/resources/lifecycle",
2751
2873
  resourceLifecycleResultSchema,
2752
- resourceLifecycleInputSchema.parse(input),
2874
+ resourceLifecycleInputSchema.parse(withActionId(input)),
2753
2875
  call
2754
2876
  )
2755
2877
  },
@@ -2776,7 +2898,7 @@ function managementClient(options) {
2776
2898
  create: (input, call) => post(
2777
2899
  "/test-members",
2778
2900
  testMemberSchema,
2779
- testMemberCreateSchema.parse(input),
2901
+ testMemberCreateSchema.parse(withActionId(input)),
2780
2902
  call
2781
2903
  ),
2782
2904
  list: (call) => get("/test-members", z9.array(testMemberSchema), call),
@@ -2788,20 +2910,20 @@ function managementClient(options) {
2788
2910
  act: (member, input, call) => post(
2789
2911
  `/test-members/${identifier.parse(member)}/actions`,
2790
2912
  attemptSchema,
2791
- testMemberActionSchema.parse(input),
2913
+ testMemberActionSchema.parse(withActionId(input)),
2792
2914
  call
2793
2915
  ),
2794
2916
  /** Move forward 1–30 project-calendar days, up to 90 total. Reset deletes the member. */
2795
2917
  advance: (member, input, call) => post(
2796
2918
  `/test-members/${identifier.parse(member)}/clock`,
2797
2919
  testMemberSchema,
2798
- testMemberAdvanceSchema.parse(input),
2920
+ testMemberAdvanceSchema.parse(withActionId(input)),
2799
2921
  call
2800
2922
  ),
2801
2923
  reset: (member, input, call) => post(
2802
2924
  `/test-members/${identifier.parse(member)}/reset`,
2803
2925
  testMemberResetResultSchema,
2804
- testMemberResetSchema.parse(input),
2926
+ testMemberResetSchema.parse(withActionId(input)),
2805
2927
  call
2806
2928
  )
2807
2929
  },
@@ -2816,7 +2938,7 @@ function managementClient(options) {
2816
2938
  moderate: (member, quest, contribution, input, call) => post(
2817
2939
  `/members/${identifier.parse(member)}/counters/${identifier.parse(quest)}/${identifier.parse(contribution)}/moderate`,
2818
2940
  counterModerationResultSchema,
2819
- counterModerationSchema.parse(input),
2941
+ counterModerationSchema.parse(withActionId(input)),
2820
2942
  call
2821
2943
  )
2822
2944
  },
@@ -3025,18 +3147,20 @@ function managementClient(options) {
3025
3147
  enroll: (input, call) => post(
3026
3148
  "/campaigns/enrollments",
3027
3149
  campaignEnrollmentSchema,
3028
- memberCampaignEnrollmentInputSchema.parse(input),
3150
+ memberCampaignEnrollmentInputSchema.parse(withActionId(input)),
3029
3151
  call
3030
3152
  ),
3031
3153
  /** Pauses a member's new campaign admissions while preserving history and completed work. */
3032
3154
  withdraw: (input, call) => post(
3033
3155
  "/campaigns/enrollments/withdraw",
3034
3156
  campaignEnrollmentSchema,
3035
- memberCampaignWithdrawalInputSchema.parse(input),
3157
+ memberCampaignWithdrawalInputSchema.parse(withActionId(input)),
3036
3158
  call
3037
3159
  )
3038
3160
  },
3039
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),
3040
3164
  /**
3041
3165
  * Each quest's current release, the most recently published first, archived quests
3042
3166
  * included; requires `read` permission.
@@ -3052,7 +3176,7 @@ function managementClient(options) {
3052
3176
  retryAutomaticScheduling: (input, call) => post(
3053
3177
  "/quests/automatic-scheduling/retry",
3054
3178
  automaticSchedulingSchema,
3055
- automaticSchedulingRetrySchema.parse(input),
3179
+ automaticSchedulingRetrySchema.parse(withActionId(input)),
3056
3180
  call
3057
3181
  ),
3058
3182
  /** Prerequisite-only automatic decisions, including stable skip reasons. Requires read. */
@@ -3072,7 +3196,7 @@ function managementClient(options) {
3072
3196
  catchUpAutomatic: (input, call) => post(
3073
3197
  "/quests/automatic-outcomes/catch-up",
3074
3198
  automaticCatchUpResultSchema,
3075
- automaticCatchUpConfirmSchema.parse(input),
3199
+ automaticCatchUpConfirmSchema.parse(withActionId(input)),
3076
3200
  call
3077
3201
  ),
3078
3202
  /**
@@ -3084,7 +3208,7 @@ function managementClient(options) {
3084
3208
  enroll: (input, call) => post(
3085
3209
  "/quests/enrollments",
3086
3210
  questEnrollmentSchema,
3087
- memberEnrollmentInputSchema.parse(input),
3211
+ memberEnrollmentInputSchema.parse(withActionId(input)),
3088
3212
  call
3089
3213
  ),
3090
3214
  /**
@@ -3092,11 +3216,9 @@ function managementClient(options) {
3092
3216
  * attempts and rewards stay. Deploying the quest's code again keeps it archived.
3093
3217
  */
3094
3218
  archive: (quest, input, call) => post(
3095
- "/releases/lifecycle",
3219
+ `/quests/${identifier.parse(quest)}/archive`,
3096
3220
  questLifecycleSchema,
3097
- questLifecycleInputSchema.parse(
3098
- withActionId({ ...input, quest, archived: true })
3099
- ),
3221
+ questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
3100
3222
  call
3101
3223
  ),
3102
3224
  /**
@@ -3104,11 +3226,9 @@ function managementClient(options) {
3104
3226
  * app's supported interactions; it stays paused while a resource setting is empty.
3105
3227
  */
3106
3228
  unarchive: (quest, input, call) => post(
3107
- "/releases/lifecycle",
3229
+ `/quests/${identifier.parse(quest)}/unarchive`,
3108
3230
  questLifecycleSchema,
3109
- questLifecycleInputSchema.parse(
3110
- withActionId({ ...input, quest, archived: false })
3111
- ),
3231
+ questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
3112
3232
  call
3113
3233
  ),
3114
3234
  /**
@@ -3289,8 +3409,10 @@ export {
3289
3409
  referralSuspensionSchema,
3290
3410
  removeGroupMemberSchema,
3291
3411
  repositorySchema,
3412
+ resourceArchiveInputSchema,
3292
3413
  resourceLifecycleInputSchema,
3293
3414
  resourceLifecycleKindSchema,
3415
+ resourceLifecyclePaths,
3294
3416
  resourceLifecycleResultSchema,
3295
3417
  rolePermissions,
3296
3418
  roleSchema,
@@ -3331,6 +3453,7 @@ export {
3331
3453
  verifiedPassSchema,
3332
3454
  verifyWebhook,
3333
3455
  walletBalanceChainsSchema,
3456
+ webhookControlInputSchema,
3334
3457
  webhookDeliveryPageSchema,
3335
3458
  webhookDeliverySchema,
3336
3459
  webhookEndpointSchema,
@@ -1,5 +1,5 @@
1
- import { a as AuthProvider } from './submission-input-CLefHTrj.js';
2
- import { n as createRelayClient, g as RelayError } from './client-pfml_XAa.js';
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 { cX as LedgerReference, cW as QuestHandle } from './schema-CQydLqw4.js';
3
- import { p as ProjectGroupReference } from './groups-BpWEqaPn.js';
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<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domino-sdk/relay",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {