Skip to content

Commit

Permalink
fix codegen command and regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed May 13, 2024
1 parent 7134372 commit 5abcf1f
Show file tree
Hide file tree
Showing 266 changed files with 388 additions and 396 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ tasks:
generate:openapi:
deps: [generate:openapi:backend, generate:openapi:frontend]
generate:openapi:backend:
cmds: [go generate ./internal/openapi]
cmds: [go generate .]
generate:openapi:frontend:
dir: web
cmds: [yarn openapi]
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mazznoer/colorgrad v0.9.1 h1:MB80JYVndKWSMEM1beNqnuOowWGhoQc3DXWXkFp6JlM=
Expand Down Expand Up @@ -318,6 +320,8 @@ github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmt
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down Expand Up @@ -347,6 +351,10 @@ github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXY
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
26 changes: 10 additions & 16 deletions web/src/api/openapi/accounts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Generated by orval v6.24.0 🍺
* Generated by orval v6.28.2 🍺
* Do not edit manually.
* storyden
* Storyden social API for building community driven platforms.
Expand Down Expand Up @@ -42,10 +42,7 @@ export const adminAccountBanCreate = (accountHandle: string) => {
export const getAdminAccountBanCreateMutationFetcher = (
accountHandle: string,
) => {
return (
_: string,
{ arg }: { arg: Arguments },
): Promise<AccountGetOKResponse> => {
return (_: string, __: { arg: Arguments }): Promise<AccountGetOKResponse> => {
return adminAccountBanCreate(accountHandle);
};
};
Expand Down Expand Up @@ -103,10 +100,7 @@ export const adminAccountBanRemove = (accountHandle: string) => {
export const getAdminAccountBanRemoveMutationFetcher = (
accountHandle: string,
) => {
return (
_: string,
{ arg }: { arg: Arguments },
): Promise<AccountGetOKResponse> => {
return (_: string, __: { arg: Arguments }): Promise<AccountGetOKResponse> => {
return adminAccountBanRemove(accountHandle);
};
};
Expand Down Expand Up @@ -212,9 +206,9 @@ export const accountUpdate = (accountUpdateBody: AccountUpdateBody) => {
export const getAccountUpdateMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AccountUpdateBody },
): Promise<AccountUpdateOKResponse> => {
return accountUpdate(arg as AccountUpdateBody);
return accountUpdate(arg);
};
};
export const getAccountUpdateMutationKey = () => `/v1/accounts` as const;
Expand All @@ -237,7 +231,7 @@ export const useAccountUpdate = <
Awaited<ReturnType<typeof accountUpdate>>,
TError,
string,
Arguments,
AccountUpdateBody,
Awaited<ReturnType<typeof accountUpdate>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -319,7 +313,7 @@ export const getAccountAuthMethodDeleteMutationFetcher = (
) => {
return (
_: string,
{ arg }: { arg: Arguments },
__: { arg: Arguments },
): Promise<AccountAuthProviderListOKResponse> => {
return accountAuthMethodDelete(authMethodId);
};
Expand Down Expand Up @@ -376,8 +370,8 @@ export const accountSetAvatar = (
};

export const getAccountSetAvatarMutationFetcher = () => {
return (_: string, { arg }: { arg: Arguments }): Promise<void> => {
return accountSetAvatar(arg as AccountSetAvatarBody);
return (_: string, { arg }: { arg: AccountSetAvatarBody }): Promise<void> => {
return accountSetAvatar(arg);
};
};
export const getAccountSetAvatarMutationKey = () =>
Expand All @@ -401,7 +395,7 @@ export const useAccountSetAvatar = <
Awaited<ReturnType<typeof accountSetAvatar>>,
TError,
string,
Arguments,
AccountSetAvatarBody,
Awaited<ReturnType<typeof accountSetAvatar>>
> & { swrKey?: string };
}) => {
Expand Down
9 changes: 4 additions & 5 deletions web/src/api/openapi/admin.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* Generated by orval v6.24.0 🍺
* Generated by orval v6.28.2 🍺
* Do not edit manually.
* storyden
* Storyden social API for building community driven platforms.
* OpenAPI spec version: 1
*/
import type { Arguments } from "swr";
import useSWRMutation from "swr/mutation";
import type { SWRMutationConfiguration } from "swr/mutation";

Expand Down Expand Up @@ -36,9 +35,9 @@ export const adminSettingsUpdate = (
export const getAdminSettingsUpdateMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AdminSettingsUpdateBody },
): Promise<AdminSettingsUpdateOKResponse> => {
return adminSettingsUpdate(arg as AdminSettingsUpdateBody);
return adminSettingsUpdate(arg);
};
};
export const getAdminSettingsUpdateMutationKey = () => `/v1/admin` as const;
Expand All @@ -61,7 +60,7 @@ export const useAdminSettingsUpdate = <
Awaited<ReturnType<typeof adminSettingsUpdate>>,
TError,
string,
Arguments,
AdminSettingsUpdateBody,
Awaited<ReturnType<typeof adminSettingsUpdate>>
> & { swrKey?: string };
}) => {
Expand Down
10 changes: 5 additions & 5 deletions web/src/api/openapi/assets.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Generated by orval v6.24.0 🍺
* Generated by orval v6.28.2 🍺
* Do not edit manually.
* storyden
* Storyden social API for building community driven platforms.
* OpenAPI spec version: 1
*/
import useSwr from "swr";
import type { Arguments, Key, SWRConfiguration } from "swr";
import type { Key, SWRConfiguration } from "swr";
import useSWRMutation from "swr/mutation";
import type { SWRMutationConfiguration } from "swr/mutation";

Expand Down Expand Up @@ -36,9 +36,9 @@ export const assetUpload = (assetUploadBody: AssetUploadBody) => {
export const getAssetUploadMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AssetUploadBody },
): Promise<AssetUploadOKResponse> => {
return assetUpload(arg as AssetUploadBody);
return assetUpload(arg);
};
};
export const getAssetUploadMutationKey = () => `/v1/assets` as const;
Expand All @@ -57,7 +57,7 @@ export const useAssetUpload = <
Awaited<ReturnType<typeof assetUpload>>,
TError,
string,
Arguments,
AssetUploadBody,
Awaited<ReturnType<typeof assetUpload>>
> & { swrKey?: string };
}) => {
Expand Down
61 changes: 29 additions & 32 deletions web/src/api/openapi/auth.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Generated by orval v6.24.0 🍺
* Generated by orval v6.28.2 🍺
* Do not edit manually.
* storyden
* Storyden social API for building community driven platforms.
* OpenAPI spec version: 1
*/
import useSwr from "swr";
import type { Arguments, Key, SWRConfiguration } from "swr";
import type { Key, SWRConfiguration } from "swr";
import useSWRMutation from "swr/mutation";
import type { SWRMutationConfiguration } from "swr/mutation";

Expand Down Expand Up @@ -94,9 +94,9 @@ export const authPasswordSignup = (authPasswordBody: AuthPasswordBody) => {
export const getAuthPasswordSignupMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AuthPasswordBody },
): Promise<AuthSuccessOKResponse> => {
return authPasswordSignup(arg as AuthPasswordBody);
return authPasswordSignup(arg);
};
};
export const getAuthPasswordSignupMutationKey = () =>
Expand All @@ -116,7 +116,7 @@ export const useAuthPasswordSignup = <
Awaited<ReturnType<typeof authPasswordSignup>>,
TError,
string,
Arguments,
AuthPasswordBody,
Awaited<ReturnType<typeof authPasswordSignup>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -147,9 +147,9 @@ export const authPasswordSignin = (authPasswordBody: AuthPasswordBody) => {
export const getAuthPasswordSigninMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AuthPasswordBody },
): Promise<AuthSuccessOKResponse> => {
return authPasswordSignin(arg as AuthPasswordBody);
return authPasswordSignin(arg);
};
};
export const getAuthPasswordSigninMutationKey = () =>
Expand All @@ -173,7 +173,7 @@ export const useAuthPasswordSignin = <
Awaited<ReturnType<typeof authPasswordSignin>>,
TError,
string,
Arguments,
AuthPasswordBody,
Awaited<ReturnType<typeof authPasswordSignin>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -208,9 +208,9 @@ export const authPasswordCreate = (
export const getAuthPasswordCreateMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AuthPasswordCreateBody },
): Promise<AuthSuccessOKResponse> => {
return authPasswordCreate(arg as AuthPasswordCreateBody);
return authPasswordCreate(arg);
};
};
export const getAuthPasswordCreateMutationKey = () =>
Expand All @@ -234,7 +234,7 @@ export const useAuthPasswordCreate = <
Awaited<ReturnType<typeof authPasswordCreate>>,
TError,
string,
Arguments,
AuthPasswordCreateBody,
Awaited<ReturnType<typeof authPasswordCreate>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -269,9 +269,9 @@ export const authPasswordUpdate = (
export const getAuthPasswordUpdateMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: AuthPasswordUpdateBody },
): Promise<AuthSuccessOKResponse> => {
return authPasswordUpdate(arg as AuthPasswordUpdateBody);
return authPasswordUpdate(arg);
};
};
export const getAuthPasswordUpdateMutationKey = () =>
Expand All @@ -295,7 +295,7 @@ export const useAuthPasswordUpdate = <
Awaited<ReturnType<typeof authPasswordUpdate>>,
TError,
string,
Arguments,
AuthPasswordUpdateBody,
Awaited<ReturnType<typeof authPasswordUpdate>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -331,12 +331,9 @@ export const getOAuthProviderCallbackMutationFetcher = (
) => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: OAuthProviderCallbackBody },
): Promise<AuthSuccessOKResponse> => {
return oAuthProviderCallback(
oauthProvider,
arg as OAuthProviderCallbackBody,
);
return oAuthProviderCallback(oauthProvider, arg);
};
};
export const getOAuthProviderCallbackMutationKey = (oauthProvider: string) =>
Expand All @@ -362,7 +359,7 @@ export const useOAuthProviderCallback = <
Awaited<ReturnType<typeof oAuthProviderCallback>>,
TError,
string,
Arguments,
OAuthProviderCallbackBody,
Awaited<ReturnType<typeof oAuthProviderCallback>>
> & { swrKey?: string };
},
Expand Down Expand Up @@ -448,9 +445,9 @@ export const webAuthnMakeCredential = (
export const getWebAuthnMakeCredentialMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: WebAuthnMakeCredentialBody },
): Promise<AuthSuccessOKResponse> => {
return webAuthnMakeCredential(arg as WebAuthnMakeCredentialBody);
return webAuthnMakeCredential(arg);
};
};
export const getWebAuthnMakeCredentialMutationKey = () =>
Expand All @@ -470,7 +467,7 @@ export const useWebAuthnMakeCredential = <
Awaited<ReturnType<typeof webAuthnMakeCredential>>,
TError,
string,
Arguments,
WebAuthnMakeCredentialBody,
Awaited<ReturnType<typeof webAuthnMakeCredential>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -557,9 +554,9 @@ export const webAuthnMakeAssertion = (
export const getWebAuthnMakeAssertionMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: WebAuthnMakeAssertionBody },
): Promise<AuthSuccessOKResponse> => {
return webAuthnMakeAssertion(arg as WebAuthnMakeAssertionBody);
return webAuthnMakeAssertion(arg);
};
};
export const getWebAuthnMakeAssertionMutationKey = () =>
Expand All @@ -583,7 +580,7 @@ export const useWebAuthnMakeAssertion = <
Awaited<ReturnType<typeof webAuthnMakeAssertion>>,
TError,
string,
Arguments,
WebAuthnMakeAssertionBody,
Awaited<ReturnType<typeof webAuthnMakeAssertion>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -619,9 +616,9 @@ export const phoneRequestCode = (
export const getPhoneRequestCodeMutationFetcher = () => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: PhoneRequestCodeBody },
): Promise<AuthSuccessOKResponse> => {
return phoneRequestCode(arg as PhoneRequestCodeBody);
return phoneRequestCode(arg);
};
};
export const getPhoneRequestCodeMutationKey = () => `/v1/auth/phone` as const;
Expand All @@ -640,7 +637,7 @@ export const usePhoneRequestCode = <
Awaited<ReturnType<typeof phoneRequestCode>>,
TError,
string,
Arguments,
PhoneRequestCodeBody,
Awaited<ReturnType<typeof phoneRequestCode>>
> & { swrKey?: string };
}) => {
Expand Down Expand Up @@ -676,9 +673,9 @@ export const phoneSubmitCode = (
export const getPhoneSubmitCodeMutationFetcher = (accountHandle: string) => {
return (
_: string,
{ arg }: { arg: Arguments },
{ arg }: { arg: PhoneSubmitCodeBody },
): Promise<AuthSuccessOKResponse> => {
return phoneSubmitCode(accountHandle, arg as PhoneSubmitCodeBody);
return phoneSubmitCode(accountHandle, arg);
};
};
export const getPhoneSubmitCodeMutationKey = (accountHandle: string) =>
Expand All @@ -700,7 +697,7 @@ export const usePhoneSubmitCode = <
Awaited<ReturnType<typeof phoneSubmitCode>>,
TError,
string,
Arguments,
PhoneSubmitCodeBody,
Awaited<ReturnType<typeof phoneSubmitCode>>
> & { swrKey?: string };
},
Expand Down

0 comments on commit 5abcf1f

Please sign in to comment.