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
@@ -4114,19 +4114,6 @@ var BatchTrackOverageBehavior = {
4114
4114
  Overflow: "overflow"
4115
4115
  };
4116
4116
  var BatchTrackOverageBehavior$outboundSchema = z16.enum(BatchTrackOverageBehavior);
4117
- var BatchTrackLock$outboundSchema = z16.pipe(
4118
- z16.object({
4119
- lockId: z16.string(),
4120
- enabled: z16.literal(true),
4121
- expiresAt: z16.optional(z16.number())
4122
- }),
4123
- z16.transform((v) => {
4124
- return remap(v, {
4125
- lockId: "lock_id",
4126
- expiresAt: "expires_at"
4127
- });
4128
- })
4129
- );
4130
4117
  var RequestBody$outboundSchema = z16.pipe(
4131
4118
  z16.object({
4132
4119
  customerId: z16.string(),
@@ -4138,8 +4125,7 @@ var RequestBody$outboundSchema = z16.pipe(
4138
4125
  idempotencyKey: z16.optional(z16.string()),
4139
4126
  timestamp: z16.optional(z16.int()),
4140
4127
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4141
- async: z16.optional(z16.boolean()),
4142
- lock: z16.optional(z16.lazy(() => BatchTrackLock$outboundSchema))
4128
+ async: z16.optional(z16.boolean())
4143
4129
  }),
4144
4130
  z16.transform((v) => {
4145
4131
  return remap(v, {
@@ -6528,7 +6514,7 @@ var ProductScenario1 = {
6528
6514
  PastDue: "past_due"
6529
6515
  };
6530
6516
  var CheckOverageBehavior$outboundSchema = z19.enum(CheckOverageBehavior);
6531
- var CheckLock$outboundSchema = z19.pipe(
6517
+ var Lock$outboundSchema = z19.pipe(
6532
6518
  z19.object({
6533
6519
  lockId: z19.string(),
6534
6520
  enabled: z19.literal(true),
@@ -6551,7 +6537,7 @@ var CheckParams$outboundSchema = z19.pipe(
6551
6537
  requiredBalance: z19.optional(z19.number()),
6552
6538
  properties: z19.optional(z19.record(z19.string(), z19.any())),
6553
6539
  sendEvent: z19.optional(z19.boolean()),
6554
- lock: z19.optional(z19.lazy(() => CheckLock$outboundSchema)),
6540
+ lock: z19.optional(z19.lazy(() => Lock$outboundSchema)),
6555
6541
  withPreview: z19.optional(z19.boolean())
6556
6542
  }),
6557
6543
  z19.transform((v) => {
@@ -39013,10 +38999,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39013
38999
  description: z88.optional(z88.string()),
39014
39000
  disabled: z88.optional(z88.boolean())
39015
39001
  });
39016
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39017
- webhooks: z88.array(
39018
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39019
- )
39002
+ var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.pipe(
39003
+ z88.object({
39004
+ webhooks: z88.array(
39005
+ z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39006
+ ),
39007
+ skipDeletions: z88._default(z88.boolean(), true)
39008
+ }),
39009
+ z88.transform((v) => {
39010
+ return remap(v, {
39011
+ skipDeletions: "skip_deletions"
39012
+ });
39013
+ })
39014
+ );
39015
+ var ChangeWebhook3$inboundSchema = z88.pipe(
39016
+ z88.object({
39017
+ id: string5(),
39018
+ url: string5(),
39019
+ description: nullable(string5()),
39020
+ events: z88.array(string5()),
39021
+ disabled: boolean2(),
39022
+ created_at: number2(),
39023
+ updated_at: number2()
39024
+ }),
39025
+ z88.transform((v) => {
39026
+ return remap(v, {
39027
+ "created_at": "createdAt",
39028
+ "updated_at": "updatedAt"
39029
+ });
39030
+ })
39031
+ );
39032
+ var Change5$inboundSchema = z88.object({
39033
+ action: literal3("delete"),
39034
+ id: string5(),
39035
+ webhook: z88.lazy(() => ChangeWebhook3$inboundSchema)
39020
39036
  });
39021
39037
  var ChangeWebhook2$inboundSchema = z88.pipe(
39022
39038
  z88.object({
@@ -39146,7 +39162,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39146
39162
  create: z88.lazy(() => Change1$inboundSchema),
39147
39163
  update: z88.lazy(() => Change2$inboundSchema),
39148
39164
  adopt: z88.lazy(() => Change3$inboundSchema),
39149
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39165
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39166
+ delete: z88.lazy(() => Change5$inboundSchema)
39150
39167
  });
39151
39168
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39152
39169
  id: string5(),
@@ -39157,7 +39174,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39157
39174
  create: z88.lazy(() => Change1$inboundSchema),
39158
39175
  update: z88.lazy(() => Change2$inboundSchema),
39159
39176
  adopt: z88.lazy(() => Change3$inboundSchema),
39160
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39177
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39178
+ delete: z88.lazy(() => Change5$inboundSchema)
39161
39179
  })),
39162
39180
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39163
39181
  });
@@ -44679,9 +44697,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44679
44697
  description: z102.optional(z102.string()),
44680
44698
  disabled: z102.optional(z102.boolean())
44681
44699
  });
44682
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44683
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44684
- });
44700
+ var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.pipe(
44701
+ z102.object({
44702
+ webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema)),
44703
+ skipDeletions: z102._default(z102.boolean(), true)
44704
+ }),
44705
+ z102.transform((v) => {
44706
+ return remap(v, {
44707
+ skipDeletions: "skip_deletions"
44708
+ });
44709
+ })
44710
+ );
44685
44711
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44686
44712
  z102.object({
44687
44713
  id: string5(),
@@ -44742,19 +44768,6 @@ var TrackIntervalEnum1 = {
44742
44768
  Year: "year"
44743
44769
  };
44744
44770
  var TrackOverageBehavior$outboundSchema = z103.enum(TrackOverageBehavior);
44745
- var TrackLock$outboundSchema = z103.pipe(
44746
- z103.object({
44747
- lockId: z103.string(),
44748
- enabled: z103.literal(true),
44749
- expiresAt: z103.optional(z103.number())
44750
- }),
44751
- z103.transform((v) => {
44752
- return remap(v, {
44753
- lockId: "lock_id",
44754
- expiresAt: "expires_at"
44755
- });
44756
- })
44757
- );
44758
44771
  var TrackParams$outboundSchema = z103.pipe(
44759
44772
  z103.object({
44760
44773
  customerId: z103.string(),
@@ -44765,8 +44778,7 @@ var TrackParams$outboundSchema = z103.pipe(
44765
44778
  properties: z103.optional(z103.record(z103.string(), z103.any())),
44766
44779
  timestamp: z103.optional(z103.int()),
44767
44780
  overageBehavior: z103.optional(TrackOverageBehavior$outboundSchema),
44768
- async: z103.optional(z103.boolean()),
44769
- lock: z103.optional(z103.lazy(() => TrackLock$outboundSchema))
44781
+ async: z103.optional(z103.boolean())
44770
44782
  }),
44771
44783
  z103.transform((v) => {
44772
44784
  return remap(v, {
@@ -62822,7 +62834,7 @@ var Webhooks = class extends ClientSDK {
62822
62834
  ));
62823
62835
  }
62824
62836
  /**
62825
- * 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.
62837
+ * 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.
62826
62838
  */
62827
62839
  async previewSync(request, options) {
62828
62840
  return unwrapAsync(webhooksPreviewSync(
@@ -62832,7 +62844,7 @@ var Webhooks = class extends ClientSDK {
62832
62844
  ));
62833
62845
  }
62834
62846
  /**
62835
- * 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.
62847
+ * 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.
62836
62848
  */
62837
62849
  async sync(request, options) {
62838
62850
  return unwrapAsync(webhooksSync(
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-SAUYRKWO.mjs";
3
+ } from "../chunk-GKWJ3V2B.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-YFZ7FT2F.mjs";
7
- import "../chunk-N4L4DLFM.mjs";
6
+ import "../chunk-ZO23CKLL.mjs";
7
+ import "../chunk-6V2J4NU5.mjs";
8
+ import "../chunk-HRNHS5CH.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-QRJFDPO4.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -4114,19 +4114,6 @@ var BatchTrackOverageBehavior = {
4114
4114
  Overflow: "overflow"
4115
4115
  };
4116
4116
  var BatchTrackOverageBehavior$outboundSchema = z16.enum(BatchTrackOverageBehavior);
4117
- var BatchTrackLock$outboundSchema = z16.pipe(
4118
- z16.object({
4119
- lockId: z16.string(),
4120
- enabled: z16.literal(true),
4121
- expiresAt: z16.optional(z16.number())
4122
- }),
4123
- z16.transform((v) => {
4124
- return remap(v, {
4125
- lockId: "lock_id",
4126
- expiresAt: "expires_at"
4127
- });
4128
- })
4129
- );
4130
4117
  var RequestBody$outboundSchema = z16.pipe(
4131
4118
  z16.object({
4132
4119
  customerId: z16.string(),
@@ -4138,8 +4125,7 @@ var RequestBody$outboundSchema = z16.pipe(
4138
4125
  idempotencyKey: z16.optional(z16.string()),
4139
4126
  timestamp: z16.optional(z16.int()),
4140
4127
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4141
- async: z16.optional(z16.boolean()),
4142
- lock: z16.optional(z16.lazy(() => BatchTrackLock$outboundSchema))
4128
+ async: z16.optional(z16.boolean())
4143
4129
  }),
4144
4130
  z16.transform((v) => {
4145
4131
  return remap(v, {
@@ -6528,7 +6514,7 @@ var ProductScenario1 = {
6528
6514
  PastDue: "past_due"
6529
6515
  };
6530
6516
  var CheckOverageBehavior$outboundSchema = z19.enum(CheckOverageBehavior);
6531
- var CheckLock$outboundSchema = z19.pipe(
6517
+ var Lock$outboundSchema = z19.pipe(
6532
6518
  z19.object({
6533
6519
  lockId: z19.string(),
6534
6520
  enabled: z19.literal(true),
@@ -6551,7 +6537,7 @@ var CheckParams$outboundSchema = z19.pipe(
6551
6537
  requiredBalance: z19.optional(z19.number()),
6552
6538
  properties: z19.optional(z19.record(z19.string(), z19.any())),
6553
6539
  sendEvent: z19.optional(z19.boolean()),
6554
- lock: z19.optional(z19.lazy(() => CheckLock$outboundSchema)),
6540
+ lock: z19.optional(z19.lazy(() => Lock$outboundSchema)),
6555
6541
  withPreview: z19.optional(z19.boolean())
6556
6542
  }),
6557
6543
  z19.transform((v) => {
@@ -39013,10 +38999,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39013
38999
  description: z88.optional(z88.string()),
39014
39000
  disabled: z88.optional(z88.boolean())
39015
39001
  });
39016
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39017
- webhooks: z88.array(
39018
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39019
- )
39002
+ var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.pipe(
39003
+ z88.object({
39004
+ webhooks: z88.array(
39005
+ z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39006
+ ),
39007
+ skipDeletions: z88._default(z88.boolean(), true)
39008
+ }),
39009
+ z88.transform((v) => {
39010
+ return remap(v, {
39011
+ skipDeletions: "skip_deletions"
39012
+ });
39013
+ })
39014
+ );
39015
+ var ChangeWebhook3$inboundSchema = z88.pipe(
39016
+ z88.object({
39017
+ id: string5(),
39018
+ url: string5(),
39019
+ description: nullable(string5()),
39020
+ events: z88.array(string5()),
39021
+ disabled: boolean2(),
39022
+ created_at: number2(),
39023
+ updated_at: number2()
39024
+ }),
39025
+ z88.transform((v) => {
39026
+ return remap(v, {
39027
+ "created_at": "createdAt",
39028
+ "updated_at": "updatedAt"
39029
+ });
39030
+ })
39031
+ );
39032
+ var Change5$inboundSchema = z88.object({
39033
+ action: literal3("delete"),
39034
+ id: string5(),
39035
+ webhook: z88.lazy(() => ChangeWebhook3$inboundSchema)
39020
39036
  });
39021
39037
  var ChangeWebhook2$inboundSchema = z88.pipe(
39022
39038
  z88.object({
@@ -39146,7 +39162,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39146
39162
  create: z88.lazy(() => Change1$inboundSchema),
39147
39163
  update: z88.lazy(() => Change2$inboundSchema),
39148
39164
  adopt: z88.lazy(() => Change3$inboundSchema),
39149
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39165
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39166
+ delete: z88.lazy(() => Change5$inboundSchema)
39150
39167
  });
39151
39168
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39152
39169
  id: string5(),
@@ -39157,7 +39174,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39157
39174
  create: z88.lazy(() => Change1$inboundSchema),
39158
39175
  update: z88.lazy(() => Change2$inboundSchema),
39159
39176
  adopt: z88.lazy(() => Change3$inboundSchema),
39160
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39177
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39178
+ delete: z88.lazy(() => Change5$inboundSchema)
39161
39179
  })),
39162
39180
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39163
39181
  });
@@ -44679,9 +44697,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44679
44697
  description: z102.optional(z102.string()),
44680
44698
  disabled: z102.optional(z102.boolean())
44681
44699
  });
44682
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44683
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44684
- });
44700
+ var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.pipe(
44701
+ z102.object({
44702
+ webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema)),
44703
+ skipDeletions: z102._default(z102.boolean(), true)
44704
+ }),
44705
+ z102.transform((v) => {
44706
+ return remap(v, {
44707
+ skipDeletions: "skip_deletions"
44708
+ });
44709
+ })
44710
+ );
44685
44711
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44686
44712
  z102.object({
44687
44713
  id: string5(),
@@ -44742,19 +44768,6 @@ var TrackIntervalEnum1 = {
44742
44768
  Year: "year"
44743
44769
  };
44744
44770
  var TrackOverageBehavior$outboundSchema = z103.enum(TrackOverageBehavior);
44745
- var TrackLock$outboundSchema = z103.pipe(
44746
- z103.object({
44747
- lockId: z103.string(),
44748
- enabled: z103.literal(true),
44749
- expiresAt: z103.optional(z103.number())
44750
- }),
44751
- z103.transform((v) => {
44752
- return remap(v, {
44753
- lockId: "lock_id",
44754
- expiresAt: "expires_at"
44755
- });
44756
- })
44757
- );
44758
44771
  var TrackParams$outboundSchema = z103.pipe(
44759
44772
  z103.object({
44760
44773
  customerId: z103.string(),
@@ -44765,8 +44778,7 @@ var TrackParams$outboundSchema = z103.pipe(
44765
44778
  properties: z103.optional(z103.record(z103.string(), z103.any())),
44766
44779
  timestamp: z103.optional(z103.int()),
44767
44780
  overageBehavior: z103.optional(TrackOverageBehavior$outboundSchema),
44768
- async: z103.optional(z103.boolean()),
44769
- lock: z103.optional(z103.lazy(() => TrackLock$outboundSchema))
44781
+ async: z103.optional(z103.boolean())
44770
44782
  }),
44771
44783
  z103.transform((v) => {
44772
44784
  return remap(v, {
@@ -62822,7 +62834,7 @@ var Webhooks = class extends ClientSDK {
62822
62834
  ));
62823
62835
  }
62824
62836
  /**
62825
- * 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.
62837
+ * 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.
62826
62838
  */
62827
62839
  async previewSync(request, options) {
62828
62840
  return unwrapAsync(webhooksPreviewSync(
@@ -62832,7 +62844,7 @@ var Webhooks = class extends ClientSDK {
62832
62844
  ));
62833
62845
  }
62834
62846
  /**
62835
- * 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.
62847
+ * 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.
62836
62848
  */
62837
62849
  async sync(request, options) {
62838
62850
  return unwrapAsync(webhooksSync(
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-OWSZPOV7.mjs";
3
+ } from "../chunk-GSZMTPZW.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-YFZ7FT2F.mjs";
7
- import "../chunk-N4L4DLFM.mjs";
6
+ import "../chunk-ZO23CKLL.mjs";
7
+ import "../chunk-6V2J4NU5.mjs";
8
+ import "../chunk-HRNHS5CH.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-QRJFDPO4.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -4114,19 +4114,6 @@ var BatchTrackOverageBehavior = {
4114
4114
  Overflow: "overflow"
4115
4115
  };
4116
4116
  var BatchTrackOverageBehavior$outboundSchema = z16.enum(BatchTrackOverageBehavior);
4117
- var BatchTrackLock$outboundSchema = z16.pipe(
4118
- z16.object({
4119
- lockId: z16.string(),
4120
- enabled: z16.literal(true),
4121
- expiresAt: z16.optional(z16.number())
4122
- }),
4123
- z16.transform((v) => {
4124
- return remap(v, {
4125
- lockId: "lock_id",
4126
- expiresAt: "expires_at"
4127
- });
4128
- })
4129
- );
4130
4117
  var RequestBody$outboundSchema = z16.pipe(
4131
4118
  z16.object({
4132
4119
  customerId: z16.string(),
@@ -4138,8 +4125,7 @@ var RequestBody$outboundSchema = z16.pipe(
4138
4125
  idempotencyKey: z16.optional(z16.string()),
4139
4126
  timestamp: z16.optional(z16.int()),
4140
4127
  overageBehavior: z16.optional(BatchTrackOverageBehavior$outboundSchema),
4141
- async: z16.optional(z16.boolean()),
4142
- lock: z16.optional(z16.lazy(() => BatchTrackLock$outboundSchema))
4128
+ async: z16.optional(z16.boolean())
4143
4129
  }),
4144
4130
  z16.transform((v) => {
4145
4131
  return remap(v, {
@@ -6528,7 +6514,7 @@ var ProductScenario1 = {
6528
6514
  PastDue: "past_due"
6529
6515
  };
6530
6516
  var CheckOverageBehavior$outboundSchema = z19.enum(CheckOverageBehavior);
6531
- var CheckLock$outboundSchema = z19.pipe(
6517
+ var Lock$outboundSchema = z19.pipe(
6532
6518
  z19.object({
6533
6519
  lockId: z19.string(),
6534
6520
  enabled: z19.literal(true),
@@ -6551,7 +6537,7 @@ var CheckParams$outboundSchema = z19.pipe(
6551
6537
  requiredBalance: z19.optional(z19.number()),
6552
6538
  properties: z19.optional(z19.record(z19.string(), z19.any())),
6553
6539
  sendEvent: z19.optional(z19.boolean()),
6554
- lock: z19.optional(z19.lazy(() => CheckLock$outboundSchema)),
6540
+ lock: z19.optional(z19.lazy(() => Lock$outboundSchema)),
6555
6541
  withPreview: z19.optional(z19.boolean())
6556
6542
  }),
6557
6543
  z19.transform((v) => {
@@ -39013,10 +38999,40 @@ var PreviewSyncWebhooksWebhookRequest$outboundSchema = z88.object({
39013
38999
  description: z88.optional(z88.string()),
39014
39000
  disabled: z88.optional(z88.boolean())
39015
39001
  });
39016
- var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.object({
39017
- webhooks: z88.array(
39018
- z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39019
- )
39002
+ var PreviewSyncWebhooksSyncWebhooksParams$outboundSchema = z88.pipe(
39003
+ z88.object({
39004
+ webhooks: z88.array(
39005
+ z88.lazy(() => PreviewSyncWebhooksWebhookRequest$outboundSchema)
39006
+ ),
39007
+ skipDeletions: z88._default(z88.boolean(), true)
39008
+ }),
39009
+ z88.transform((v) => {
39010
+ return remap(v, {
39011
+ skipDeletions: "skip_deletions"
39012
+ });
39013
+ })
39014
+ );
39015
+ var ChangeWebhook3$inboundSchema = z88.pipe(
39016
+ z88.object({
39017
+ id: string5(),
39018
+ url: string5(),
39019
+ description: nullable(string5()),
39020
+ events: z88.array(string5()),
39021
+ disabled: boolean2(),
39022
+ created_at: number2(),
39023
+ updated_at: number2()
39024
+ }),
39025
+ z88.transform((v) => {
39026
+ return remap(v, {
39027
+ "created_at": "createdAt",
39028
+ "updated_at": "updatedAt"
39029
+ });
39030
+ })
39031
+ );
39032
+ var Change5$inboundSchema = z88.object({
39033
+ action: literal3("delete"),
39034
+ id: string5(),
39035
+ webhook: z88.lazy(() => ChangeWebhook3$inboundSchema)
39020
39036
  });
39021
39037
  var ChangeWebhook2$inboundSchema = z88.pipe(
39022
39038
  z88.object({
@@ -39146,7 +39162,8 @@ var ChangeUnion$inboundSchema = discriminatedUnion("action", {
39146
39162
  create: z88.lazy(() => Change1$inboundSchema),
39147
39163
  update: z88.lazy(() => Change2$inboundSchema),
39148
39164
  adopt: z88.lazy(() => Change3$inboundSchema),
39149
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39165
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39166
+ delete: z88.lazy(() => Change5$inboundSchema)
39150
39167
  });
39151
39168
  var PreviewSyncWebhooksError$inboundSchema = z88.object({
39152
39169
  id: string5(),
@@ -39157,7 +39174,8 @@ var PreviewSyncWebhooksResponse$inboundSchema = z88.object({
39157
39174
  create: z88.lazy(() => Change1$inboundSchema),
39158
39175
  update: z88.lazy(() => Change2$inboundSchema),
39159
39176
  adopt: z88.lazy(() => Change3$inboundSchema),
39160
- unmanaged: z88.lazy(() => Change4$inboundSchema)
39177
+ unmanaged: z88.lazy(() => Change4$inboundSchema),
39178
+ delete: z88.lazy(() => Change5$inboundSchema)
39161
39179
  })),
39162
39180
  errors: z88.array(z88.lazy(() => PreviewSyncWebhooksError$inboundSchema))
39163
39181
  });
@@ -44679,9 +44697,17 @@ var SyncWebhooksWebhookRequest$outboundSchema = z102.object({
44679
44697
  description: z102.optional(z102.string()),
44680
44698
  disabled: z102.optional(z102.boolean())
44681
44699
  });
44682
- var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.object({
44683
- webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema))
44684
- });
44700
+ var SyncWebhooksSyncWebhooksParams$outboundSchema = z102.pipe(
44701
+ z102.object({
44702
+ webhooks: z102.array(z102.lazy(() => SyncWebhooksWebhookRequest$outboundSchema)),
44703
+ skipDeletions: z102._default(z102.boolean(), true)
44704
+ }),
44705
+ z102.transform((v) => {
44706
+ return remap(v, {
44707
+ skipDeletions: "skip_deletions"
44708
+ });
44709
+ })
44710
+ );
44685
44711
  var SyncWebhooksWebhookResponse$inboundSchema = z102.pipe(
44686
44712
  z102.object({
44687
44713
  id: string5(),
@@ -44742,19 +44768,6 @@ var TrackIntervalEnum1 = {
44742
44768
  Year: "year"
44743
44769
  };
44744
44770
  var TrackOverageBehavior$outboundSchema = z103.enum(TrackOverageBehavior);
44745
- var TrackLock$outboundSchema = z103.pipe(
44746
- z103.object({
44747
- lockId: z103.string(),
44748
- enabled: z103.literal(true),
44749
- expiresAt: z103.optional(z103.number())
44750
- }),
44751
- z103.transform((v) => {
44752
- return remap(v, {
44753
- lockId: "lock_id",
44754
- expiresAt: "expires_at"
44755
- });
44756
- })
44757
- );
44758
44771
  var TrackParams$outboundSchema = z103.pipe(
44759
44772
  z103.object({
44760
44773
  customerId: z103.string(),
@@ -44765,8 +44778,7 @@ var TrackParams$outboundSchema = z103.pipe(
44765
44778
  properties: z103.optional(z103.record(z103.string(), z103.any())),
44766
44779
  timestamp: z103.optional(z103.int()),
44767
44780
  overageBehavior: z103.optional(TrackOverageBehavior$outboundSchema),
44768
- async: z103.optional(z103.boolean()),
44769
- lock: z103.optional(z103.lazy(() => TrackLock$outboundSchema))
44781
+ async: z103.optional(z103.boolean())
44770
44782
  }),
44771
44783
  z103.transform((v) => {
44772
44784
  return remap(v, {
@@ -62822,7 +62834,7 @@ var Webhooks = class extends ClientSDK {
62822
62834
  ));
62823
62835
  }
62824
62836
  /**
62825
- * 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.
62837
+ * 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.
62826
62838
  */
62827
62839
  async previewSync(request, options) {
62828
62840
  return unwrapAsync(webhooksPreviewSync(
@@ -62832,7 +62844,7 @@ var Webhooks = class extends ClientSDK {
62832
62844
  ));
62833
62845
  }
62834
62846
  /**
62835
- * 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.
62847
+ * 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.
62836
62848
  */
62837
62849
  async sync(request, options) {
62838
62850
  return unwrapAsync(webhooksSync(
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-MRFQEKBR.mjs";
3
+ } from "../chunk-4ZTDDMTF.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-YFZ7FT2F.mjs";
7
- import "../chunk-N4L4DLFM.mjs";
6
+ import "../chunk-ZO23CKLL.mjs";
7
+ import "../chunk-6V2J4NU5.mjs";
8
+ import "../chunk-HRNHS5CH.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-QRJFDPO4.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler