dub 0.57.1 → 0.57.2

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 (42) hide show
  1. package/bin/mcp-server.js +30 -16
  2. package/bin/mcp-server.js.map +8 -8
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  6. package/dist/commonjs/mcp-server/server.js +1 -1
  7. package/dist/commonjs/models/components/folderschema.d.ts +27 -0
  8. package/dist/commonjs/models/components/folderschema.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/folderschema.js +22 -1
  10. package/dist/commonjs/models/components/folderschema.js.map +1 -1
  11. package/dist/commonjs/models/components/leadevent.d.ts +8 -8
  12. package/dist/commonjs/models/components/leadevent.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/leadevent.js +13 -13
  14. package/dist/commonjs/models/components/leadevent.js.map +1 -1
  15. package/dist/commonjs/models/components/workspaceschema.d.ts +5 -0
  16. package/dist/commonjs/models/components/workspaceschema.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/workspaceschema.js +2 -0
  18. package/dist/commonjs/models/components/workspaceschema.js.map +1 -1
  19. package/dist/esm/lib/config.d.ts +2 -2
  20. package/dist/esm/lib/config.js +2 -2
  21. package/dist/esm/mcp-server/mcp-server.js +1 -1
  22. package/dist/esm/mcp-server/server.js +1 -1
  23. package/dist/esm/models/components/folderschema.d.ts +27 -0
  24. package/dist/esm/models/components/folderschema.d.ts.map +1 -1
  25. package/dist/esm/models/components/folderschema.js +21 -0
  26. package/dist/esm/models/components/folderschema.js.map +1 -1
  27. package/dist/esm/models/components/leadevent.d.ts +8 -8
  28. package/dist/esm/models/components/leadevent.d.ts.map +1 -1
  29. package/dist/esm/models/components/leadevent.js +12 -12
  30. package/dist/esm/models/components/leadevent.js.map +1 -1
  31. package/dist/esm/models/components/workspaceschema.d.ts +5 -0
  32. package/dist/esm/models/components/workspaceschema.d.ts.map +1 -1
  33. package/dist/esm/models/components/workspaceschema.js +2 -0
  34. package/dist/esm/models/components/workspaceschema.js.map +1 -1
  35. package/jsr.json +1 -1
  36. package/package.json +1 -1
  37. package/src/lib/config.ts +2 -2
  38. package/src/mcp-server/mcp-server.ts +1 -1
  39. package/src/mcp-server/server.ts +1 -1
  40. package/src/models/components/folderschema.ts +30 -0
  41. package/src/models/components/leadevent.ts +16 -15
  42. package/src/models/components/workspaceschema.ts +7 -0
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.57.1",
22
+ currentVersion: "0.57.2",
23
23
  },
24
24
  });
25
25
 
@@ -58,7 +58,7 @@ export function createMCPServer(deps: {
58
58
  }) {
59
59
  const server = new McpServer({
60
60
  name: "Dub",
61
- version: "0.57.1",
61
+ version: "0.57.2",
62
62
  });
63
63
 
64
64
  const client = new DubCore({
@@ -8,6 +8,12 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
+ export const Type = {
12
+ Default: "default",
13
+ Mega: "mega",
14
+ } as const;
15
+ export type Type = ClosedEnum<typeof Type>;
16
+
11
17
  /**
12
18
  * The access level of the folder within the workspace.
13
19
  */
@@ -29,6 +35,7 @@ export type FolderSchema = {
29
35
  * The name of the folder.
30
36
  */
31
37
  name: string;
38
+ type: Type;
32
39
  /**
33
40
  * The access level of the folder within the workspace.
34
41
  */
@@ -47,6 +54,26 @@ export type FolderSchema = {
47
54
  updatedAt: string;
48
55
  };
49
56
 
57
+ /** @internal */
58
+ export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
59
+ Type,
60
+ );
61
+
62
+ /** @internal */
63
+ export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
64
+ Type$inboundSchema;
65
+
66
+ /**
67
+ * @internal
68
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
69
+ */
70
+ export namespace Type$ {
71
+ /** @deprecated use `Type$inboundSchema` instead. */
72
+ export const inboundSchema = Type$inboundSchema;
73
+ /** @deprecated use `Type$outboundSchema` instead. */
74
+ export const outboundSchema = Type$outboundSchema;
75
+ }
76
+
50
77
  /** @internal */
51
78
  export const AccessLevel$inboundSchema: z.ZodNativeEnum<typeof AccessLevel> = z
52
79
  .nativeEnum(AccessLevel);
@@ -74,6 +101,7 @@ export const FolderSchema$inboundSchema: z.ZodType<
74
101
  > = z.object({
75
102
  id: z.string(),
76
103
  name: z.string(),
104
+ type: Type$inboundSchema,
77
105
  accessLevel: z.nullable(AccessLevel$inboundSchema).default(null),
78
106
  linkCount: z.number().default(0),
79
107
  createdAt: z.string(),
@@ -84,6 +112,7 @@ export const FolderSchema$inboundSchema: z.ZodType<
84
112
  export type FolderSchema$Outbound = {
85
113
  id: string;
86
114
  name: string;
115
+ type: string;
87
116
  accessLevel: string | null;
88
117
  linkCount: number;
89
118
  createdAt: string;
@@ -98,6 +127,7 @@ export const FolderSchema$outboundSchema: z.ZodType<
98
127
  > = z.object({
99
128
  id: z.string(),
100
129
  name: z.string(),
130
+ type: Type$outboundSchema,
101
131
  accessLevel: z.nullable(AccessLevel$outboundSchema).default(null),
102
132
  linkCount: z.number().default(0),
103
133
  createdAt: z.string(),
@@ -475,11 +475,11 @@ export type Partner = {
475
475
  image?: string | null | undefined;
476
476
  };
477
477
 
478
- export const Type = {
478
+ export const LeadEventType = {
479
479
  Percentage: "percentage",
480
480
  Flat: "flat",
481
481
  } as const;
482
- export type Type = ClosedEnum<typeof Type>;
482
+ export type LeadEventType = ClosedEnum<typeof LeadEventType>;
483
483
 
484
484
  export const Interval = {
485
485
  Month: "month",
@@ -492,7 +492,7 @@ export type Discount = {
492
492
  couponId: string | null;
493
493
  couponTestId: string | null;
494
494
  amount: number;
495
- type: Type;
495
+ type: LeadEventType;
496
496
  duration: number | null;
497
497
  interval: Interval | null;
498
498
  };
@@ -2356,23 +2356,24 @@ export function partnerFromJSON(
2356
2356
  }
2357
2357
 
2358
2358
  /** @internal */
2359
- export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
2360
- Type,
2361
- );
2359
+ export const LeadEventType$inboundSchema: z.ZodNativeEnum<
2360
+ typeof LeadEventType
2361
+ > = z.nativeEnum(LeadEventType);
2362
2362
 
2363
2363
  /** @internal */
2364
- export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
2365
- Type$inboundSchema;
2364
+ export const LeadEventType$outboundSchema: z.ZodNativeEnum<
2365
+ typeof LeadEventType
2366
+ > = LeadEventType$inboundSchema;
2366
2367
 
2367
2368
  /**
2368
2369
  * @internal
2369
2370
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2370
2371
  */
2371
- export namespace Type$ {
2372
- /** @deprecated use `Type$inboundSchema` instead. */
2373
- export const inboundSchema = Type$inboundSchema;
2374
- /** @deprecated use `Type$outboundSchema` instead. */
2375
- export const outboundSchema = Type$outboundSchema;
2372
+ export namespace LeadEventType$ {
2373
+ /** @deprecated use `LeadEventType$inboundSchema` instead. */
2374
+ export const inboundSchema = LeadEventType$inboundSchema;
2375
+ /** @deprecated use `LeadEventType$outboundSchema` instead. */
2376
+ export const outboundSchema = LeadEventType$outboundSchema;
2376
2377
  }
2377
2378
 
2378
2379
  /** @internal */
@@ -2404,7 +2405,7 @@ export const Discount$inboundSchema: z.ZodType<
2404
2405
  couponId: z.nullable(z.string()),
2405
2406
  couponTestId: z.nullable(z.string()),
2406
2407
  amount: z.number(),
2407
- type: Type$inboundSchema,
2408
+ type: LeadEventType$inboundSchema,
2408
2409
  duration: z.nullable(z.number()),
2409
2410
  interval: z.nullable(Interval$inboundSchema),
2410
2411
  });
@@ -2430,7 +2431,7 @@ export const Discount$outboundSchema: z.ZodType<
2430
2431
  couponId: z.nullable(z.string()),
2431
2432
  couponTestId: z.nullable(z.string()),
2432
2433
  amount: z.number(),
2433
- type: Type$outboundSchema,
2434
+ type: LeadEventType$outboundSchema,
2434
2435
  duration: z.nullable(z.number()),
2435
2436
  interval: z.nullable(Interval$outboundSchema),
2436
2437
  });
@@ -100,6 +100,10 @@ export type WorkspaceSchema = {
100
100
  * The Stripe Connect ID of the workspace.
101
101
  */
102
102
  stripeConnectId: string | null;
103
+ /**
104
+ * The total number of links in the workspace.
105
+ */
106
+ totalLinks: number;
103
107
  /**
104
108
  * The usage of the workspace.
105
109
  */
@@ -346,6 +350,7 @@ export const WorkspaceSchema$inboundSchema: z.ZodType<
346
350
  billingCycleStart: z.number(),
347
351
  paymentFailedAt: z.nullable(z.string()),
348
352
  stripeConnectId: z.nullable(z.string()),
353
+ totalLinks: z.number(),
349
354
  usage: z.number(),
350
355
  usageLimit: z.number(),
351
356
  linksUsage: z.number(),
@@ -382,6 +387,7 @@ export type WorkspaceSchema$Outbound = {
382
387
  billingCycleStart: number;
383
388
  paymentFailedAt: string | null;
384
389
  stripeConnectId: string | null;
390
+ totalLinks: number;
385
391
  usage: number;
386
392
  usageLimit: number;
387
393
  linksUsage: number;
@@ -422,6 +428,7 @@ export const WorkspaceSchema$outboundSchema: z.ZodType<
422
428
  billingCycleStart: z.number(),
423
429
  paymentFailedAt: z.nullable(z.string()),
424
430
  stripeConnectId: z.nullable(z.string()),
431
+ totalLinks: z.number(),
425
432
  usage: z.number(),
426
433
  usageLimit: z.number(),
427
434
  linksUsage: z.number(),