Skip to content

Commit

Permalink
feat: update generated client
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Nov 5, 2024
1 parent fb291b2 commit 56a951c
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 126 deletions.
2 changes: 1 addition & 1 deletion packages/mittwald/spec/openapi.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions packages/mittwald/src/generated/v2/client-react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ const buildCronjobApi = (baseClient: MittwaldAPIV2Client) => ({
});

const buildCustomerApi = (baseClient: MittwaldAPIV2Client) => ({
/** List Invites belonging to a Customer. */
listInvitesForCustomer: new ApiCallAsyncResourceFactory(
descriptors.customerListInvitesForCustomer,
baseClient.customer.listInvitesForCustomer,
).getApiResource,
/** Get all customer profiles the authenticated user has access to. */
listCustomers: new ApiCallAsyncResourceFactory(
descriptors.customerListCustomers,
Expand Down Expand Up @@ -320,11 +325,6 @@ const buildCustomerApi = (baseClient: MittwaldAPIV2Client) => ({
descriptors.customerListCustomerMemberships,
baseClient.customer.listCustomerMemberships,
).getApiResource,
/** List Invites belonging to a Customer. */
listInvitesForCustomer: new ApiCallAsyncResourceFactory(
descriptors.customerListInvitesForCustomer,
baseClient.customer.listInvitesForCustomer,
).getApiResource,
/** List Memberships belonging to a Customer. */
listMembershipsForCustomer: new ApiCallAsyncResourceFactory(
descriptors.customerListMembershipsForCustomer,
Expand Down
8 changes: 4 additions & 4 deletions packages/mittwald/src/generated/v2/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ export class MittwaldAPIV2Client extends ApiClientBase {
acceptCustomerInvite: this.requestFunctionFactory(
descriptors.customerAcceptCustomerInvite,
),
/** List Invites belonging to a Customer. */
listInvitesForCustomer: this.requestFunctionFactory(
descriptors.customerListInvitesForCustomer,
),
/** Create a CustomerInvite. */
createCustomerInvite: this.requestFunctionFactory(
descriptors.customerCreateCustomerInvite,
Expand Down Expand Up @@ -501,10 +505,6 @@ export class MittwaldAPIV2Client extends ApiClientBase {
listCustomerMemberships: this.requestFunctionFactory(
descriptors.customerListCustomerMemberships,
),
/** List Invites belonging to a Customer. */
listInvitesForCustomer: this.requestFunctionFactory(
descriptors.customerListInvitesForCustomer,
),
/** List Memberships belonging to a Customer. */
listMembershipsForCustomer: this.requestFunctionFactory(
descriptors.customerListMembershipsForCustomer,
Expand Down
106 changes: 53 additions & 53 deletions packages/mittwald/src/generated/v2/descriptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2874,46 +2874,80 @@ export const customerAcceptCustomerInvite: OpenAPIOperation<
operationId: "customer-accept-customer-invite",
};

/** List Invites belonging to a Customer. */
export const customerListInvitesForCustomer: OpenAPIOperation<
RequestType<
Simplify<null>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Path>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Query>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Header>
>,
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.$200.Content.ApplicationJson>,
200,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.$404.Content.ApplicationJson>,
404,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.$429.Content.ApplicationJson>,
429,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.Default.Content.ApplicationJson>,
"default",
"application/json"
>
> = {
path: "/v2/customers/{customerId}/invites",
method: "GET",
operationId: "customer-list-invites-for-customer",
};

/** Create a CustomerInvite. */
export const customerCreateCustomerInvite: OpenAPIOperation<
RequestType<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Parameters.RequestBody>,
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Parameters.Path>,
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Parameters.Query>,
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Parameters.Header>
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Parameters.RequestBody>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Parameters.Path>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Parameters.Query>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Parameters.Header>
>,
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Responses.$201.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Responses.$201.Content.ApplicationJson>,
201,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Responses.$400.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Responses.$400.Content.ApplicationJson>,
400,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Responses.$403.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Responses.$403.Content.ApplicationJson>,
403,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Responses.$409.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Responses.$409.Content.ApplicationJson>,
409,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Responses.$429.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Responses.$429.Content.ApplicationJson>,
429,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdInvites.Post.Responses.Default.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Post.Responses.Default.Content.ApplicationJson>,
"default",
"application/json"
>
> = {
path: "/v2/customer/{customerId}/invites",
path: "/v2/customers/{customerId}/invites",
method: "POST",
operationId: "customer-create-customer-invite",
};
Expand Down Expand Up @@ -3515,28 +3549,28 @@ export const customerIsCustomerLegallyCompetent: OpenAPIOperation<
/** Leave a Customer. */
export const customerLeaveCustomer: OpenAPIOperation<
RequestType<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Parameters.RequestBody>,
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Parameters.Path>,
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Parameters.Query>,
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Parameters.Header>
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Parameters.RequestBody>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Parameters.Path>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Parameters.Query>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Parameters.Header>
>,
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Responses.$204.Content.Empty>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Responses.$204.Content.Empty>,
204,
"empty"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Responses.$429.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Responses.$429.Content.ApplicationJson>,
429,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomerCustomerIdActionsLeave.Post.Responses.Default.Content.ApplicationJson>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdActionsLeave.Post.Responses.Default.Content.ApplicationJson>,
"default",
"application/json"
>
> = {
path: "/v2/customer/{customerId}/actions/leave",
path: "/v2/customers/{customerId}/actions/leave",
method: "POST",
operationId: "customer-leave-customer",
};
Expand Down Expand Up @@ -3619,40 +3653,6 @@ export const customerListCustomerMemberships: OpenAPIOperation<
operationId: "customer-list-customer-memberships",
};

/** List Invites belonging to a Customer. */
export const customerListInvitesForCustomer: OpenAPIOperation<
RequestType<
Simplify<null>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Path>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Query>,
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Header>
>,
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.$200.Content.ApplicationJson>,
200,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.$404.Content.ApplicationJson>,
404,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.$429.Content.ApplicationJson>,
429,
"application/json"
>
| Response<
Simplify<MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Responses.Default.Content.ApplicationJson>,
"default",
"application/json"
>
> = {
path: "/v2/customers/{customerId}/invites",
method: "GET",
operationId: "customer-list-invites-for-customer",
};

/** List Memberships belonging to a Customer. */
export const customerListMembershipsForCustomer: OpenAPIOperation<
RequestType<
Expand Down
132 changes: 69 additions & 63 deletions packages/mittwald/src/generated/v2/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,17 @@ export declare module MittwaldAPIV2 {
>;
}

namespace CustomerListInvitesForCustomer {
type RequestData = InferredRequestData<
typeof descriptors.customerListInvitesForCustomer
>;
type ResponseData<TStatus extends HttpStatus = 200> =
InferredResponseData<
typeof descriptors.customerListInvitesForCustomer,
TStatus
>;
}

namespace CustomerCreateCustomerInvite {
type RequestData = InferredRequestData<
typeof descriptors.customerCreateCustomerInvite
Expand Down Expand Up @@ -1000,17 +1011,6 @@ export declare module MittwaldAPIV2 {
>;
}

namespace CustomerListInvitesForCustomer {
type RequestData = InferredRequestData<
typeof descriptors.customerListInvitesForCustomer
>;
type ResponseData<TStatus extends HttpStatus = 200> =
InferredResponseData<
typeof descriptors.customerListInvitesForCustomer,
TStatus
>;
}

namespace CustomerListMembershipsForCustomer {
type RequestData = InferredRequestData<
typeof descriptors.customerListMembershipsForCustomer
Expand Down Expand Up @@ -5814,6 +5814,8 @@ export declare module MittwaldAPIV2 {
| "disabled";

export interface ProjectProject {
backupStorageUsageInBytes: number;
backupStorageUsageInBytesSetAt: string;
clusterDomain?: string;
/**
* @deprecated
Expand Down Expand Up @@ -10866,7 +10868,57 @@ export declare module MittwaldAPIV2 {
}
}

namespace V2CustomerCustomerIdInvites {
namespace V2CustomerCustomerIdInvites {}

namespace V2CustomersCustomerIdInvites {
namespace Get {
namespace Parameters {
export type Path = {
customerId: string;
};

export type Header =
{} & MittwaldAPIV2.Components.SecuritySchemes.CommonsAccessToken;

export type Query = {
limit?: number;
skip?: number;
};
}
namespace Responses {
namespace $200 {
namespace Content {
export type ApplicationJson =
MittwaldAPIV2.Components.Schemas.MembershipCustomerInvite[];
}
}

namespace $404 {
namespace Content {
export interface ApplicationJson {
[k: string]: unknown;
}
}
}

namespace $429 {
namespace Content {
export interface ApplicationJson {
[k: string]: unknown;
}
}
}

namespace Default {
namespace Content {
export interface ApplicationJson {
[k: string]: unknown;
}
}
}
}
}

namespace Post {
namespace Parameters {
export type Path = {
Expand Down Expand Up @@ -11805,7 +11857,9 @@ export declare module MittwaldAPIV2 {
}
}

namespace V2CustomerCustomerIdActionsLeave {
namespace V2CustomerCustomerIdActionsLeave {}

namespace V2CustomersCustomerIdActionsLeave {
namespace Post {
namespace Parameters {
export type Path = {
Expand Down Expand Up @@ -11959,56 +12013,6 @@ export declare module MittwaldAPIV2 {
}
}

namespace V2CustomersCustomerIdInvites {
namespace Get {
namespace Parameters {
export type Path = {
customerId: string;
};

export type Header =
{} & MittwaldAPIV2.Components.SecuritySchemes.CommonsAccessToken;

export type Query = {
limit?: number;
skip?: number;
};
}
namespace Responses {
namespace $200 {
namespace Content {
export type ApplicationJson =
MittwaldAPIV2.Components.Schemas.MembershipCustomerInvite[];
}
}

namespace $404 {
namespace Content {
export interface ApplicationJson {
[k: string]: unknown;
}
}
}

namespace $429 {
namespace Content {
export interface ApplicationJson {
[k: string]: unknown;
}
}
}

namespace Default {
namespace Content {
export interface ApplicationJson {
[k: string]: unknown;
}
}
}
}
}
}

namespace V2CustomersCustomerIdMemberships {
namespace Get {
namespace Parameters {
Expand Down Expand Up @@ -21089,6 +21093,8 @@ export declare module MittwaldAPIV2 {
namespace $200 {
namespace Content {
export type ApplicationJson = {
backupStorageUsageInBytes: number;
backupStorageUsageInBytesSetAt: string;
createdAt: string;
customerId: string;
customerMeta: {
Expand Down

0 comments on commit 56a951c

Please sign in to comment.