autumn-js 1.3.31 → 1.3.32

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 (68) hide show
  1. package/dist/backend/adapters/express.js +51 -11
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +51 -11
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +51 -11
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +51 -11
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +51 -11
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-5O5HYYLC.mjs → chunk-4ZTDDMTF.mjs} +1 -1
  12. package/dist/backend/{chunk-2AWRLLRG.mjs → chunk-6V2J4NU5.mjs} +6 -6
  13. package/dist/backend/{chunk-J5ZGSPT5.mjs → chunk-GKWJ3V2B.mjs} +1 -1
  14. package/dist/backend/{chunk-RG47OAHK.mjs → chunk-GSZMTPZW.mjs} +1 -1
  15. package/dist/backend/{chunk-QBDF7PFS.mjs → chunk-HRNHS5CH.mjs} +51 -11
  16. package/dist/backend/{chunk-GGLNYY74.mjs → chunk-LGGW6YZU.mjs} +1 -1
  17. package/dist/backend/{chunk-GKS25SWN.mjs → chunk-ZO23CKLL.mjs} +4 -4
  18. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.js +51 -11
  21. package/dist/backend/core/handlers/coreHandler.mjs +6 -6
  22. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  23. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  25. package/dist/backend/core/handlers/handleRouteByName.js +51 -11
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
  27. package/dist/backend/core/handlers/index.d.mts +1 -1
  28. package/dist/backend/core/handlers/index.d.ts +1 -1
  29. package/dist/backend/core/handlers/index.js +51 -11
  30. package/dist/backend/core/handlers/index.mjs +10 -10
  31. package/dist/backend/core/index.d.mts +1 -1
  32. package/dist/backend/core/index.d.ts +1 -1
  33. package/dist/backend/core/index.js +51 -11
  34. package/dist/backend/core/index.mjs +9 -9
  35. package/dist/backend/core/routes/index.d.mts +1 -1
  36. package/dist/backend/core/routes/index.d.ts +1 -1
  37. package/dist/backend/core/routes/index.mjs +1 -1
  38. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  39. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  40. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  41. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  43. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  44. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  45. package/dist/backend/core/types/index.d.mts +1 -1
  46. package/dist/backend/core/types/index.d.ts +1 -1
  47. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  48. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  49. package/dist/backend/core/utils/index.mjs +3 -3
  50. package/dist/backend/index.d.mts +2 -2
  51. package/dist/backend/index.d.ts +2 -2
  52. package/dist/backend/index.js +51 -11
  53. package/dist/backend/index.mjs +9 -9
  54. package/dist/backend/{routeTypes-B3vMnHPK.d.mts → routeTypes-B8u_xPju.d.mts} +50 -7
  55. package/dist/backend/{routeTypes-oP9lNejq.d.ts → routeTypes-CmQqxy8j.d.ts} +50 -7
  56. package/dist/better-auth/{chunk-IVHOI3OR.mjs → chunk-BFT6LWQE.mjs} +51 -11
  57. package/dist/better-auth/index.js +51 -11
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +51 -11
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +51 -11
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/sdk/index.d.mts +60 -9
  64. package/dist/sdk/index.d.ts +60 -9
  65. package/dist/sdk/index.js +70 -12
  66. package/dist/sdk/index.mjs +67 -13
  67. package/package.json +2 -2
  68. package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
@@ -1,26 +1,26 @@
1
1
  import "../../chunk-VXND2UDT.mjs";
2
2
  import {
3
3
  handleRouteByName
4
- } from "../../chunk-GKS25SWN.mjs";
4
+ } from "../../chunk-ZO23CKLL.mjs";
5
5
  import {
6
6
  createCoreHandler
7
- } from "../../chunk-2AWRLLRG.mjs";
8
- import "../../chunk-TSF4YCUO.mjs";
9
- import "../../chunk-UAR3TMWI.mjs";
10
- import "../../chunk-QBDF7PFS.mjs";
11
- import "../../chunk-IQQQ5P6R.mjs";
7
+ } from "../../chunk-6V2J4NU5.mjs";
8
+ import "../../chunk-HRNHS5CH.mjs";
12
9
  import {
13
10
  executeRoute
14
- } from "../../chunk-IXUCY7AU.mjs";
15
- import "../../chunk-OTXV5FY7.mjs";
16
- import "../../chunk-I7CD6EB6.mjs";
17
- import "../../chunk-VZIMT7AO.mjs";
11
+ } from "../../chunk-MOHYGUMA.mjs";
18
12
  import {
19
13
  resolveIdentity
20
14
  } from "../../chunk-TBQ27LIK.mjs";
21
15
  import {
22
16
  transformSdkError
23
17
  } from "../../chunk-J44WR3QZ.mjs";
18
+ import "../../chunk-TSF4YCUO.mjs";
19
+ import "../../chunk-UAR3TMWI.mjs";
20
+ import "../../chunk-IQQQ5P6R.mjs";
21
+ import "../../chunk-OTXV5FY7.mjs";
22
+ import "../../chunk-VZIMT7AO.mjs";
23
+ import "../../chunk-I7CD6EB6.mjs";
24
24
  import "../../chunk-N7NFYY54.mjs";
25
25
  export {
26
26
  createCoreHandler,
@@ -2,7 +2,7 @@ export { createCoreHandler } from './handlers/coreHandler.mjs';
2
2
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../authTypes-TPWTIfcM.mjs';
3
3
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './types/handlerTypes.mjs';
4
4
  export { BackendErrorBody, BackendResult } from './types/responseTypes.mjs';
5
- export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-B3vMnHPK.mjs';
5
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-B8u_xPju.mjs';
6
6
  export { HandleRouteByNameOptions, HandleRouteByNameResult, handleRouteByName } from './handlers/handleRouteByName.mjs';
7
7
  export { buildRouter } from './routes/routeBuilder.mjs';
8
8
  export { routeConfigs } from './routes/routeConfigs.mjs';
@@ -2,7 +2,7 @@ export { createCoreHandler } from './handlers/coreHandler.js';
2
2
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../authTypes-TPWTIfcM.js';
3
3
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './types/handlerTypes.js';
4
4
  export { BackendErrorBody, BackendResult } from './types/responseTypes.js';
5
- export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-oP9lNejq.js';
5
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, R as RouteDefinition } from '../routeTypes-CmQqxy8j.js';
6
6
  export { HandleRouteByNameOptions, HandleRouteByNameResult, handleRouteByName } from './handlers/handleRouteByName.js';
7
7
  export { buildRouter } from './routes/routeBuilder.js';
8
8
  export { routeConfigs } from './routes/routeConfigs.js';
@@ -39007,10 +39007,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39007
39007
  description: z88.optional(z88.string()),
39008
39008
  disabled: z88.optional(z88.boolean())
39009
39009
  });
39010
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39011
- webhooks: z88.array(
39012
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39013
- )
39010
+ var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.pipe(
39011
+ z88.object({
39012
+ webhooks: z88.array(
39013
+ z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39014
+ ),
39015
+ skipDeletions: z88._default(z88.boolean(), true)
39016
+ }),
39017
+ z88.transform((v) => {
39018
+ return remap(v, {
39019
+ skipDeletions: "skip_deletions"
39020
+ });
39021
+ })
39022
+ );
39023
+ var ChangeWebhook3$inboundSchema = z88.pipe(
39024
+ z88.object({
39025
+ id: string5(),
39026
+ url: string5(),
39027
+ description: nullable(string5()),
39028
+ events: z88.array(string5()),
39029
+ disabled: boolean2(),
39030
+ created_at: number2(),
39031
+ updated_at: number2()
39032
+ }),
39033
+ z88.transform((v) => {
39034
+ return remap(v, {
39035
+ "created_at": "createdAt",
39036
+ "updated_at": "updatedAt"
39037
+ });
39038
+ })
39039
+ );
39040
+ var Change5$inboundSchema = z88.object({
39041
+ action: literal3("delete"),
39042
+ id: string5(),
39043
+ webhook: z88.lazy(() => ChangeWebhook3$inboundSchema)
39014
39044
  });
39015
39045
  var ChangeWebhook2$inboundSchema = z88.pipe(
39016
39046
  z88.object({
@@ -39140,7 +39170,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39140
39170
  create: z88.lazy(() => Change1$inboundSchema),
39141
39171
  update: z88.lazy(() => Change2$inboundSchema),
39142
39172
  adopt: z88.lazy(() => Change3$inboundSchema),
39143
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39173
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39174
+ delete: z88.lazy(() => Change5$inboundSchema)
39144
39175
  });
39145
39176
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39146
39177
  id: string5(),
@@ -39151,7 +39182,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39151
39182
  create: z88.lazy(() => Change1$inboundSchema),
39152
39183
  update: z88.lazy(() => Change2$inboundSchema),
39153
39184
  adopt: z88.lazy(() => Change3$inboundSchema),
39154
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39185
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39186
+ delete: z88.lazy(() => Change5$inboundSchema)
39155
39187
  })),
39156
39188
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39157
39189
  });
@@ -44673,9 +44705,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44673
44705
  description: z102.optional(z102.string()),
44674
44706
  disabled: z102.optional(z102.boolean())
44675
44707
  });
44676
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44677
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44678
- });
44708
+ var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.pipe(
44709
+ z102.object({
44710
+ webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema)),
44711
+ skipDeletions: z102._default(z102.boolean(), true)
44712
+ }),
44713
+ z102.transform((v) => {
44714
+ return remap(v, {
44715
+ skipDeletions: "skip_deletions"
44716
+ });
44717
+ })
44718
+ );
44679
44719
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44680
44720
  z102.object({
44681
44721
  id: string5(),
@@ -62802,7 +62842,7 @@ var Webhooks = class extends ClientSDK {
62802
62842
  ));
62803
62843
  }
62804
62844
  /**
62805
- * Shows what `webhooks.sync` would do with the same body, without changing anything: which webhooks it would create or update, and which existing ones it would leave alone because the body doesn't list them.
62845
+ * Shows what `webhooks.sync` would do with the same body, without changing anything: which webhooks it would create, update or delete, and which existing ones it would leave alone because the body doesn't list them.
62806
62846
  */
62807
62847
  async previewSync(request, options) {
62808
62848
  return unwrapAsync(webhooksPreviewSync(
@@ -62812,7 +62852,7 @@ var Webhooks = class extends ClientSDK {
62812
62852
  ));
62813
62853
  }
62814
62854
  /**
62815
- * Makes the listed webhooks exist as described: creates missing ones and updates ones that differ. Webhooks not listed are left alone — sync never deletes. Returns the signing secret of each webhook it created, once. Each webhook is applied on its own: failures are listed in `errors` while the rest still apply, and the request fails only when none could be applied.
62855
+ * Makes the listed webhooks exist as described: creates missing ones and updates ones that differ. Webhooks not listed are left alone, unless `skip_deletions` is false: then every webhook not listed is deleted, including ones made in the dashboard. Returns the signing secret of each webhook it created, once. Each webhook is applied on its own: failures are listed in `errors` while the rest still apply, and the request fails only when none could be applied.
62816
62856
  */
62817
62857
  async sync(request, options) {
62818
62858
  return unwrapAsync(webhooksSync(
@@ -2,28 +2,28 @@ import "../chunk-WYDGEDEU.mjs";
2
2
  import "../chunk-VXND2UDT.mjs";
3
3
  import {
4
4
  handleRouteByName
5
- } from "../chunk-GKS25SWN.mjs";
5
+ } from "../chunk-ZO23CKLL.mjs";
6
6
  import {
7
7
  createCoreHandler
8
- } from "../chunk-2AWRLLRG.mjs";
8
+ } from "../chunk-6V2J4NU5.mjs";
9
+ import "../chunk-HRNHS5CH.mjs";
10
+ import "../chunk-MOHYGUMA.mjs";
11
+ import "../chunk-TBQ27LIK.mjs";
12
+ import "../chunk-J44WR3QZ.mjs";
9
13
  import "../chunk-TSF4YCUO.mjs";
10
14
  import {
11
15
  buildRouter
12
16
  } from "../chunk-UAR3TMWI.mjs";
13
- import "../chunk-QBDF7PFS.mjs";
14
17
  import {
15
18
  routeConfigs
16
19
  } from "../chunk-IQQQ5P6R.mjs";
17
- import "../chunk-IXUCY7AU.mjs";
18
20
  import "../chunk-OTXV5FY7.mjs";
19
- import {
20
- sanitizeBody
21
- } from "../chunk-I7CD6EB6.mjs";
22
21
  import {
23
22
  secretKeyCheck
24
23
  } from "../chunk-VZIMT7AO.mjs";
25
- import "../chunk-TBQ27LIK.mjs";
26
- import "../chunk-J44WR3QZ.mjs";
24
+ import {
25
+ sanitizeBody
26
+ } from "../chunk-I7CD6EB6.mjs";
27
27
  import {
28
28
  backendError,
29
29
  backendSuccess,
@@ -1,7 +1,7 @@
1
1
  export { RouteMatch, buildRouter } from './routeBuilder.mjs';
2
2
  export { routeConfigs } from './routeConfigs.mjs';
3
3
  import 'rou3';
4
- import '../../routeTypes-B3vMnHPK.mjs';
4
+ import '../../routeTypes-B8u_xPju.mjs';
5
5
  import '../../authTypes-TPWTIfcM.mjs';
6
6
  import 'zod/v4';
7
7
  import '../utils/sanitizeBody.mjs';
@@ -1,7 +1,7 @@
1
1
  export { RouteMatch, buildRouter } from './routeBuilder.js';
2
2
  export { routeConfigs } from './routeConfigs.js';
3
3
  import 'rou3';
4
- import '../../routeTypes-oP9lNejq.js';
4
+ import '../../routeTypes-CmQqxy8j.js';
5
5
  import '../../authTypes-TPWTIfcM.js';
6
6
  import 'zod/v4';
7
7
  import '../utils/sanitizeBody.js';
@@ -6,8 +6,8 @@ import {
6
6
  routeConfigs
7
7
  } from "../../chunk-IQQQ5P6R.mjs";
8
8
  import "../../chunk-OTXV5FY7.mjs";
9
- import "../../chunk-I7CD6EB6.mjs";
10
9
  import "../../chunk-VZIMT7AO.mjs";
10
+ import "../../chunk-I7CD6EB6.mjs";
11
11
  import "../../chunk-N7NFYY54.mjs";
12
12
  export {
13
13
  buildRouter,
@@ -1,5 +1,5 @@
1
1
  import { RouterContext } from 'rou3';
2
- import { R as RouteDefinition } from '../../routeTypes-B3vMnHPK.mjs';
2
+ import { R as RouteDefinition } from '../../routeTypes-B8u_xPju.mjs';
3
3
  import '../../authTypes-TPWTIfcM.mjs';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.mjs';
@@ -1,5 +1,5 @@
1
1
  import { RouterContext } from 'rou3';
2
- import { R as RouteDefinition } from '../../routeTypes-oP9lNejq.js';
2
+ import { R as RouteDefinition } from '../../routeTypes-CmQqxy8j.js';
3
3
  import '../../authTypes-TPWTIfcM.js';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.js';
@@ -1,4 +1,4 @@
1
- import { R as RouteDefinition, b as RouteName } from '../../routeTypes-B3vMnHPK.mjs';
1
+ import { R as RouteDefinition, b as RouteName } from '../../routeTypes-B8u_xPju.mjs';
2
2
  import '../../authTypes-TPWTIfcM.mjs';
3
3
  import 'zod/v4';
4
4
  import '../utils/sanitizeBody.mjs';
@@ -1,4 +1,4 @@
1
- import { R as RouteDefinition, b as RouteName } from '../../routeTypes-oP9lNejq.js';
1
+ import { R as RouteDefinition, b as RouteName } from '../../routeTypes-CmQqxy8j.js';
2
2
  import '../../authTypes-TPWTIfcM.js';
3
3
  import 'zod/v4';
4
4
  import '../utils/sanitizeBody.js';
@@ -2,8 +2,8 @@ import {
2
2
  routeConfigs
3
3
  } from "../../chunk-IQQQ5P6R.mjs";
4
4
  import "../../chunk-OTXV5FY7.mjs";
5
- import "../../chunk-I7CD6EB6.mjs";
6
5
  import "../../chunk-VZIMT7AO.mjs";
6
+ import "../../chunk-I7CD6EB6.mjs";
7
7
  import "../../chunk-N7NFYY54.mjs";
8
8
  export {
9
9
  routeConfigs
@@ -1,5 +1,5 @@
1
1
  import { A as AuthResult } from '../../authTypes-TPWTIfcM.mjs';
2
- import { R as RouteDefinition } from '../../routeTypes-B3vMnHPK.mjs';
2
+ import { R as RouteDefinition } from '../../routeTypes-B8u_xPju.mjs';
3
3
  import './responseTypes.mjs';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.mjs';
@@ -1,5 +1,5 @@
1
1
  import { A as AuthResult } from '../../authTypes-TPWTIfcM.js';
2
- import { R as RouteDefinition } from '../../routeTypes-oP9lNejq.js';
2
+ import { R as RouteDefinition } from '../../routeTypes-CmQqxy8j.js';
3
3
  import './responseTypes.js';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.js';
@@ -1,6 +1,6 @@
1
1
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-TPWTIfcM.mjs';
2
2
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.mjs';
3
3
  export { BackendErrorBody, BackendResult } from './responseTypes.mjs';
4
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-B3vMnHPK.mjs';
4
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-B8u_xPju.mjs';
5
5
  import 'zod/v4';
6
6
  import '../utils/sanitizeBody.mjs';
@@ -1,6 +1,6 @@
1
1
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-TPWTIfcM.js';
2
2
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.js';
3
3
  export { BackendErrorBody, BackendResult } from './responseTypes.js';
4
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-oP9lNejq.js';
4
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-CmQqxy8j.js';
5
5
  import 'zod/v4';
6
6
  import '../utils/sanitizeBody.js';
@@ -1,4 +1,4 @@
1
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-B3vMnHPK.mjs';
1
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-B8u_xPju.mjs';
2
2
  import 'zod/v4';
3
3
  import '../utils/sanitizeBody.mjs';
4
4
  import '../../authTypes-TPWTIfcM.mjs';
@@ -1,4 +1,4 @@
1
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-oP9lNejq.js';
1
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-CmQqxy8j.js';
2
2
  import 'zod/v4';
3
3
  import '../utils/sanitizeBody.js';
4
4
  import '../../authTypes-TPWTIfcM.js';
@@ -1,12 +1,12 @@
1
1
  import "../../chunk-OTXV5FY7.mjs";
2
+ import {
3
+ secretKeyCheck
4
+ } from "../../chunk-VZIMT7AO.mjs";
2
5
  import {
3
6
  CUSTOMER_PROTECTED_BODY_FIELDS,
4
7
  DEFAULT_PROTECTED_BODY_FIELDS,
5
8
  sanitizeBody
6
9
  } from "../../chunk-I7CD6EB6.mjs";
7
- import {
8
- secretKeyCheck
9
- } from "../../chunk-VZIMT7AO.mjs";
10
10
  import {
11
11
  backendError,
12
12
  backendSuccess,
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-TPWTIfcM.mjs';
3
3
  export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-TPWTIfcM.mjs';
4
4
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.mjs';
5
5
  export { BackendErrorBody, BackendResult } from './core/types/responseTypes.mjs';
6
- import { R as RouteDefinition } from './routeTypes-B3vMnHPK.mjs';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-B3vMnHPK.mjs';
6
+ import { R as RouteDefinition } from './routeTypes-B8u_xPju.mjs';
7
+ export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-B8u_xPju.mjs';
8
8
  export { buildRouter } from './core/routes/routeBuilder.mjs';
9
9
  export { routeConfigs } from './core/routes/routeConfigs.mjs';
10
10
  export { secretKeyCheck } from './core/utils/secretKeyCheck.mjs';
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-TPWTIfcM.js';
3
3
  export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-TPWTIfcM.js';
4
4
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.js';
5
5
  export { BackendErrorBody, BackendResult } from './core/types/responseTypes.js';
6
- import { R as RouteDefinition } from './routeTypes-oP9lNejq.js';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-oP9lNejq.js';
6
+ import { R as RouteDefinition } from './routeTypes-CmQqxy8j.js';
7
+ export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-CmQqxy8j.js';
8
8
  export { buildRouter } from './core/routes/routeBuilder.js';
9
9
  export { routeConfigs } from './core/routes/routeConfigs.js';
10
10
  export { secretKeyCheck } from './core/utils/secretKeyCheck.js';
@@ -39007,10 +39007,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39007
39007
  description: z88.optional(z88.string()),
39008
39008
  disabled: z88.optional(z88.boolean())
39009
39009
  });
39010
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39011
- webhooks: z88.array(
39012
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39013
- )
39010
+ var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.pipe(
39011
+ z88.object({
39012
+ webhooks: z88.array(
39013
+ z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39014
+ ),
39015
+ skipDeletions: z88._default(z88.boolean(), true)
39016
+ }),
39017
+ z88.transform((v) => {
39018
+ return remap(v, {
39019
+ skipDeletions: "skip_deletions"
39020
+ });
39021
+ })
39022
+ );
39023
+ var ChangeWebhook3$inboundSchema = z88.pipe(
39024
+ z88.object({
39025
+ id: string5(),
39026
+ url: string5(),
39027
+ description: nullable(string5()),
39028
+ events: z88.array(string5()),
39029
+ disabled: boolean2(),
39030
+ created_at: number2(),
39031
+ updated_at: number2()
39032
+ }),
39033
+ z88.transform((v) => {
39034
+ return remap(v, {
39035
+ "created_at": "createdAt",
39036
+ "updated_at": "updatedAt"
39037
+ });
39038
+ })
39039
+ );
39040
+ var Change5$inboundSchema = z88.object({
39041
+ action: literal3("delete"),
39042
+ id: string5(),
39043
+ webhook: z88.lazy(() => ChangeWebhook3$inboundSchema)
39014
39044
  });
39015
39045
  var ChangeWebhook2$inboundSchema = z88.pipe(
39016
39046
  z88.object({
@@ -39140,7 +39170,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39140
39170
  create: z88.lazy(() => Change1$inboundSchema),
39141
39171
  update: z88.lazy(() => Change2$inboundSchema),
39142
39172
  adopt: z88.lazy(() => Change3$inboundSchema),
39143
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39173
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39174
+ delete: z88.lazy(() => Change5$inboundSchema)
39144
39175
  });
39145
39176
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39146
39177
  id: string5(),
@@ -39151,7 +39182,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39151
39182
  create: z88.lazy(() => Change1$inboundSchema),
39152
39183
  update: z88.lazy(() => Change2$inboundSchema),
39153
39184
  adopt: z88.lazy(() => Change3$inboundSchema),
39154
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39185
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39186
+ delete: z88.lazy(() => Change5$inboundSchema)
39155
39187
  })),
39156
39188
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39157
39189
  });
@@ -44673,9 +44705,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44673
44705
  description: z102.optional(z102.string()),
44674
44706
  disabled: z102.optional(z102.boolean())
44675
44707
  });
44676
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44677
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44678
- });
44708
+ var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.pipe(
44709
+ z102.object({
44710
+ webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema)),
44711
+ skipDeletions: z102._default(z102.boolean(), true)
44712
+ }),
44713
+ z102.transform((v) => {
44714
+ return remap(v, {
44715
+ skipDeletions: "skip_deletions"
44716
+ });
44717
+ })
44718
+ );
44679
44719
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44680
44720
  z102.object({
44681
44721
  id: string5(),
@@ -62802,7 +62842,7 @@ var Webhooks = class extends ClientSDK {
62802
62842
  ));
62803
62843
  }
62804
62844
  /**
62805
- * Shows what `webhooks.sync` would do with the same body, without changing anything: which webhooks it would create or update, and which existing ones it would leave alone because the body doesn't list them.
62845
+ * Shows what `webhooks.sync` would do with the same body, without changing anything: which webhooks it would create, update or delete, and which existing ones it would leave alone because the body doesn't list them.
62806
62846
  */
62807
62847
  async previewSync(request, options) {
62808
62848
  return unwrapAsync(webhooksPreviewSync(
@@ -62812,7 +62852,7 @@ var Webhooks = class extends ClientSDK {
62812
62852
  ));
62813
62853
  }
62814
62854
  /**
62815
- * Makes the listed webhooks exist as described: creates missing ones and updates ones that differ. Webhooks not listed are left alone — sync never deletes. Returns the signing secret of each webhook it created, once. Each webhook is applied on its own: failures are listed in `errors` while the rest still apply, and the request fails only when none could be applied.
62855
+ * Makes the listed webhooks exist as described: creates missing ones and updates ones that differ. Webhooks not listed are left alone, unless `skip_deletions` is false: then every webhook not listed is deleted, including ones made in the dashboard. Returns the signing secret of each webhook it created, once. Each webhook is applied on its own: failures are listed in `errors` while the rest still apply, and the request fails only when none could be applied.
62816
62856
  */
62817
62857
  async sync(request, options) {
62818
62858
  return unwrapAsync(webhooksSync(
@@ -1,27 +1,27 @@
1
1
  import "./chunk-WYDGEDEU.mjs";
2
2
  import "./chunk-VXND2UDT.mjs";
3
- import "./chunk-GKS25SWN.mjs";
3
+ import "./chunk-ZO23CKLL.mjs";
4
4
  import {
5
5
  createCoreHandler
6
- } from "./chunk-2AWRLLRG.mjs";
6
+ } from "./chunk-6V2J4NU5.mjs";
7
+ import "./chunk-HRNHS5CH.mjs";
8
+ import "./chunk-MOHYGUMA.mjs";
9
+ import "./chunk-TBQ27LIK.mjs";
10
+ import "./chunk-J44WR3QZ.mjs";
7
11
  import "./chunk-TSF4YCUO.mjs";
8
12
  import {
9
13
  buildRouter
10
14
  } from "./chunk-UAR3TMWI.mjs";
11
- import "./chunk-QBDF7PFS.mjs";
12
15
  import {
13
16
  routeConfigs
14
17
  } from "./chunk-IQQQ5P6R.mjs";
15
- import "./chunk-IXUCY7AU.mjs";
16
18
  import "./chunk-OTXV5FY7.mjs";
17
- import {
18
- sanitizeBody
19
- } from "./chunk-I7CD6EB6.mjs";
20
19
  import {
21
20
  secretKeyCheck
22
21
  } from "./chunk-VZIMT7AO.mjs";
23
- import "./chunk-TBQ27LIK.mjs";
24
- import "./chunk-J44WR3QZ.mjs";
22
+ import {
23
+ sanitizeBody
24
+ } from "./chunk-I7CD6EB6.mjs";
25
25
  import {
26
26
  backendError,
27
27
  backendSuccess,
@@ -45574,9 +45574,48 @@ type PreviewSyncWebhooksWebhookRequest = {
45574
45574
  };
45575
45575
  type PreviewSyncWebhooksSyncWebhooksParams = {
45576
45576
  /**
45577
- * The webhooks to create or update. Webhooks not listed are left alone; nothing is deleted.
45577
+ * The webhooks to create or update. Webhooks not listed are left alone unless `skip_deletions` is false.
45578
45578
  */
45579
45579
  webhooks: Array<PreviewSyncWebhooksWebhookRequest>;
45580
+ /**
45581
+ * When false, `webhooks` is the environment's complete set: every webhook not listed is deleted, including ones made in the dashboard. Defaults true, which leaves unlisted webhooks alone.
45582
+ */
45583
+ skipDeletions?: boolean | undefined;
45584
+ };
45585
+ type ChangeWebhook3 = {
45586
+ /**
45587
+ * The webhook's ID. Webhooks made in the dashboard show their `ep_…` ID.
45588
+ */
45589
+ id: string;
45590
+ /**
45591
+ * The URL Autumn sends events to.
45592
+ */
45593
+ url: string;
45594
+ /**
45595
+ * A note for your own reference.
45596
+ */
45597
+ description: string | null;
45598
+ /**
45599
+ * The events sent to this webhook, as `WebhookEventType` names; a type newer than your client is returned as-is. Empty means the webhook receives every event.
45600
+ */
45601
+ events: Array<string>;
45602
+ /**
45603
+ * When true, no events are sent to the webhook.
45604
+ */
45605
+ disabled: boolean;
45606
+ /**
45607
+ * When the webhook was created, ms since epoch.
45608
+ */
45609
+ createdAt: number;
45610
+ /**
45611
+ * When the webhook was last changed, ms since epoch.
45612
+ */
45613
+ updatedAt: number;
45614
+ };
45615
+ type Change5 = {
45616
+ action: "delete";
45617
+ id: string;
45618
+ webhook: ChangeWebhook3;
45580
45619
  };
45581
45620
  type ChangeWebhook2 = {
45582
45621
  /**
@@ -45789,9 +45828,9 @@ type PreviewSyncWebhooksError = {
45789
45828
  */
45790
45829
  type PreviewSyncWebhooksResponse = {
45791
45830
  /**
45792
- * What `webhooks.sync` would do. `adopt` takes over a webhook made in the dashboard with the same URL, keeping its signing secret. `unmanaged` webhooks exist but aren't listed, so sync leaves them alone.
45831
+ * What `webhooks.sync` would do. `adopt` takes over a webhook made in the dashboard with the same URL, keeping its signing secret. `unmanaged` webhooks exist but aren't listed, so sync leaves them alone. `delete` webhooks aren't listed and `skip_deletions` is false, so sync deletes them.
45793
45832
  */
45794
- changes: Array<Change1 | Change2 | Change3 | Change4 | Unknown<"action">>;
45833
+ changes: Array<Change1 | Change2 | Change3 | Change4 | Change5 | Unknown<"action">>;
45795
45834
  /**
45796
45835
  * Listed webhooks `webhooks.sync` would refuse, e.g. when several dashboard webhooks share the URL.
45797
45836
  */
@@ -52130,9 +52169,13 @@ type SyncWebhooksWebhookRequest = {
52130
52169
  };
52131
52170
  type SyncWebhooksSyncWebhooksParams = {
52132
52171
  /**
52133
- * The webhooks to create or update. Webhooks not listed are left alone; nothing is deleted.
52172
+ * The webhooks to create or update. Webhooks not listed are left alone unless `skip_deletions` is false.
52134
52173
  */
52135
52174
  webhooks: Array<SyncWebhooksWebhookRequest>;
52175
+ /**
52176
+ * When false, `webhooks` is the environment's complete set: every webhook not listed is deleted, including ones made in the dashboard. Defaults true, which leaves unlisted webhooks alone.
52177
+ */
52178
+ skipDeletions?: boolean | undefined;
52136
52179
  };
52137
52180
  type SyncWebhooksWebhookResponse = {
52138
52181
  /**
@@ -52188,7 +52231,7 @@ type SyncWebhooksResponse = {
52188
52231
  */
52189
52232
  secrets: Array<Secret>;
52190
52233
  /**
52191
- * Webhooks that couldn't be created or updated. The others were still applied; the request fails only when none could be.
52234
+ * Webhooks that couldn't be created, updated or deleted. The others were still applied; the request fails only when none could be.
52192
52235
  */
52193
52236
  errors: Array<SyncWebhooksError>;
52194
52237
  };
@@ -64357,11 +64400,11 @@ declare class Webhooks extends ClientSDK {
64357
64400
  */
64358
64401
  delete(request: DeleteWebhookParams, options?: RequestOptions): Promise<DeleteWebhookResponse>;
64359
64402
  /**
64360
- * Shows what `webhooks.sync` would do with the same body, without changing anything: which webhooks it would create or update, and which existing ones it would leave alone because the body doesn't list them.
64403
+ * Shows what `webhooks.sync` would do with the same body, without changing anything: which webhooks it would create, update or delete, and which existing ones it would leave alone because the body doesn't list them.
64361
64404
  */
64362
64405
  previewSync(request: PreviewSyncWebhooksSyncWebhooksParams, options?: RequestOptions): Promise<PreviewSyncWebhooksResponse>;
64363
64406
  /**
64364
- * Makes the listed webhooks exist as described: creates missing ones and updates ones that differ. Webhooks not listed are left alone — sync never deletes. Returns the signing secret of each webhook it created, once. Each webhook is applied on its own: failures are listed in `errors` while the rest still apply, and the request fails only when none could be applied.
64407
+ * Makes the listed webhooks exist as described: creates missing ones and updates ones that differ. Webhooks not listed are left alone, unless `skip_deletions` is false: then every webhook not listed is deleted, including ones made in the dashboard. Returns the signing secret of each webhook it created, once. Each webhook is applied on its own: failures are listed in `errors` while the rest still apply, and the request fails only when none could be applied.
64365
64408
  */
64366
64409
  sync(request: SyncWebhooksSyncWebhooksParams, options?: RequestOptions): Promise<SyncWebhooksResponse>;
64367
64410
  }