create-disposabl-app 0.5.0 → 0.6.1
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/README.md +12 -0
- package/dist/disposabl.js +541 -0
- package/dist/index.js +91 -8
- package/dist/templates/default/.github/scripts/android-build.sh +18 -0
- package/dist/templates/default/.github/scripts/disposabl.mjs +95 -0
- package/dist/templates/default/.github/scripts/expo-channel.sh +10 -0
- package/dist/templates/default/.github/scripts/expo-env.sh +17 -0
- package/dist/templates/default/.github/scripts/expo-fingerprint.sh +28 -0
- package/dist/templates/default/.github/scripts/expo-update.sh +11 -0
- package/dist/templates/default/.github/scripts/package-release.sh +23 -0
- package/dist/templates/default/.github/scripts/platforms.sh +37 -0
- package/dist/templates/default/.github/scripts/release-publish.sh +28 -0
- package/dist/templates/default/.github/scripts/release-source.sh +14 -0
- package/dist/templates/default/.github/scripts/verify-artifacts.sh +13 -0
- package/dist/templates/default/.github/scripts/web-deploy.sh +10 -0
- package/dist/templates/default/.github/workflows/pipeline.yml +300 -0
- package/dist/templates/default/apps/mobile/AGENTS.md +2 -2
- package/dist/templates/default/apps/mobile/README.md +4 -3
- package/dist/templates/default/apps/mobile/app.json +3 -4
- package/dist/templates/default/apps/mobile/assets/images/android-icon-foreground.png +0 -0
- package/dist/templates/default/apps/mobile/assets/images/android-icon-monochrome.png +0 -0
- package/dist/templates/default/apps/mobile/assets/images/icon.png +0 -0
- package/dist/templates/default/apps/mobile/assets/images/splash-icon.png +0 -0
- package/dist/templates/default/apps/mobile/eas.json +5 -0
- package/dist/templates/default/apps/mobile/package.json +5 -4
- package/dist/templates/default/apps/web/package.json +1 -1
- package/dist/templates/default/apps/web/src/routeTree.gen.ts +0 -44
- package/dist/templates/default/apps/web/src/router/__root.tsx +1 -1
- package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.tsx +0 -1
- package/dist/templates/default/apps/web/src/router/index.tsx +11 -3
- package/dist/templates/default/bun.lock +19 -5
- package/dist/templates/default/bunfig.toml +0 -2
- package/dist/templates/default/package.json +3 -3
- package/dist/templates/default/packages/backend/AGENTS.md +15 -13
- package/dist/templates/default/packages/backend/README.md +6 -28
- package/dist/templates/default/packages/backend/convex/_generated/ai/ai-files.state.json +1 -1
- package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +32 -6
- package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +8 -0
- package/dist/templates/default/packages/backend/convex/apps/actions/create.ts +19 -0
- package/dist/templates/default/packages/backend/convex/apps/internal.ts +197 -0
- package/dist/templates/default/packages/backend/convex/auth.ts +1 -1
- package/dist/templates/default/packages/backend/convex/convex.config.ts +8 -0
- package/dist/templates/default/packages/backend/convex/github/actions/http.ts +40 -0
- package/dist/templates/default/packages/backend/convex/github/actions/internal.ts +189 -0
- package/dist/templates/default/packages/backend/convex/github/actions/oidc.ts +75 -0
- package/dist/templates/default/packages/backend/convex/github/actions/provision.ts +80 -0
- package/dist/templates/default/packages/backend/convex/github/actions/tokens.ts +66 -0
- package/dist/templates/default/packages/backend/convex/github/internal.ts +34 -0
- package/dist/templates/default/packages/backend/convex/http.ts +3 -0
- package/dist/templates/default/packages/backend/convex/previews/internal.ts +270 -0
- package/dist/templates/default/packages/backend/convex/previews/token/actions/create.ts +69 -0
- package/dist/templates/default/packages/backend/convex/previews/token/actions/management.ts +133 -0
- package/dist/templates/default/packages/backend/convex/previews/token/internal.ts +1 -0
- package/dist/templates/default/packages/backend/convex/releases/internal.ts +28 -0
- package/dist/templates/default/packages/backend/convex/schema.ts +34 -4
- package/dist/templates/default/packages/backend/convex/users/index.ts +21 -0
- package/dist/templates/default/packages/backend/convex/users/internal.ts +44 -0
- package/dist/templates/default/packages/backend/convex/validator.ts +87 -0
- package/dist/templates/default/packages/backend/generate.ts +6 -1
- package/dist/templates/default/packages/backend/generated/openapi.json +961 -43
- package/dist/templates/default/packages/backend/generated/pages.json +0 -8
- package/dist/templates/default/packages/backend/generated/platforms.ts +14 -2
- package/dist/templates/default/packages/backend/package.json +1 -1
- package/dist/templates/default/packages/cli/README.md +15 -9
- package/dist/templates/default/packages/cli/auth.ts +11 -3
- package/dist/templates/default/packages/cli/commands.ts +236 -0
- package/dist/templates/default/packages/cli/index.ts +2 -142
- package/dist/templates/default/packages/cli/preview.ts +157 -0
- package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +2 -1
- package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +35 -1
- package/dist/templates/default/packages/disposabl-kit/mobile/lib/logo.png +0 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/screens/account.tsx +1 -1
- package/dist/templates/default/packages/disposabl-kit/mobile/screens/home.tsx +20 -5
- package/dist/templates/default/packages/sdk/README.md +8 -4
- package/dist/templates/default/packages/sdk/src/config.ts +14 -7
- package/dist/templates/default/packages/sdk/src/generated/index.ts +48 -13
- package/dist/templates/default/packages/sdk/src/generated/sdk.gen.ts +139 -27
- package/dist/templates/default/packages/sdk/src/generated/types.gen.ts +440 -37
- package/package.json +6 -3
- package/dist/templates/default/.github/README.md +0 -99
- package/dist/templates/default/.github/actionlint.yaml +0 -6
- package/dist/templates/default/.github/workflows/pipeline.yml.example +0 -546
- package/dist/templates/default/apps/web/src/router/_authenticated/todos/$id.tsx +0 -27
- package/dist/templates/default/apps/web/src/router/_authenticated/todos/index.tsx +0 -33
- package/dist/templates/default/packages/backend/convex/todos/index.ts +0 -26
- package/dist/templates/default/packages/backend/convex/todos/internal.ts +0 -43
- package/dist/templates/default/packages/backend/convex/users.ts +0 -43
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { createFileRoute, Outlet } from "@tanstack/react-router";
|
|
3
3
|
import { ConvexAuthProvider } from "@convex-dev/auth/react";
|
|
4
|
-
import { ConvexProvider, ConvexReactClient } from "convex/react";
|
|
4
|
+
import { ConvexProvider, ConvexReactClient, useConvexAuth } from "convex/react";
|
|
5
5
|
import { authenticationEnabled } from "../../features";
|
|
6
6
|
import { api } from "../../../backend/convex/_generated/api";
|
|
7
7
|
|
|
@@ -19,6 +19,7 @@ function Providers() {
|
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<AuthProvider client={client} enabled={authenticationEnabled}>
|
|
22
|
+
<SiteHeader />
|
|
22
23
|
<Outlet />
|
|
23
24
|
</AuthProvider>
|
|
24
25
|
);
|
|
@@ -49,3 +50,36 @@ export function AuthProvider({
|
|
|
49
50
|
</ConvexAuthProvider>
|
|
50
51
|
);
|
|
51
52
|
}
|
|
53
|
+
|
|
54
|
+
function SiteHeader() {
|
|
55
|
+
return (
|
|
56
|
+
<header className="border-b border-neutral-200">
|
|
57
|
+
<nav
|
|
58
|
+
className="mx-auto flex max-w-5xl items-center justify-between px-6 py-4"
|
|
59
|
+
aria-label="Main navigation"
|
|
60
|
+
>
|
|
61
|
+
<a href="/" aria-label="Disposabl home">
|
|
62
|
+
<img
|
|
63
|
+
src="/disposabl-logo.svg"
|
|
64
|
+
alt="Disposabl"
|
|
65
|
+
className="h-9 w-auto"
|
|
66
|
+
/>
|
|
67
|
+
</a>
|
|
68
|
+
{authenticationEnabled && <AuthLinks />}
|
|
69
|
+
</nav>
|
|
70
|
+
</header>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function AuthLinks() {
|
|
75
|
+
const { isAuthenticated, isLoading } = useConvexAuth();
|
|
76
|
+
if (isLoading) return null;
|
|
77
|
+
return isAuthenticated ? (
|
|
78
|
+
<a href="/dashboard">Dashboard</a>
|
|
79
|
+
) : (
|
|
80
|
+
<div className="flex items-center gap-5">
|
|
81
|
+
<a href="/login">Login</a>
|
|
82
|
+
<a href="/signup">Sign up</a>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -7,7 +7,7 @@ import { AuthButton, AuthScreen, styles } from "../components/auth-ui";
|
|
|
7
7
|
import { api } from "../lib/convex";
|
|
8
8
|
|
|
9
9
|
export function AccountScreen() {
|
|
10
|
-
const user = useQuery(api.users.current);
|
|
10
|
+
const user = useQuery(api.users.index.current);
|
|
11
11
|
const { signOut } = useAuthActions();
|
|
12
12
|
const [pending, setPending] = useState(false);
|
|
13
13
|
const [error, setError] = useState<string | null>(null);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { useConvexAuth } from "convex/react";
|
|
2
2
|
import { router, Stack } from "expo-router";
|
|
3
|
-
import { Text } from "react-native";
|
|
3
|
+
import { Image, Text } from "react-native";
|
|
4
4
|
import { AuthButton, AuthScreen, styles } from "../components/auth-ui";
|
|
5
5
|
|
|
6
6
|
export function HomeScreen() {
|
|
7
7
|
return (
|
|
8
8
|
<AuthScreen>
|
|
9
|
-
<
|
|
10
|
-
<Text style={styles.body}>This home screen is public.</Text>
|
|
9
|
+
<HomeIntro />
|
|
11
10
|
<AccountLinks />
|
|
12
11
|
</AuthScreen>
|
|
13
12
|
);
|
|
@@ -43,8 +42,24 @@ export function PublicHomeScreen() {
|
|
|
43
42
|
return (
|
|
44
43
|
<AuthScreen>
|
|
45
44
|
<Stack.Screen options={{ title: "Disposabl" }} />
|
|
46
|
-
<
|
|
47
|
-
<Text style={styles.body}>This home screen is public.</Text>
|
|
45
|
+
<HomeIntro />
|
|
48
46
|
</AuthScreen>
|
|
49
47
|
);
|
|
50
48
|
}
|
|
49
|
+
|
|
50
|
+
function HomeIntro() {
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
<Image
|
|
54
|
+
source={require("../lib/logo.png")}
|
|
55
|
+
style={{ width: 96, height: 96 }}
|
|
56
|
+
accessibilityLabel="Disposabl logo"
|
|
57
|
+
/>
|
|
58
|
+
<Text style={styles.title}>Welcome to Disposabl</Text>
|
|
59
|
+
<Text style={styles.body}>
|
|
60
|
+
Your app starts here. Make this space your own and build something
|
|
61
|
+
useful.
|
|
62
|
+
</Text>
|
|
63
|
+
</>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
Generated with the pinned Hey API generator from `packages/backend/generated/openapi.json`.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
import { client,
|
|
6
|
+
import { client, appsCreate, appsList, appsGet } from "@disposabl/sdk";
|
|
7
7
|
|
|
8
8
|
client.setConfig({
|
|
9
9
|
baseUrl: "https://your-deployment.convex.site",
|
|
10
10
|
auth: process.env.DISPOSABL_API_KEY,
|
|
11
11
|
throwOnError: true,
|
|
12
12
|
});
|
|
13
|
-
const { data:
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const { data: created } = await appsCreate({
|
|
14
|
+
body: { name: "My app", platforms: ["web", "api"] },
|
|
15
|
+
});
|
|
16
|
+
const { data: page } = await appsList({
|
|
17
|
+
query: { paginationOpts: { numItems: 20, cursor: null } },
|
|
18
|
+
});
|
|
19
|
+
const { data: app } = await appsGet({ query: { appId: created!.appId } });
|
|
16
20
|
```
|
|
17
21
|
|
|
18
22
|
Create API keys at `/dashboard/api-keys`. Keep server integration keys on the server. The API also accepts OAuth tokens issued through its MCP authorization server.
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { CreateClientConfig } from "./generated/client.gen.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const serializeQuery = (query: Record<string, unknown>) =>
|
|
4
|
+
new URLSearchParams(
|
|
5
|
+
Object.entries(query)
|
|
6
|
+
.filter(([, value]) => value !== undefined)
|
|
7
|
+
.map(([name, value]) => [name, JSON.stringify(value)]),
|
|
8
|
+
).toString();
|
|
9
|
+
|
|
3
10
|
export const createClientConfig: CreateClientConfig = (config) => ({
|
|
4
11
|
...config,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
// Generated object parameters otherwise override the client's JSON serializer.
|
|
13
|
+
requestValidator: async (options) => {
|
|
14
|
+
(options as { querySerializer: typeof serializeQuery }).querySerializer =
|
|
15
|
+
serializeQuery;
|
|
16
|
+
return options;
|
|
17
|
+
},
|
|
11
18
|
});
|
|
@@ -1,18 +1,53 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
appsCreate,
|
|
5
|
+
appsDelete,
|
|
6
|
+
appsGet,
|
|
7
|
+
appsList,
|
|
8
|
+
type Options,
|
|
9
|
+
previewsGet,
|
|
10
|
+
previewsList,
|
|
11
|
+
previewsTokenCreate,
|
|
12
|
+
releasesGet,
|
|
13
|
+
usersCurrent,
|
|
14
|
+
} from "./sdk.gen.js";
|
|
4
15
|
export type {
|
|
16
|
+
AppsCreateData,
|
|
17
|
+
AppsCreateErrors,
|
|
18
|
+
AppsCreateResponse,
|
|
19
|
+
AppsCreateResponses,
|
|
20
|
+
AppsDeleteData,
|
|
21
|
+
AppsDeleteErrors,
|
|
22
|
+
AppsDeleteResponse,
|
|
23
|
+
AppsDeleteResponses,
|
|
24
|
+
AppsGetData,
|
|
25
|
+
AppsGetErrors,
|
|
26
|
+
AppsGetResponse,
|
|
27
|
+
AppsGetResponses,
|
|
28
|
+
AppsListData,
|
|
29
|
+
AppsListErrors,
|
|
30
|
+
AppsListResponse,
|
|
31
|
+
AppsListResponses,
|
|
5
32
|
ClientOptions,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
PreviewsGetData,
|
|
34
|
+
PreviewsGetErrors,
|
|
35
|
+
PreviewsGetResponse,
|
|
36
|
+
PreviewsGetResponses,
|
|
37
|
+
PreviewsListData,
|
|
38
|
+
PreviewsListErrors,
|
|
39
|
+
PreviewsListResponse,
|
|
40
|
+
PreviewsListResponses,
|
|
41
|
+
PreviewsTokenCreateData,
|
|
42
|
+
PreviewsTokenCreateErrors,
|
|
43
|
+
PreviewsTokenCreateResponse,
|
|
44
|
+
PreviewsTokenCreateResponses,
|
|
45
|
+
ReleasesGetData,
|
|
46
|
+
ReleasesGetErrors,
|
|
47
|
+
ReleasesGetResponse,
|
|
48
|
+
ReleasesGetResponses,
|
|
49
|
+
UsersCurrentData,
|
|
50
|
+
UsersCurrentErrors,
|
|
51
|
+
UsersCurrentResponse,
|
|
52
|
+
UsersCurrentResponses,
|
|
18
53
|
} from "./types.gen.js";
|
|
@@ -9,15 +9,33 @@ import type {
|
|
|
9
9
|
TDataShape,
|
|
10
10
|
} from "./client/index.js";
|
|
11
11
|
import type {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
AppsCreateData,
|
|
13
|
+
AppsCreateErrors,
|
|
14
|
+
AppsCreateResponses,
|
|
15
|
+
AppsDeleteData,
|
|
16
|
+
AppsDeleteErrors,
|
|
17
|
+
AppsDeleteResponses,
|
|
18
|
+
AppsGetData,
|
|
19
|
+
AppsGetErrors,
|
|
20
|
+
AppsGetResponses,
|
|
21
|
+
AppsListData,
|
|
22
|
+
AppsListErrors,
|
|
23
|
+
AppsListResponses,
|
|
24
|
+
PreviewsGetData,
|
|
25
|
+
PreviewsGetErrors,
|
|
26
|
+
PreviewsGetResponses,
|
|
27
|
+
PreviewsListData,
|
|
28
|
+
PreviewsListErrors,
|
|
29
|
+
PreviewsListResponses,
|
|
30
|
+
PreviewsTokenCreateData,
|
|
31
|
+
PreviewsTokenCreateErrors,
|
|
32
|
+
PreviewsTokenCreateResponses,
|
|
33
|
+
ReleasesGetData,
|
|
34
|
+
ReleasesGetErrors,
|
|
35
|
+
ReleasesGetResponses,
|
|
36
|
+
UsersCurrentData,
|
|
37
|
+
UsersCurrentErrors,
|
|
38
|
+
UsersCurrentResponses,
|
|
21
39
|
} from "./types.gen.js";
|
|
22
40
|
|
|
23
41
|
export type Options<
|
|
@@ -38,16 +56,16 @@ export type Options<
|
|
|
38
56
|
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
39
57
|
};
|
|
40
58
|
|
|
41
|
-
export const
|
|
42
|
-
options: Options<
|
|
43
|
-
): RequestResult<
|
|
59
|
+
export const appsCreate = <ThrowOnError extends boolean = false>(
|
|
60
|
+
options: Options<AppsCreateData, ThrowOnError>,
|
|
61
|
+
): RequestResult<AppsCreateResponses, AppsCreateErrors, ThrowOnError> =>
|
|
44
62
|
(options.client ?? client).post<
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
AppsCreateResponses,
|
|
64
|
+
AppsCreateErrors,
|
|
47
65
|
ThrowOnError
|
|
48
66
|
>({
|
|
49
67
|
security: [{ scheme: "bearer", type: "http" }],
|
|
50
|
-
url: "/api/
|
|
68
|
+
url: "/api/apps/create",
|
|
51
69
|
...options,
|
|
52
70
|
headers: {
|
|
53
71
|
"Content-Type": "application/json",
|
|
@@ -55,28 +73,122 @@ export const todosCreate = <ThrowOnError extends boolean = false>(
|
|
|
55
73
|
},
|
|
56
74
|
});
|
|
57
75
|
|
|
58
|
-
export const
|
|
59
|
-
options: Options<
|
|
60
|
-
): RequestResult<
|
|
76
|
+
export const appsDelete = <ThrowOnError extends boolean = false>(
|
|
77
|
+
options: Options<AppsDeleteData, ThrowOnError>,
|
|
78
|
+
): RequestResult<AppsDeleteResponses, AppsDeleteErrors, ThrowOnError> =>
|
|
79
|
+
(options.client ?? client).post<
|
|
80
|
+
AppsDeleteResponses,
|
|
81
|
+
AppsDeleteErrors,
|
|
82
|
+
ThrowOnError
|
|
83
|
+
>({
|
|
84
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
85
|
+
url: "/api/apps/delete",
|
|
86
|
+
...options,
|
|
87
|
+
headers: {
|
|
88
|
+
"Content-Type": "application/json",
|
|
89
|
+
...options.headers,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const appsGet = <ThrowOnError extends boolean = false>(
|
|
94
|
+
options: Options<AppsGetData, ThrowOnError>,
|
|
95
|
+
): RequestResult<AppsGetResponses, AppsGetErrors, ThrowOnError> =>
|
|
96
|
+
(options.client ?? client).get<AppsGetResponses, AppsGetErrors, ThrowOnError>(
|
|
97
|
+
{
|
|
98
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
99
|
+
url: "/api/apps/get",
|
|
100
|
+
...options,
|
|
101
|
+
},
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
export const appsList = <ThrowOnError extends boolean = false>(
|
|
105
|
+
options: Options<AppsListData, ThrowOnError>,
|
|
106
|
+
): RequestResult<AppsListResponses, AppsListErrors, ThrowOnError> =>
|
|
107
|
+
(options.client ?? client).get<
|
|
108
|
+
AppsListResponses,
|
|
109
|
+
AppsListErrors,
|
|
110
|
+
ThrowOnError
|
|
111
|
+
>({
|
|
112
|
+
querySerializer: {
|
|
113
|
+
parameters: { paginationOpts: { object: { style: "form" } } },
|
|
114
|
+
},
|
|
115
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
116
|
+
url: "/api/apps/list",
|
|
117
|
+
...options,
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export const previewsGet = <ThrowOnError extends boolean = false>(
|
|
121
|
+
options: Options<PreviewsGetData, ThrowOnError>,
|
|
122
|
+
): RequestResult<PreviewsGetResponses, PreviewsGetErrors, ThrowOnError> =>
|
|
123
|
+
(options.client ?? client).get<
|
|
124
|
+
PreviewsGetResponses,
|
|
125
|
+
PreviewsGetErrors,
|
|
126
|
+
ThrowOnError
|
|
127
|
+
>({
|
|
128
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
129
|
+
url: "/api/previews/get",
|
|
130
|
+
...options,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export const previewsList = <ThrowOnError extends boolean = false>(
|
|
134
|
+
options: Options<PreviewsListData, ThrowOnError>,
|
|
135
|
+
): RequestResult<PreviewsListResponses, PreviewsListErrors, ThrowOnError> =>
|
|
136
|
+
(options.client ?? client).get<
|
|
137
|
+
PreviewsListResponses,
|
|
138
|
+
PreviewsListErrors,
|
|
139
|
+
ThrowOnError
|
|
140
|
+
>({
|
|
141
|
+
querySerializer: {
|
|
142
|
+
parameters: { paginationOpts: { object: { style: "form" } } },
|
|
143
|
+
},
|
|
144
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
145
|
+
url: "/api/previews/list",
|
|
146
|
+
...options,
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
export const previewsTokenCreate = <ThrowOnError extends boolean = false>(
|
|
150
|
+
options: Options<PreviewsTokenCreateData, ThrowOnError>,
|
|
151
|
+
): RequestResult<
|
|
152
|
+
PreviewsTokenCreateResponses,
|
|
153
|
+
PreviewsTokenCreateErrors,
|
|
154
|
+
ThrowOnError
|
|
155
|
+
> =>
|
|
156
|
+
(options.client ?? client).post<
|
|
157
|
+
PreviewsTokenCreateResponses,
|
|
158
|
+
PreviewsTokenCreateErrors,
|
|
159
|
+
ThrowOnError
|
|
160
|
+
>({
|
|
161
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
162
|
+
url: "/api/previews/token/create",
|
|
163
|
+
...options,
|
|
164
|
+
headers: {
|
|
165
|
+
"Content-Type": "application/json",
|
|
166
|
+
...options.headers,
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export const releasesGet = <ThrowOnError extends boolean = false>(
|
|
171
|
+
options: Options<ReleasesGetData, ThrowOnError>,
|
|
172
|
+
): RequestResult<ReleasesGetResponses, ReleasesGetErrors, ThrowOnError> =>
|
|
61
173
|
(options.client ?? client).get<
|
|
62
|
-
|
|
63
|
-
|
|
174
|
+
ReleasesGetResponses,
|
|
175
|
+
ReleasesGetErrors,
|
|
64
176
|
ThrowOnError
|
|
65
177
|
>({
|
|
66
178
|
security: [{ scheme: "bearer", type: "http" }],
|
|
67
|
-
url: "/api/
|
|
179
|
+
url: "/api/releases/get",
|
|
68
180
|
...options,
|
|
69
181
|
});
|
|
70
182
|
|
|
71
|
-
export const
|
|
72
|
-
options?: Options<
|
|
73
|
-
): RequestResult<
|
|
183
|
+
export const usersCurrent = <ThrowOnError extends boolean = false>(
|
|
184
|
+
options?: Options<UsersCurrentData, ThrowOnError>,
|
|
185
|
+
): RequestResult<UsersCurrentResponses, UsersCurrentErrors, ThrowOnError> =>
|
|
74
186
|
(options?.client ?? client).get<
|
|
75
|
-
|
|
76
|
-
|
|
187
|
+
UsersCurrentResponses,
|
|
188
|
+
UsersCurrentErrors,
|
|
77
189
|
ThrowOnError
|
|
78
190
|
>({
|
|
79
191
|
security: [{ scheme: "bearer", type: "http" }],
|
|
80
|
-
url: "/api/
|
|
192
|
+
url: "/api/users/current",
|
|
81
193
|
...options,
|
|
82
194
|
});
|