/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
    "/api/entitlement/subscriptions": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Read subscriptions
         * @description Returns all subscriptions for the organization
         */
        get: operations["getSubscriptions"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement/subscriptions/{subscriptionId}/cancel": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Cancel an existing subscription . The subscription will remain active until the end of the billing period and then it will be canceled. */
        post: operations["cancelSubscription"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement/subscriptions/create": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Create a new subscription for an organization */
        post: operations["createSubscription"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement/subscriptions/{subscriptionId}/upgrade": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Upgrade or downgrade an existing subscription by changing one of the plans in the subscription */
        post: operations["upgradeSubscription"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement/subscriptions/{subscriptionId}/upgradePreview": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription */
        post: operations["previewSubscriptionUpgrade"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement/subscriptions/webhooks": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Handle webhook events from payment processors */
        post: operations["handleSubscriptionWebhook"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        /**
         * @description Supported payment processors
         * @enum {string}
         */
        PaymentProcessor: "stripe" | "paypal" | "braintree";
        CreateSubscriptionRequest: {
            /** @description Organization ID */
            orgId?: string;
            /** @description Price ID from the payment processor */
            planId?: string;
            /** @description Coupon ID to apply */
            couponId?: string;
            /** @description Number of users in the organization */
            userCount?: number;
            /**
             * Format: email
             * @description Email of the customer
             */
            email?: string;
            /**
             * @description Supported payment processors
             * @enum {string}
             */
            paymentProcessor?: "stripe" | "paypal" | "braintree";
        };
        UpgradeSubscriptionRequest: {
            /**
             * Format: uuid
             * @description Old Plan id that is being changed
             */
            oldPlanId?: string;
            /**
             * Format: uuid
             * @description New Plan id that is being changed to
             */
            newPlanId?: string;
        };
        CreateSubscriptionResponse: {
            subscriptionId?: string;
            clientSecret?: string;
        };
        UpdateUsersRequest: {
            /**
             * @description Supported payment processors
             * @enum {string}
             */
            paymentProcessor?: "stripe" | "paypal" | "braintree";
        };
        CancelSubscriptionRequest: {
            /** @description Subscription ID from the payment processor */
            subscriptionId?: string;
            /**
             * @description Supported payment processors
             * @enum {string}
             */
            paymentProcessor?: "stripe" | "paypal" | "braintree";
        };
        /** @description Payload for webhook events from payment processors */
        WebhookEvent: Record<string, never>;
        SubscriptionPage: {
            page: number;
            page_size: number;
            total_count: number;
            subscriptions: {
                /**
                 * Format: uuid
                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                 */
                id: string;
                /**
                 * Format: uuid
                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                 */
                org_id: string;
                /**
                 * Format: uuid
                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                 */
                plan_id: string;
                plan?: {
                    /**
                     * Format: uuid
                     * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                     */
                    id: string;
                    /**
                     * @description Name of the plan
                     * @enum {string}
                     */
                    name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
                    /** @enum {string} */
                    cadence: "monthly" | "yearly";
                    /** @enum {string} */
                    unit: "user" | "free";
                    /** @description Minimum number of units required for the plan */
                    minimum_units: number;
                    /** @description Price per unit of the plan */
                    price_per_unit: number;
                    /** @enum {string} */
                    currency: "usd";
                };
                quantity: number;
                /** Format: date-time */
                start_date?: string;
                /** Format: date-time */
                end_date?: string;
                /**
                 * @description Possible statuses of a Stripe subscription.
                 * @enum {string}
                 */
                status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
                /** Format: date-time */
                created_at?: string;
                /** Format: date-time */
                updated_at?: string;
                /** Format: date-time */
                deleted_at?: string;
                /** @description Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe */
                billing_id: string;
            }[];
        };
        Subscription: {
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            id: string;
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            org_id: string;
            /**
             * Format: uuid
             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
             */
            plan_id: string;
            plan?: {
                /**
                 * Format: uuid
                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                 */
                id: string;
                /**
                 * @description Name of the plan
                 * @enum {string}
                 */
                name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
                /** @enum {string} */
                cadence: "monthly" | "yearly";
                /** @enum {string} */
                unit: "user" | "free";
                /** @description Minimum number of units required for the plan */
                minimum_units: number;
                /** @description Price per unit of the plan */
                price_per_unit: number;
                /** @enum {string} */
                currency: "usd";
            };
            quantity: number;
            /** Format: date-time */
            start_date?: string;
            /** Format: date-time */
            end_date?: string;
            /**
             * @description Possible statuses of a Stripe subscription.
             * @enum {string}
             */
            status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
            /** Format: date-time */
            created_at?: string;
            /** Format: date-time */
            updated_at?: string;
            /** Format: date-time */
            deleted_at?: string;
            /** @description Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe */
            billing_id: string;
        };
        /**
         * @description Possible statuses of a Stripe subscription.
         * @enum {string}
         */
        SubscriptionStatus: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
    };
    responses: {
        /** @description Invalid request body or request param */
        400: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
        /** @description Expired JWT token used or insufficient privilege */
        401: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
        /** @description Result not found */
        404: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
        /** @description Internal server error */
        500: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "text/plain": string;
            };
        };
    };
    parameters: {
        /** @description Subscription ID */
        subscriptionId: string;
        /** @description Get responses by page */
        page: string;
        /** @description Get responses by pagesize */
        pagesize: string;
        /** @description Get responses by pagesize (pass all to get all responses) */
        pagesizeWithAll: string;
        /** @description Get ordered responses */
        order: string;
    };
    requestBodies: never;
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
    getSubscriptions: {
        parameters: {
            query?: {
                /** @description Get responses by page */
                page?: string;
                /** @description Get responses by pagesize */
                pagesize?: string;
                /** @description Get ordered responses */
                order?: string;
                /** @description Filter subscriptions by status */
                status?: string[];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Get subscription response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        page: number;
                        page_size: number;
                        total_count: number;
                        subscriptions: {
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            id: string;
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            org_id: string;
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            plan_id: string;
                            plan?: {
                                /**
                                 * Format: uuid
                                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                                 */
                                id: string;
                                /**
                                 * @description Name of the plan
                                 * @enum {string}
                                 */
                                name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
                                /** @enum {string} */
                                cadence: "monthly" | "yearly";
                                /** @enum {string} */
                                unit: "user" | "free";
                                /** @description Minimum number of units required for the plan */
                                minimum_units: number;
                                /** @description Price per unit of the plan */
                                price_per_unit: number;
                                /** @enum {string} */
                                currency: "usd";
                            };
                            quantity: number;
                            /** Format: date-time */
                            start_date?: string;
                            /** Format: date-time */
                            end_date?: string;
                            /**
                             * @description Possible statuses of a Stripe subscription.
                             * @enum {string}
                             */
                            status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
                            /** Format: date-time */
                            created_at?: string;
                            /** Format: date-time */
                            updated_at?: string;
                            /** Format: date-time */
                            deleted_at?: string;
                            /** @description Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe */
                            billing_id: string;
                        }[];
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    cancelSubscription: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Subscription ID */
                subscriptionId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        page: number;
                        page_size: number;
                        total_count: number;
                        subscriptions: {
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            id: string;
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            org_id: string;
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            plan_id: string;
                            plan?: {
                                /**
                                 * Format: uuid
                                 * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                                 */
                                id: string;
                                /**
                                 * @description Name of the plan
                                 * @enum {string}
                                 */
                                name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
                                /** @enum {string} */
                                cadence: "monthly" | "yearly";
                                /** @enum {string} */
                                unit: "user" | "free";
                                /** @description Minimum number of units required for the plan */
                                minimum_units: number;
                                /** @description Price per unit of the plan */
                                price_per_unit: number;
                                /** @enum {string} */
                                currency: "usd";
                            };
                            quantity: number;
                            /** Format: date-time */
                            start_date?: string;
                            /** Format: date-time */
                            end_date?: string;
                            /**
                             * @description Possible statuses of a Stripe subscription.
                             * @enum {string}
                             */
                            status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
                            /** Format: date-time */
                            created_at?: string;
                            /** Format: date-time */
                            updated_at?: string;
                            /** Format: date-time */
                            deleted_at?: string;
                            /** @description Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe */
                            billing_id: string;
                        }[];
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Result not found */
            404: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    createSubscription: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /** @description Organization ID */
                    orgId?: string;
                    /** @description Price ID from the payment processor */
                    planId?: string;
                    /** @description Coupon ID to apply */
                    couponId?: string;
                    /** @description Number of users in the organization */
                    userCount?: number;
                    /**
                     * Format: email
                     * @description Email of the customer
                     */
                    email?: string;
                    /**
                     * @description Supported payment processors
                     * @enum {string}
                     */
                    paymentProcessor?: "stripe" | "paypal" | "braintree";
                };
            };
        };
        responses: {
            /** @description A new subscription has been created */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        subscriptionId?: string;
                        clientSecret?: string;
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    upgradeSubscription: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Subscription ID */
                subscriptionId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /**
                     * Format: uuid
                     * @description Old Plan id that is being changed
                     */
                    oldPlanId?: string;
                    /**
                     * Format: uuid
                     * @description New Plan id that is being changed to
                     */
                    newPlanId?: string;
                };
            };
        };
        responses: {
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        /**
                         * Format: uuid
                         * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                         */
                        id: string;
                        /**
                         * Format: uuid
                         * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                         */
                        org_id: string;
                        /**
                         * Format: uuid
                         * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                         */
                        plan_id: string;
                        plan?: {
                            /**
                             * Format: uuid
                             * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
                             */
                            id: string;
                            /**
                             * @description Name of the plan
                             * @enum {string}
                             */
                            name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
                            /** @enum {string} */
                            cadence: "monthly" | "yearly";
                            /** @enum {string} */
                            unit: "user" | "free";
                            /** @description Minimum number of units required for the plan */
                            minimum_units: number;
                            /** @description Price per unit of the plan */
                            price_per_unit: number;
                            /** @enum {string} */
                            currency: "usd";
                        };
                        quantity: number;
                        /** Format: date-time */
                        start_date?: string;
                        /** Format: date-time */
                        end_date?: string;
                        /**
                         * @description Possible statuses of a Stripe subscription.
                         * @enum {string}
                         */
                        status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
                        /** Format: date-time */
                        created_at?: string;
                        /** Format: date-time */
                        updated_at?: string;
                        /** Format: date-time */
                        deleted_at?: string;
                        /** @description Billing ID of the subscription. This is the ID of the subscription in the billing system. eg Stripe */
                        billing_id: string;
                    };
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Result not found */
            404: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    previewSubscriptionUpgrade: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Subscription ID */
                subscriptionId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /**
                     * Format: uuid
                     * @description Old Plan id that is being changed
                     */
                    oldPlanId?: string;
                    /**
                     * Format: uuid
                     * @description New Plan id that is being changed to
                     */
                    newPlanId?: string;
                };
            };
        };
        responses: {
            /** @description Preview of the upgraded subscription invoice */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": Record<string, never>;
                };
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Result not found */
            404: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
    handleSubscriptionWebhook: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": Record<string, never>;
            };
        };
        responses: {
            /** @description Webhook processed */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @description Invalid request body or request param */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Expired JWT token used or insufficient privilege */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
            /** @description Internal server error */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "text/plain": string;
                };
            };
        };
    };
}
