better-auth-lead 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marc Stammerjohann, Gary Großgarten
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/client.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { r as LeadOptions, t as lead } from "./index-Bay6-1DS.mjs";
1
+ import { r as LeadOptions, t as lead } from "./index-BYw4ZSS5.mjs";
2
2
  import { StandardSchemaV1 } from "better-auth";
3
3
  //#region src/client.d.ts
4
- declare const leadClient: <TMetadata = undefined>() => {
4
+ export declare const leadClient: <TMetadata = undefined>() => {
5
5
  id: "lead";
6
6
  $InferServerPlugin: ReturnType<typeof lead<[TMetadata] extends [undefined] ? LeadOptions : LeadOptions & {
7
7
  metadata: {
@@ -10,5 +10,4 @@ declare const leadClient: <TMetadata = undefined>() => {
10
10
  }>>;
11
11
  };
12
12
  //#endregion
13
- export { leadClient };
14
13
  //# sourceMappingURL=client.d.mts.map
@@ -246,7 +246,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
246
246
  }>;
247
247
  unsubscribeSession: import("better-auth").StrictEndpoint<"/lead/unsubscribe-session", {
248
248
  method: "POST";
249
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
249
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
250
250
  session: {
251
251
  session: Record<string, any> & {
252
252
  id: string;
@@ -268,7 +268,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
268
268
  image?: string | null | undefined;
269
269
  };
270
270
  };
271
- }>)[];
271
+ }>>[];
272
272
  }, {
273
273
  status: boolean;
274
274
  }>;
@@ -285,7 +285,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
285
285
  body: import("zod").ZodObject<{
286
286
  metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
287
287
  }, import("zod/v4/core").$strip>;
288
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
288
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
289
289
  session: {
290
290
  session: Record<string, any> & {
291
291
  id: string;
@@ -307,7 +307,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
307
307
  image?: string | null | undefined;
308
308
  };
309
309
  };
310
- }>)[];
310
+ }>>[];
311
311
  metadata: {
312
312
  $Infer: {
313
313
  body: {
@@ -357,7 +357,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
357
357
  starts_with: "starts_with";
358
358
  }>>;
359
359
  }, import("zod/v4/core").$strip>;
360
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
360
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
361
361
  session: {
362
362
  session: Record<string, any> & {
363
363
  id: string;
@@ -379,7 +379,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
379
379
  image?: string | null | undefined;
380
380
  };
381
381
  };
382
- }>)[];
382
+ }>>[];
383
383
  }, {
384
384
  leads: Lead[];
385
385
  total: number;
@@ -391,7 +391,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
391
391
  query: import("zod").ZodObject<{
392
392
  id: import("zod").ZodString;
393
393
  }, import("zod/v4/core").$strip>;
394
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
394
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
395
395
  session: {
396
396
  session: Record<string, any> & {
397
397
  id: string;
@@ -413,14 +413,14 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
413
413
  image?: string | null | undefined;
414
414
  };
415
415
  };
416
- }>)[];
416
+ }>>[];
417
417
  }, Lead> | undefined;
418
418
  removeLead?: import("better-auth").StrictEndpoint<"/lead/remove-lead", {
419
419
  method: "POST";
420
420
  body: import("zod").ZodObject<{
421
421
  leadId: import("zod").ZodCoercedString<unknown>;
422
422
  }, import("zod/v4/core").$strip>;
423
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
423
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
424
424
  session: {
425
425
  session: Record<string, any> & {
426
426
  id: string;
@@ -442,7 +442,7 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
442
442
  image?: string | null | undefined;
443
443
  };
444
444
  };
445
- }>)[];
445
+ }>>[];
446
446
  }, {
447
447
  success: boolean;
448
448
  }> | undefined;
@@ -466,4 +466,4 @@ declare const lead: <O extends LeadOptions>(options?: O) => {
466
466
  };
467
467
  //#endregion
468
468
  export { LeadPayload as i, Lead as n, LeadOptions as r, lead as t };
469
- //# sourceMappingURL=index-Bay6-1DS.d.mts.map
469
+ //# sourceMappingURL=index-BYw4ZSS5.d.mts.map
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as LeadPayload, n as Lead, r as LeadOptions, t as lead } from "./index-Bay6-1DS.mjs";
1
+ import { i as LeadPayload, n as Lead, r as LeadOptions, t as lead } from "./index-BYw4ZSS5.mjs";
2
2
  export { type Lead, type LeadOptions, type LeadPayload, lead };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth-lead",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "Better Auth Lead plugin",
5
5
  "homepage": "https://github.com/marcjulian/better-auth-plugins#readme",
6
6
  "bugs": {
@@ -26,18 +26,18 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "jose": "^6.2.3",
29
- "zod": "^4.4.3"
29
+ "zod": "4.6.5"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^25.6.2",
33
- "better-auth": "1.6.23",
34
- "bumpp": "^11.1.0",
35
- "tsdown": "^0.22.14",
36
- "typescript": "^7.0.2",
37
- "vitest": "^4.1.11"
33
+ "better-auth": "1.7.5",
34
+ "bumpp": "11.1.0",
35
+ "tsdown": "0.23.0",
36
+ "typescript": "7.0.2",
37
+ "vitest": "4.1.11"
38
38
  },
39
39
  "peerDependencies": {
40
- "better-auth": "^1.6.0"
40
+ "better-auth": "^1.7.5"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsdown",