-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Expand file tree
/
Copy pathindex.ts
More file actions
89 lines (88 loc) · 2.52 KB
/
Copy pathindex.ts
File metadata and controls
89 lines (88 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { createDocument } from "zod-openapi";
import { webhookEventSchema } from "../webhook/schemas";
import { DiscountCodeSchema } from "../zod/schemas/discount";
import { DomainSchema } from "../zod/schemas/domains";
import { FolderSchema } from "../zod/schemas/folders";
import { LinkErrorSchema, LinkSchema } from "../zod/schemas/links";
import { LinkTagSchema } from "../zod/schemas/tags";
import { analyticsPath } from "./analytics";
import { bountiesPaths } from "./bounties";
import { clawbacksPaths } from "./clawbacks";
import { commissionsPaths } from "./commissions";
import { customersPaths } from "./customers";
import { discountCodesPaths } from "./discount-codes";
import { domainsPaths } from "./domains";
import { embedTokensPaths } from "./embed-tokens";
import { eventsPath } from "./events";
import { foldersPaths } from "./folders";
import { linksPaths } from "./links";
import { partnersPaths } from "./partners";
import { payoutsPaths } from "./payouts";
import { qrCodePaths } from "./qr";
import { openApiErrorResponsesComponents } from "./responses";
import { tagsPaths } from "./tags";
import { trackPaths } from "./track";
export const document = createDocument({
openapi: "3.0.3",
info: {
title: "Dub API",
description:
"Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs.",
version: "0.0.1",
contact: {
name: "Dub Support",
email: "support@dub.co",
url: "https://dub.co/support",
},
license: {
name: "AGPL-3.0 license",
url: "https://github.com/dubinc/dub/blob/main/LICENSE.md",
},
},
servers: [
{
url: "https://api.dub.co",
description: "Production API",
},
],
paths: {
...linksPaths,
...analyticsPath,
...eventsPath,
...tagsPaths,
...foldersPaths,
...domainsPaths,
...trackPaths,
...customersPaths,
...partnersPaths,
...discountCodesPaths,
...commissionsPaths,
...clawbacksPaths,
...payoutsPaths,
...embedTokensPaths,
...qrCodePaths,
...bountiesPaths,
},
components: {
schemas: {
LinkSchema,
LinkTagSchema,
FolderSchema,
DomainSchema,
DiscountCodeSchema,
webhookEventSchema,
LinkErrorSchema,
},
securitySchemes: {
token: {
type: "http",
description: "Default authentication mechanism",
scheme: "bearer",
"x-speakeasy-example": "DUB_API_KEY",
},
},
responses: {
...openApiErrorResponsesComponents,
},
},
});