@domino-sdk/relay 1.23.2 → 1.24.1

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.
@@ -44,7 +44,7 @@ import {
44
44
  participantExchangeSchema,
45
45
  questConfiguration,
46
46
  sequenceCursorSchema
47
- } from "../chunk-JGXIXOQZ.js";
47
+ } from "../chunk-FMQDD2MT.js";
48
48
  import {
49
49
  parseImageExtraction,
50
50
  parseImageResult
@@ -140,7 +140,7 @@ import {
140
140
  telegramChatsSchema
141
141
  } from "../chunk-W33PYWYQ.js";
142
142
  import "../chunk-WOGCRDFT.js";
143
- import "../chunk-337GV555.js";
143
+ import "../chunk-JKFSDBQX.js";
144
144
  import "../chunk-JUQ2GNMD.js";
145
145
  import {
146
146
  CompletionSourceKind,
@@ -458,6 +458,8 @@ var webhookInputSchema = z6.object({
458
458
  }, "Use an HTTPS URL without credentials or a fragment"),
459
459
  types: z6.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
460
460
  }).strict();
461
+ var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z6.string().uuid().optional() }).strict();
462
+ var webhookRotateInputSchema = z6.object({ actionId: z6.string().uuid().optional() }).strict();
461
463
  var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z6.boolean().optional() }).strict();
462
464
  var webhookEndpointSchema = z6.object({
463
465
  ...webhookInputSchema.shape,
@@ -2001,6 +2003,17 @@ function managementClient(options) {
2001
2003
  options2
2002
2004
  );
2003
2005
  }
2006
+ function rotateWebhookSecret(id, inputOrCall, call) {
2007
+ const isInput = call !== void 0 || inputOrCall !== void 0 && "actionId" in inputOrCall;
2008
+ const input = isInput ? inputOrCall ?? {} : {};
2009
+ const options2 = isInput ? call : inputOrCall;
2010
+ return post(
2011
+ `/webhooks/${z13.string().uuid().parse(id)}/rotate-secret`,
2012
+ webhookSecretSchema,
2013
+ webhookRotateInputSchema.parse(withActionId(input)),
2014
+ options2
2015
+ );
2016
+ }
2004
2017
  const archiveResource = (kind, resource, archived, input, call) => post(
2005
2018
  `${resourceLifecyclePaths[kind]}/${identifier.parse(resource)}/${archived ? "archive" : "unarchive"}`,
2006
2019
  resourceLifecycleResultSchema,
@@ -3006,10 +3019,11 @@ function managementClient(options) {
3006
3019
  call
3007
3020
  ),
3008
3021
  list: (call) => get("/webhooks", z13.array(webhookEndpointSchema), call),
3022
+ /** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
3009
3023
  create: (input, call) => post(
3010
3024
  "/webhooks",
3011
3025
  webhookSecretSchema,
3012
- webhookInputSchema.parse(input),
3026
+ webhookCreateInputSchema.parse(withActionId(input)),
3013
3027
  call
3014
3028
  ),
3015
3029
  update: (id, input, call) => request(
@@ -3026,12 +3040,7 @@ function managementClient(options) {
3026
3040
  {},
3027
3041
  call
3028
3042
  ),
3029
- rotateSecret: (id, call) => post(
3030
- `/webhooks/${z13.string().uuid().parse(id)}/rotate-secret`,
3031
- webhookSecretSchema,
3032
- {},
3033
- call
3034
- ),
3043
+ rotateSecret: rotateWebhookSecret,
3035
3044
  deliveries: (id, query = {}, call) => get(
3036
3045
  `/webhooks/${z13.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
3037
3046
  webhookDeliveryPageSchema,
@@ -4433,6 +4442,7 @@ export {
4433
4442
  walletBalanceChainsSchema,
4434
4443
  walletIdentitySelectorSchema,
4435
4444
  webhookControlInputSchema,
4445
+ webhookCreateInputSchema,
4436
4446
  webhookDeleteInputSchema,
4437
4447
  webhookDeliveryPageSchema,
4438
4448
  webhookDeliverySchema,
@@ -4441,6 +4451,7 @@ export {
4441
4451
  webhookEventSchema,
4442
4452
  webhookInputSchema,
4443
4453
  webhookQuerySchema,
4454
+ webhookRotateInputSchema,
4444
4455
  webhookSecretSchema,
4445
4456
  webhookStatePageSchema,
4446
4457
  webhookStateQuerySchema,