autumn-js 1.3.30 → 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 (98) hide show
  1. package/dist/backend/adapters/express.js +55 -43
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +55 -43
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +55 -43
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +55 -43
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +55 -43
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-MRFQEKBR.mjs → chunk-4ZTDDMTF.mjs} +1 -1
  12. package/dist/backend/{chunk-N4L4DLFM.mjs → chunk-6V2J4NU5.mjs} +6 -6
  13. package/dist/backend/{chunk-SAUYRKWO.mjs → chunk-GKWJ3V2B.mjs} +1 -1
  14. package/dist/backend/{chunk-OWSZPOV7.mjs → chunk-GSZMTPZW.mjs} +1 -1
  15. package/dist/backend/{chunk-QRJFDPO4.mjs → chunk-HRNHS5CH.mjs} +55 -43
  16. package/dist/backend/{chunk-SESSECCJ.mjs → chunk-LGGW6YZU.mjs} +1 -1
  17. package/dist/backend/{chunk-YFZ7FT2F.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 +55 -43
  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 +55 -43
  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 +55 -43
  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 +55 -43
  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 +55 -43
  53. package/dist/backend/index.mjs +9 -9
  54. package/dist/backend/{routeTypes-fIoCsrzJ.d.mts → routeTypes-B8u_xPju.d.mts} +52 -39
  55. package/dist/backend/{routeTypes-DoJj_pOC.d.ts → routeTypes-CmQqxy8j.d.ts} +52 -39
  56. package/dist/better-auth/{chunk-FOW6KLFG.mjs → chunk-BFT6LWQE.mjs} +55 -43
  57. package/dist/better-auth/index.js +55 -43
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +55 -43
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +55 -43
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/react/AutumnContext.d.mts +1 -1
  64. package/dist/react/AutumnContext.d.ts +1 -1
  65. package/dist/react/client/AutumnClient.d.mts +1 -1
  66. package/dist/react/client/AutumnClient.d.ts +1 -1
  67. package/dist/react/client/IAutumnClient.d.mts +1 -1
  68. package/dist/react/client/IAutumnClient.d.ts +1 -1
  69. package/dist/react/client/index.d.mts +1 -1
  70. package/dist/react/client/index.d.ts +1 -1
  71. package/dist/react/hooks/index.d.mts +1 -1
  72. package/dist/react/hooks/index.d.ts +1 -1
  73. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
  74. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
  75. package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
  76. package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
  77. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  78. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  79. package/dist/react/hooks/useCustomer.d.mts +1 -1
  80. package/dist/react/hooks/useCustomer.d.ts +1 -1
  81. package/dist/react/hooks/useEntity.d.mts +1 -1
  82. package/dist/react/hooks/useEntity.d.ts +1 -1
  83. package/dist/react/hooks/useListEvents.d.mts +1 -1
  84. package/dist/react/hooks/useListEvents.d.ts +1 -1
  85. package/dist/react/hooks/useListPlans.d.mts +1 -1
  86. package/dist/react/hooks/useListPlans.d.ts +1 -1
  87. package/dist/react/hooks/useReferrals.d.mts +1 -1
  88. package/dist/react/hooks/useReferrals.d.ts +1 -1
  89. package/dist/react/index.d.mts +1 -1
  90. package/dist/react/index.d.ts +1 -1
  91. package/dist/react/{params-k6ijFeOE.d.ts → params-DP6BNkc0.d.ts} +2 -2
  92. package/dist/react/{params-Yk7M-n-7.d.mts → params-DZznA-no.d.mts} +2 -2
  93. package/dist/sdk/index.d.mts +66 -65
  94. package/dist/sdk/index.d.ts +66 -65
  95. package/dist/sdk/index.js +78 -58
  96. package/dist/sdk/index.mjs +73 -53
  97. package/package.json +2 -2
  98. 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-YFZ7FT2F.mjs";
4
+ } from "../../chunk-ZO23CKLL.mjs";
5
5
  import {
6
6
  createCoreHandler
7
- } from "../../chunk-N4L4DLFM.mjs";
8
- import "../../chunk-TSF4YCUO.mjs";
9
- import "../../chunk-UAR3TMWI.mjs";
10
- import "../../chunk-QRJFDPO4.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-fIoCsrzJ.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-DoJj_pOC.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';
@@ -4122,19 +4122,6 @@ var BatchTrackOverageBehavior = {
4122
4122
  Overflow: "overflow"
4123
4123
  };
4124
4124
  var BatchTrackOverageBehavior$outboundSchema = z16.enum(BatchTrackOverageBehavior);
4125
- var BatchTrackLock$outboundSchema = z16.pipe(
4126
- z16.object({
4127
- lockId: z16.string(),
4128
- enabled: z16.literal(true),
4129
- expiresAt: z16.optional(z16.number())
4130
- }),
4131
- z16.transform((v) => {
4132
- return remap(v, {
4133
- lockId: "lock_id",
4134
- expiresAt: "expires_at"
4135
- });
4136
- })
4137
- );
4138
4125
  var RequestBody$outboundSchema = z16.pipe(
4139
4126
  z16.object({
4140
4127
  customerId: z16.string(),
@@ -4146,8 +4133,7 @@ var RequestBody$outboundSchema = z16.pipe(
4146
4133
  idempotencyKey: z16.optional(z16.string()),
4147
4134
  timestamp: z16.optional(z16.int()),
4148
4135
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4149
- async: z16.optional(z16.boolean()),
4150
- lock: z16.optional(z16.lazy(() => BatchTrackLock$outboundSchema))
4136
+ async: z16.optional(z16.boolean())
4151
4137
  }),
4152
4138
  z16.transform((v) => {
4153
4139
  return remap(v, {
@@ -6536,7 +6522,7 @@ var ProductScenario1 = {
6536
6522
  PastDue: "past_due"
6537
6523
  };
6538
6524
  var CheckOverageBehavior$outboundSchema = z19.enum(CheckOverageBehavior);
6539
- var CheckLock$outboundSchema = z19.pipe(
6525
+ var Lock$outboundSchema = z19.pipe(
6540
6526
  z19.object({
6541
6527
  lockId: z19.string(),
6542
6528
  enabled: z19.literal(true),
@@ -6559,7 +6545,7 @@ var CheckParams$outboundSchema = z19.pipe(
6559
6545
  requiredBalance: z19.optional(z19.number()),
6560
6546
  properties: z19.optional(z19.record(z19.string(), z19.any())),
6561
6547
  sendEvent: z19.optional(z19.boolean()),
6562
- lock: z19.optional(z19.lazy(() => CheckLock$outboundSchema)),
6548
+ lock: z19.optional(z19.lazy(() => Lock$outboundSchema)),
6563
6549
  withPreview: z19.optional(z19.boolean())
6564
6550
  }),
6565
6551
  z19.transform((v) => {
@@ -39021,10 +39007,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39021
39007
  description: z88.optional(z88.string()),
39022
39008
  disabled: z88.optional(z88.boolean())
39023
39009
  });
39024
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39025
- webhooks: z88.array(
39026
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39027
- )
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)
39028
39044
  });
39029
39045
  var ChangeWebhook2$inboundSchema = z88.pipe(
39030
39046
  z88.object({
@@ -39154,7 +39170,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39154
39170
  create: z88.lazy(() => Change1$inboundSchema),
39155
39171
  update: z88.lazy(() => Change2$inboundSchema),
39156
39172
  adopt: z88.lazy(() => Change3$inboundSchema),
39157
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39173
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39174
+ delete: z88.lazy(() => Change5$inboundSchema)
39158
39175
  });
39159
39176
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39160
39177
  id: string5(),
@@ -39165,7 +39182,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39165
39182
  create: z88.lazy(() => Change1$inboundSchema),
39166
39183
  update: z88.lazy(() => Change2$inboundSchema),
39167
39184
  adopt: z88.lazy(() => Change3$inboundSchema),
39168
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39185
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39186
+ delete: z88.lazy(() => Change5$inboundSchema)
39169
39187
  })),
39170
39188
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39171
39189
  });
@@ -44687,9 +44705,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44687
44705
  description: z102.optional(z102.string()),
44688
44706
  disabled: z102.optional(z102.boolean())
44689
44707
  });
44690
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44691
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44692
- });
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
+ );
44693
44719
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44694
44720
  z102.object({
44695
44721
  id: string5(),
@@ -44750,19 +44776,6 @@ var TrackIntervalEnum1 = {
44750
44776
  Year: "year"
44751
44777
  };
44752
44778
  var TrackOverageBehavior$outboundSchema = z103.enum(TrackOverageBehavior);
44753
- var TrackLock$outboundSchema = z103.pipe(
44754
- z103.object({
44755
- lockId: z103.string(),
44756
- enabled: z103.literal(true),
44757
- expiresAt: z103.optional(z103.number())
44758
- }),
44759
- z103.transform((v) => {
44760
- return remap(v, {
44761
- lockId: "lock_id",
44762
- expiresAt: "expires_at"
44763
- });
44764
- })
44765
- );
44766
44779
  var TrackParams$outboundSchema = z103.pipe(
44767
44780
  z103.object({
44768
44781
  customerId: z103.string(),
@@ -44773,8 +44786,7 @@ var TrackParams$outboundSchema = z103.pipe(
44773
44786
  properties: z103.optional(z103.record(z103.string(), z103.any())),
44774
44787
  timestamp: z103.optional(z103.int()),
44775
44788
  overageBehavior: z103.optional(TrackOverageBehavior$outboundSchema),
44776
- async: z103.optional(z103.boolean()),
44777
- lock: z103.optional(z103.lazy(() => TrackLock$outboundSchema))
44789
+ async: z103.optional(z103.boolean())
44778
44790
  }),
44779
44791
  z103.transform((v) => {
44780
44792
  return remap(v, {
@@ -62830,7 +62842,7 @@ var Webhooks = class extends ClientSDK {
62830
62842
  ));
62831
62843
  }
62832
62844
  /**
62833
- * 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.
62834
62846
  */
62835
62847
  async previewSync(request, options) {
62836
62848
  return unwrapAsync(webhooksPreviewSync(
@@ -62840,7 +62852,7 @@ var Webhooks = class extends ClientSDK {
62840
62852
  ));
62841
62853
  }
62842
62854
  /**
62843
- * 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.
62844
62856
  */
62845
62857
  async sync(request, options) {
62846
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-YFZ7FT2F.mjs";
5
+ } from "../chunk-ZO23CKLL.mjs";
6
6
  import {
7
7
  createCoreHandler
8
- } from "../chunk-N4L4DLFM.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-QRJFDPO4.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-fIoCsrzJ.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-DoJj_pOC.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-fIoCsrzJ.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-DoJj_pOC.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-fIoCsrzJ.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-DoJj_pOC.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-fIoCsrzJ.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-DoJj_pOC.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-fIoCsrzJ.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-DoJj_pOC.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-fIoCsrzJ.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-DoJj_pOC.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-fIoCsrzJ.mjs';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-fIoCsrzJ.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-DoJj_pOC.js';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-DoJj_pOC.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';
@@ -4122,19 +4122,6 @@ var BatchTrackOverageBehavior = {
4122
4122
  Overflow: "overflow"
4123
4123
  };
4124
4124
  var BatchTrackOverageBehavior$outboundSchema = z16.enum(BatchTrackOverageBehavior);
4125
- var BatchTrackLock$outboundSchema = z16.pipe(
4126
- z16.object({
4127
- lockId: z16.string(),
4128
- enabled: z16.literal(true),
4129
- expiresAt: z16.optional(z16.number())
4130
- }),
4131
- z16.transform((v) => {
4132
- return remap(v, {
4133
- lockId: "lock_id",
4134
- expiresAt: "expires_at"
4135
- });
4136
- })
4137
- );
4138
4125
  var RequestBody$outboundSchema = z16.pipe(
4139
4126
  z16.object({
4140
4127
  customerId: z16.string(),
@@ -4146,8 +4133,7 @@ var RequestBody$outboundSchema = z16.pipe(
4146
4133
  idempotencyKey: z16.optional(z16.string()),
4147
4134
  timestamp: z16.optional(z16.int()),
4148
4135
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4149
- async: z16.optional(z16.boolean()),
4150
- lock: z16.optional(z16.lazy(() => BatchTrackLock$outboundSchema))
4136
+ async: z16.optional(z16.boolean())
4151
4137
  }),
4152
4138
  z16.transform((v) => {
4153
4139
  return remap(v, {
@@ -6536,7 +6522,7 @@ var ProductScenario1 = {
6536
6522
  PastDue: "past_due"
6537
6523
  };
6538
6524
  var CheckOverageBehavior$outboundSchema = z19.enum(CheckOverageBehavior);
6539
- var CheckLock$outboundSchema = z19.pipe(
6525
+ var Lock$outboundSchema = z19.pipe(
6540
6526
  z19.object({
6541
6527
  lockId: z19.string(),
6542
6528
  enabled: z19.literal(true),
@@ -6559,7 +6545,7 @@ var CheckParams$outboundSchema = z19.pipe(
6559
6545
  requiredBalance: z19.optional(z19.number()),
6560
6546
  properties: z19.optional(z19.record(z19.string(), z19.any())),
6561
6547
  sendEvent: z19.optional(z19.boolean()),
6562
- lock: z19.optional(z19.lazy(() => CheckLock$outboundSchema)),
6548
+ lock: z19.optional(z19.lazy(() => Lock$outboundSchema)),
6563
6549
  withPreview: z19.optional(z19.boolean())
6564
6550
  }),
6565
6551
  z19.transform((v) => {
@@ -39021,10 +39007,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39021
39007
  description: z88.optional(z88.string()),
39022
39008
  disabled: z88.optional(z88.boolean())
39023
39009
  });
39024
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39025
- webhooks: z88.array(
39026
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39027
- )
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)
39028
39044
  });
39029
39045
  var ChangeWebhook2$inboundSchema = z88.pipe(
39030
39046
  z88.object({
@@ -39154,7 +39170,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39154
39170
  create: z88.lazy(() => Change1$inboundSchema),
39155
39171
  update: z88.lazy(() => Change2$inboundSchema),
39156
39172
  adopt: z88.lazy(() => Change3$inboundSchema),
39157
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39173
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39174
+ delete: z88.lazy(() => Change5$inboundSchema)
39158
39175
  });
39159
39176
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39160
39177
  id: string5(),
@@ -39165,7 +39182,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39165
39182
  create: z88.lazy(() => Change1$inboundSchema),
39166
39183
  update: z88.lazy(() => Change2$inboundSchema),
39167
39184
  adopt: z88.lazy(() => Change3$inboundSchema),
39168
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39185
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39186
+ delete: z88.lazy(() => Change5$inboundSchema)
39169
39187
  })),
39170
39188
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39171
39189
  });
@@ -44687,9 +44705,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44687
44705
  description: z102.optional(z102.string()),
44688
44706
  disabled: z102.optional(z102.boolean())
44689
44707
  });
44690
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44691
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44692
- });
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
+ );
44693
44719
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44694
44720
  z102.object({
44695
44721
  id: string5(),
@@ -44750,19 +44776,6 @@ var TrackIntervalEnum1 = {
44750
44776
  Year: "year"
44751
44777
  };
44752
44778
  var TrackOverageBehavior$outboundSchema = z103.enum(TrackOverageBehavior);
44753
- var TrackLock$outboundSchema = z103.pipe(
44754
- z103.object({
44755
- lockId: z103.string(),
44756
- enabled: z103.literal(true),
44757
- expiresAt: z103.optional(z103.number())
44758
- }),
44759
- z103.transform((v) => {
44760
- return remap(v, {
44761
- lockId: "lock_id",
44762
- expiresAt: "expires_at"
44763
- });
44764
- })
44765
- );
44766
44779
  var TrackParams$outboundSchema = z103.pipe(
44767
44780
  z103.object({
44768
44781
  customerId: z103.string(),
@@ -44773,8 +44786,7 @@ var TrackParams$outboundSchema = z103.pipe(
44773
44786
  properties: z103.optional(z103.record(z103.string(), z103.any())),
44774
44787
  timestamp: z103.optional(z103.int()),
44775
44788
  overageBehavior: z103.optional(TrackOverageBehavior$outboundSchema),
44776
- async: z103.optional(z103.boolean()),
44777
- lock: z103.optional(z103.lazy(() => TrackLock$outboundSchema))
44789
+ async: z103.optional(z103.boolean())
44778
44790
  }),
44779
44791
  z103.transform((v) => {
44780
44792
  return remap(v, {
@@ -62830,7 +62842,7 @@ var Webhooks = class extends ClientSDK {
62830
62842
  ));
62831
62843
  }
62832
62844
  /**
62833
- * 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.
62834
62846
  */
62835
62847
  async previewSync(request, options) {
62836
62848
  return unwrapAsync(webhooksPreviewSync(
@@ -62840,7 +62852,7 @@ var Webhooks = class extends ClientSDK {
62840
62852
  ));
62841
62853
  }
62842
62854
  /**
62843
- * 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.
62844
62856
  */
62845
62857
  async sync(request, options) {
62846
62858
  return unwrapAsync(webhooksSync(
@@ -1,27 +1,27 @@
1
1
  import "./chunk-WYDGEDEU.mjs";
2
2
  import "./chunk-VXND2UDT.mjs";
3
- import "./chunk-YFZ7FT2F.mjs";
3
+ import "./chunk-ZO23CKLL.mjs";
4
4
  import {
5
5
  createCoreHandler
6
- } from "./chunk-N4L4DLFM.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-QRJFDPO4.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,