diff --git a/deno.json b/deno.json index 5b320c2..b08b783 100644 --- a/deno.json +++ b/deno.json @@ -4,5 +4,11 @@ }, "imports": { "@std/assert": "jsr:@std/assert@1" + }, + "lint": { + "exclude": ["src/schema.ts"] + }, + "fmt": { + "exclude": ["src/schema.ts"] } } diff --git a/src/schema.ts b/src/schema.ts index 3d58eee..1657322 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -4,3337 +4,3301 @@ */ export interface paths { - "/v0/quote": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + "/v0/quote": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Quote"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/grids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Grids"]; + put?: never; + post: operations["postV0Grids"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/grids/{id}/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0GridsById"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/grids/{id}/grids/{id}/disable": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch: operations["patchV0GridsByIdGridsByIdDisable"]; + trace?: never; + }; + "/v0/grids/{id}/grids/{id}/enable": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch: operations["patchV0GridsByIdGridsByIdEnable"]; + trace?: never; + }; + "/v0/grids/{id}/grids/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete: operations["deleteV0GridsByIdGridsById"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/procurements/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0ProcurementsById"]; + put: operations["putV0ProcurementsById"]; + post: operations["postV0ProcurementsById"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/procurements": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Procurements"]; + put?: never; + post: operations["postV0Procurements"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/prices": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Prices"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/orders": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Orders"]; + put?: never; + post: operations["postV0Orders"]; + delete: operations["deleteV0Orders"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/orders/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0OrdersById"]; + put?: never; + post?: never; + delete: operations["deleteV0OrdersById"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/clusters": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Clusters"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/credentials": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Credentials"]; + put?: never; + post: operations["postV0Credentials"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/contracts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Contracts"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/contracts/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0ContractsById"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v0/balance": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getV0Balance"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - get: operations["getV0Quote"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/grids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Grids"]; - put?: never; - post: operations["postV0Grids"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/grids/{id}/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0GridsById"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/grids/{id}/grids/{id}/disable": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch: operations["patchV0GridsByIdGridsByIdDisable"]; - trace?: never; - }; - "/v0/grids/{id}/grids/{id}/enable": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch: operations["patchV0GridsByIdGridsByIdEnable"]; - trace?: never; - }; - "/v0/grids/{id}/grids/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete: operations["deleteV0GridsByIdGridsById"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/procurements/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0ProcurementsById"]; - put: operations["putV0ProcurementsById"]; - post: operations["postV0ProcurementsById"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/procurements": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Procurements"]; - put?: never; - post: operations["postV0Procurements"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/prices": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Prices"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/orders": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Orders"]; - put?: never; - post: operations["postV0Orders"]; - delete: operations["deleteV0Orders"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/orders/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0OrdersById"]; - put?: never; - post?: never; - delete: operations["deleteV0OrdersById"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/clusters": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Clusters"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/credentials": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Credentials"]; - put?: never; - post: operations["postV0Credentials"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/contracts": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Contracts"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/contracts/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0ContractsById"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v0/balance": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["getV0Balance"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; } export type webhooks = Record; export interface components { - schemas: never; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: never; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export interface operations { - getV0Quote: { - parameters: { - query: { - side: "buy" | "sell"; - /** @description Inclusive lower bound for the start time. Can either be the literal string "NOW" or an ISO 8601 string. The query will consider all valid start times at or after this time. The difference between this and `max_start_time` can be at most 24 hours. */ - min_start_date: "NOW" | string; - /** @description Inclusive upper bound for the start time. Can either be the literal string "NOW" or an ISO 8601 string. The query will consider all valid start times on or before this time. The difference between this and `min_start_time` can be at most 24 hours. */ - max_start_date: "NOW" | string; - /** @description desired duration, in seconds. Since contracts must end on the hour, the actual duration returned by the quote may be longer than the requested duration by up to 59 minutes. If `min_duration` and `max_duration` are provided, this value is ignored. If this is not provided, `min_duration` and `max_duration` must be provided. */ - duration?: string | (number | string); - /** @description Inclusive lower bound for the duration, in seconds. If provided, `duration` is ignored and `max_duration` must be set. */ - min_duration?: string | (number | string); - /** @description Inclusive upper bound for the duration, in seconds. If provided, `duration` is ignored and `min_duration` must be set. */ - max_duration?: string | (number | string); - /** @description The number of nodes. */ - quantity: number | string; - /** @description The instance type. */ - instance_type?: string; - contract_id?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "quote"; - /** @constant */ - side: "buy"; - quote: { - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description The instance type. */ - instance_type: string; - } | null; - } | { - /** @constant */ - object: "quote"; - /** @constant */ - side: "sell"; - quote: { - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - contract_id: string; - } | null; - }; - "multipart/form-data": { - /** @constant */ - object: "quote"; - /** @constant */ - side: "buy"; - quote: { - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description The instance type. */ - instance_type: string; - } | null; - } | { - /** @constant */ - object: "quote"; - /** @constant */ - side: "sell"; - quote: { - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - contract_id: string; - } | null; - }; - "text/plain": { - /** @constant */ - object: "quote"; - /** @constant */ - side: "buy"; - quote: { - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description The instance type. */ - instance_type: string; - } | null; - } | { - /** @constant */ - object: "quote"; - /** @constant */ - side: "sell"; - quote: { - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - contract_id: string; - } | null; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; - }; - }; - getV0Grids: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - postV0Grids: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description Number of parallel copies of each unique order in the grid. This can be thought of as the "height" of the grid, or the number of orders to place in the "nodes" dimension of the grid. */ - num_copies: number | string; - /** @description Number of unique orders in the grid. This can be thought of as the "length" of the grid, or the number of orders to place in the "time" dimension of the grid. */ - num_orders: number | string; - /** - * Format: date-time - * @description The start time of the first order in the grid. If this date is in the past, will be clamped such that the orders start immediately. If this date is not provided, it will be set to `start_at`. - */ - grid_front?: string; - /** - * Format: date-time - * @description The time at which the grid should start placing orders. If this date is in the past, it will be clamped such that the first orders are placed immediately. - */ - start_at: string; - /** - * Format: date-time - * @description The time at which the grid should stop placing new orders automatically. Must be on the hour. For sell grids, will be set to the given time (if any) or the end of the backing contract, whichever is sooner. This is not to be confused for the end time of the last order in the grid, i.e. `grid_front + num_orders * order.duration`. - */ - end_at?: string; - order: { - /** @constant */ - side: "buy"; - /** @description The instance type. */ - instance_type: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes to buy in each order. */ - quantity: number | string; - /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ - duration: number | string; - reprice?: { - /** - * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. - * @constant - */ - strategy: "grid_linear"; - /** @description Price in cents (1 = $0.01) */ - start_price: number | string; - /** @description Price in cents (1 = $0.01) */ - end_price: number | string; - /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ - relative_window_start: number | string; - /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ - relative_window_end: number | string; - }; - } | { - /** @constant */ - side: "sell"; - /** @description The instance type. */ - instance_type: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes to sell in each order. */ - quantity: number | string; - /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ - duration: number | string; - backing_contract_id: string; - reprice?: { - /** - * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. - * @constant - */ - strategy: "grid_linear"; - /** @description Price in cents (1 = $0.01) */ - start_price: number | string; - /** @description Price in cents (1 = $0.01) */ - end_price: number | string; - /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ - relative_window_start: number | string; - /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ - relative_window_end: number | string; - }; - }; - }; - "multipart/form-data": { - /** @description Number of parallel copies of each unique order in the grid. This can be thought of as the "height" of the grid, or the number of orders to place in the "nodes" dimension of the grid. */ - num_copies: number | string; - /** @description Number of unique orders in the grid. This can be thought of as the "length" of the grid, or the number of orders to place in the "time" dimension of the grid. */ - num_orders: number | string; - /** - * Format: date-time - * @description The start time of the first order in the grid. If this date is in the past, will be clamped such that the orders start immediately. If this date is not provided, it will be set to `start_at`. - */ - grid_front?: string; - /** - * Format: date-time - * @description The time at which the grid should start placing orders. If this date is in the past, it will be clamped such that the first orders are placed immediately. - */ - start_at: string; - /** - * Format: date-time - * @description The time at which the grid should stop placing new orders automatically. Must be on the hour. For sell grids, will be set to the given time (if any) or the end of the backing contract, whichever is sooner. This is not to be confused for the end time of the last order in the grid, i.e. `grid_front + num_orders * order.duration`. - */ - end_at?: string; - order: { - /** @constant */ - side: "buy"; - /** @description The instance type. */ - instance_type: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes to buy in each order. */ - quantity: number | string; - /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ - duration: number | string; - reprice?: { - /** - * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. - * @constant - */ - strategy: "grid_linear"; - /** @description Price in cents (1 = $0.01) */ - start_price: number | string; - /** @description Price in cents (1 = $0.01) */ - end_price: number | string; - /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ - relative_window_start: number | string; - /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ - relative_window_end: number | string; - }; - } | { - /** @constant */ - side: "sell"; - /** @description The instance type. */ - instance_type: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes to sell in each order. */ - quantity: number | string; - /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ - duration: number | string; - backing_contract_id: string; - reprice?: { - /** - * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. - * @constant - */ - strategy: "grid_linear"; - /** @description Price in cents (1 = $0.01) */ - start_price: number | string; - /** @description Price in cents (1 = $0.01) */ - end_price: number | string; - /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ - relative_window_start: number | string; - /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ - relative_window_end: number | string; - }; - }; - }; - "text/plain": { - /** @description Number of parallel copies of each unique order in the grid. This can be thought of as the "height" of the grid, or the number of orders to place in the "nodes" dimension of the grid. */ - num_copies: number | string; - /** @description Number of unique orders in the grid. This can be thought of as the "length" of the grid, or the number of orders to place in the "time" dimension of the grid. */ - num_orders: number | string; - /** - * Format: date-time - * @description The start time of the first order in the grid. If this date is in the past, will be clamped such that the orders start immediately. If this date is not provided, it will be set to `start_at`. - */ - grid_front?: string; - /** - * Format: date-time - * @description The time at which the grid should start placing orders. If this date is in the past, it will be clamped such that the first orders are placed immediately. - */ - start_at: string; - /** - * Format: date-time - * @description The time at which the grid should stop placing new orders automatically. Must be on the hour. For sell grids, will be set to the given time (if any) or the end of the backing contract, whichever is sooner. This is not to be confused for the end time of the last order in the grid, i.e. `grid_front + num_orders * order.duration`. - */ - end_at?: string; - order: { - /** @constant */ - side: "buy"; - /** @description The instance type. */ - instance_type: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes to buy in each order. */ - quantity: number | string; - /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ - duration: number | string; - reprice?: { - /** - * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. - * @constant - */ - strategy: "grid_linear"; - /** @description Price in cents (1 = $0.01) */ - start_price: number | string; - /** @description Price in cents (1 = $0.01) */ - end_price: number | string; - /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ - relative_window_start: number | string; - /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ - relative_window_end: number | string; - }; - } | { - /** @constant */ - side: "sell"; - /** @description The instance type. */ - instance_type: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - /** @description The number of nodes to sell in each order. */ - quantity: number | string; - /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ - duration: number | string; - backing_contract_id: string; - reprice?: { - /** - * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. - * @constant - */ - strategy: "grid_linear"; - /** @description Price in cents (1 = $0.01) */ - start_price: number | string; - /** @description Price in cents (1 = $0.01) */ - end_price: number | string; - /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ - relative_window_start: number | string; - /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ - relative_window_end: number | string; - }; - }; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; + getV0Quote: { + parameters: { + query: { + side: "buy" | "sell"; + /** @description Inclusive lower bound for the start time. Can either be the literal string "NOW" or an ISO 8601 string. The query will consider all valid start times at or after this time. The difference between this and `max_start_time` can be at most 24 hours. */ + min_start_date: "NOW" | string; + /** @description Inclusive upper bound for the start time. Can either be the literal string "NOW" or an ISO 8601 string. The query will consider all valid start times on or before this time. The difference between this and `min_start_time` can be at most 24 hours. */ + max_start_date: "NOW" | string; + /** @description desired duration, in seconds. Since contracts must end on the hour, the actual duration returned by the quote may be longer than the requested duration by up to 59 minutes. If `min_duration` and `max_duration` are provided, this value is ignored. If this is not provided, `min_duration` and `max_duration` must be provided. */ + duration?: string | (number | string); + /** @description Inclusive lower bound for the duration, in seconds. If provided, `duration` is ignored and `max_duration` must be set. */ + min_duration?: string | (number | string); + /** @description Inclusive upper bound for the duration, in seconds. If provided, `duration` is ignored and `min_duration` must be set. */ + max_duration?: string | (number | string); + /** @description The number of nodes. */ + quantity: number | string; + /** @description The instance type. */ + instance_type?: string; + contract_id?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "quote"; + /** @constant */ + side: "buy"; + quote: { + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description The instance type. */ + instance_type: string; + } | null; + } | { + /** @constant */ + object: "quote"; + /** @constant */ + side: "sell"; + quote: { + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + contract_id: string; + } | null; + }; + "multipart/form-data": { + /** @constant */ + object: "quote"; + /** @constant */ + side: "buy"; + quote: { + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description The instance type. */ + instance_type: string; + } | null; + } | { + /** @constant */ + object: "quote"; + /** @constant */ + side: "sell"; + quote: { + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + contract_id: string; + } | null; + }; + "text/plain": { + /** @constant */ + object: "quote"; + /** @constant */ + side: "buy"; + quote: { + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description The instance type. */ + instance_type: string; + } | null; + } | { + /** @constant */ + object: "quote"; + /** @constant */ + side: "sell"; + quote: { + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + contract_id: string; + } | null; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; }; - content?: never; - }; - }; - }; - getV0GridsById: { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - patchV0GridsByIdGridsByIdDisable: { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - patchV0GridsByIdGridsByIdEnable: { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - deleteV0GridsByIdGridsById: { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - getV0ProcurementsById: { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "multipart/form-data": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "text/plain": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; - }; - }; - putV0ProcurementsById: { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - "multipart/form-data": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - "text/plain": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "multipart/form-data": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "text/plain": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; - }; - }; - postV0ProcurementsById: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path: { - id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - "multipart/form-data": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - "text/plain": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "multipart/form-data": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "text/plain": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; }; - }; - getV0Procurements: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data: { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "multipart/form-data": { - data: { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "text/plain": { - data: { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; - }; - }; - postV0Procurements: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - "multipart/form-data": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - "text/plain": { - /** @description The instance type. */ - instance_type: string; - quantity: number; - max_price_per_node_hour: number; - min_duration_in_hours: number; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "multipart/form-data": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - "text/plain": { - id: string; - /** @description The instance type. */ - instance_type: string; - /** @description The quantity of the procurement */ - quantity: number; - /** @description The price per hour per node in cents */ - max_price_per_node_hour: number; - /** @description The block duration of the procurement in hours */ - min_duration_in_hours: number; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; - }; - }; - getV0Prices: { - parameters: { - query?: { - /** @description The instance type. */ - instance_type?: string; - /** @description The minimum quantity of nodes filled blocks included in the price calculation contain. */ - min_quantity?: string | (number | string); - /** @description The maximum quantity of nodes filled blocks included in the price calculation contain. */ - max_quantity?: string | (number | string); - /** @description The minimum duration, in seconds, of filled blocks. */ - min_duration?: string | (number | string); - /** @description The maximum duration, in seconds, of filled blocks. */ - max_duration?: string | (number | string); - /** @description The number of days to go back, starting from today. If you provide 0, you will only see prices for today. If you provide 1, you will see prices over all of yesterday, and today. */ - since_n_days_ago?: string | (number | string); - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data: { - /** @constant */ - object: "price-history-item"; - gpu_hour?: { - /** @description The minimum price per GPU hour for the period (in cents, 1 = $0.01). */ - min: number; - /** @description The maximum price per GPU hour for the period (in cents, 1 = $0.01). */ - max: number; - /** @description The average price per GPU hour for the period (in cents, 1 = $0.01). */ - avg: number; - }; - /** @description ISO 8601 datetime marking the start of the period. */ - period_start: string; - /** @description ISO 8601 datetime marking the end of the period. */ - period_end: string; - /** @description Whether there was no price data for this period. */ - no_data: boolean; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "multipart/form-data": { - data: { - /** @constant */ - object: "price-history-item"; - gpu_hour?: { - /** @description The minimum price per GPU hour for the period (in cents, 1 = $0.01). */ - min: number; - /** @description The maximum price per GPU hour for the period (in cents, 1 = $0.01). */ - max: number; - /** @description The average price per GPU hour for the period (in cents, 1 = $0.01). */ - avg: number; - }; - /** @description ISO 8601 datetime marking the start of the period. */ - period_start: string; - /** @description ISO 8601 datetime marking the end of the period. */ - period_end: string; - /** @description Whether there was no price data for this period. */ - no_data: boolean; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "text/plain": { - data: { - /** @constant */ - object: "price-history-item"; - gpu_hour?: { - /** @description The minimum price per GPU hour for the period (in cents, 1 = $0.01). */ - min: number; - /** @description The maximum price per GPU hour for the period (in cents, 1 = $0.01). */ - max: number; - /** @description The average price per GPU hour for the period (in cents, 1 = $0.01). */ - avg: number; - }; - /** @description ISO 8601 datetime marking the start of the period. */ - period_start: string; - /** @description ISO 8601 datetime marking the end of the period. */ - period_end: string; - /** @description Whether there was no price data for this period. */ - no_data: boolean; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; - }; - }; - getV0Orders: { - parameters: { - query?: { - side?: "buy" | "sell"; - /** @description The instance type. */ - instance_type?: string; - include_public?: boolean | string; - min_price?: string | number; - max_price?: string | number; - min_start_date?: string; - max_start_date?: string; - min_duration?: string | number; - max_duration?: string | number; - min_quantity?: string | number; - max_quantity?: string | number; - contract_id?: string; - only_open?: boolean | string; - exclude_filled?: boolean | string; - only_filled?: boolean | string; - min_filled_at?: string; - max_filled_at?: string; - min_fill_price?: string | number; - max_fill_price?: string | number; - exclude_cancelled?: boolean | string; - only_cancelled?: boolean | string; - min_cancelled_at?: string; - max_cancelled_at?: string; - min_placed_at?: string; - max_placed_at?: string; - limit?: string | number; - offset?: string | number; - sort_by?: "created_at" | "start_time"; - sort_direction?: "ASC" | "DESC"; - }; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data: { - /** @constant */ - object: "order"; - id: string; - side: "buy" | "sell"; - status: - | "pending" - | "rejected" - | "open" - | "cancelled" - | "filled" - | "expired"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - executed: boolean; - executed_at?: string; - /** @description Execution price in cents (1 = $0.01) */ - execution_price?: number | string; - cancelled: boolean; - cancelled_at?: string; - colocate_with?: string[]; - created_at: string; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "multipart/form-data": { - data: { - /** @constant */ - object: "order"; - id: string; - side: "buy" | "sell"; - status: - | "pending" - | "rejected" - | "open" - | "cancelled" - | "filled" - | "expired"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - executed: boolean; - executed_at?: string; - /** @description Execution price in cents (1 = $0.01) */ - execution_price?: number | string; - cancelled: boolean; - cancelled_at?: string; - colocate_with?: string[]; - created_at: string; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "text/plain": { - data: { - /** @constant */ - object: "order"; - id: string; - side: "buy" | "sell"; - status: - | "pending" - | "rejected" - | "open" - | "cancelled" - | "filled" - | "expired"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - executed: boolean; - executed_at?: string; - /** @description Execution price in cents (1 = $0.01) */ - execution_price?: number | string; - cancelled: boolean; - cancelled_at?: string; - colocate_with?: string[]; - created_at: string; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + getV0Grids: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; }; - }; - postV0Orders: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + postV0Grids: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Number of parallel copies of each unique order in the grid. This can be thought of as the "height" of the grid, or the number of orders to place in the "nodes" dimension of the grid. */ + num_copies: number | string; + /** @description Number of unique orders in the grid. This can be thought of as the "length" of the grid, or the number of orders to place in the "time" dimension of the grid. */ + num_orders: number | string; + /** + * Format: date-time + * @description The start time of the first order in the grid. If this date is in the past, will be clamped such that the orders start immediately. If this date is not provided, it will be set to `start_at`. + */ + grid_front?: string; + /** + * Format: date-time + * @description The time at which the grid should start placing orders. If this date is in the past, it will be clamped such that the first orders are placed immediately. + */ + start_at: string; + /** + * Format: date-time + * @description The time at which the grid should stop placing new orders automatically. Must be on the hour. For sell grids, will be set to the given time (if any) or the end of the backing contract, whichever is sooner. This is not to be confused for the end time of the last order in the grid, i.e. `grid_front + num_orders * order.duration`. + */ + end_at?: string; + order: { + /** @constant */ + side: "buy"; + /** @description The instance type. */ + instance_type: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes to buy in each order. */ + quantity: number | string; + /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ + duration: number | string; + reprice?: { + /** + * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. + * @constant + */ + strategy: "grid_linear"; + /** @description Price in cents (1 = $0.01) */ + start_price: number | string; + /** @description Price in cents (1 = $0.01) */ + end_price: number | string; + /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ + relative_window_start: number | string; + /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ + relative_window_end: number | string; + }; + } | { + /** @constant */ + side: "sell"; + /** @description The instance type. */ + instance_type: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes to sell in each order. */ + quantity: number | string; + /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ + duration: number | string; + backing_contract_id: string; + reprice?: { + /** + * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. + * @constant + */ + strategy: "grid_linear"; + /** @description Price in cents (1 = $0.01) */ + start_price: number | string; + /** @description Price in cents (1 = $0.01) */ + end_price: number | string; + /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ + relative_window_start: number | string; + /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ + relative_window_end: number | string; + }; + }; + }; + "multipart/form-data": { + /** @description Number of parallel copies of each unique order in the grid. This can be thought of as the "height" of the grid, or the number of orders to place in the "nodes" dimension of the grid. */ + num_copies: number | string; + /** @description Number of unique orders in the grid. This can be thought of as the "length" of the grid, or the number of orders to place in the "time" dimension of the grid. */ + num_orders: number | string; + /** + * Format: date-time + * @description The start time of the first order in the grid. If this date is in the past, will be clamped such that the orders start immediately. If this date is not provided, it will be set to `start_at`. + */ + grid_front?: string; + /** + * Format: date-time + * @description The time at which the grid should start placing orders. If this date is in the past, it will be clamped such that the first orders are placed immediately. + */ + start_at: string; + /** + * Format: date-time + * @description The time at which the grid should stop placing new orders automatically. Must be on the hour. For sell grids, will be set to the given time (if any) or the end of the backing contract, whichever is sooner. This is not to be confused for the end time of the last order in the grid, i.e. `grid_front + num_orders * order.duration`. + */ + end_at?: string; + order: { + /** @constant */ + side: "buy"; + /** @description The instance type. */ + instance_type: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes to buy in each order. */ + quantity: number | string; + /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ + duration: number | string; + reprice?: { + /** + * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. + * @constant + */ + strategy: "grid_linear"; + /** @description Price in cents (1 = $0.01) */ + start_price: number | string; + /** @description Price in cents (1 = $0.01) */ + end_price: number | string; + /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ + relative_window_start: number | string; + /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ + relative_window_end: number | string; + }; + } | { + /** @constant */ + side: "sell"; + /** @description The instance type. */ + instance_type: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes to sell in each order. */ + quantity: number | string; + /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ + duration: number | string; + backing_contract_id: string; + reprice?: { + /** + * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. + * @constant + */ + strategy: "grid_linear"; + /** @description Price in cents (1 = $0.01) */ + start_price: number | string; + /** @description Price in cents (1 = $0.01) */ + end_price: number | string; + /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ + relative_window_start: number | string; + /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ + relative_window_end: number | string; + }; + }; + }; + "text/plain": { + /** @description Number of parallel copies of each unique order in the grid. This can be thought of as the "height" of the grid, or the number of orders to place in the "nodes" dimension of the grid. */ + num_copies: number | string; + /** @description Number of unique orders in the grid. This can be thought of as the "length" of the grid, or the number of orders to place in the "time" dimension of the grid. */ + num_orders: number | string; + /** + * Format: date-time + * @description The start time of the first order in the grid. If this date is in the past, will be clamped such that the orders start immediately. If this date is not provided, it will be set to `start_at`. + */ + grid_front?: string; + /** + * Format: date-time + * @description The time at which the grid should start placing orders. If this date is in the past, it will be clamped such that the first orders are placed immediately. + */ + start_at: string; + /** + * Format: date-time + * @description The time at which the grid should stop placing new orders automatically. Must be on the hour. For sell grids, will be set to the given time (if any) or the end of the backing contract, whichever is sooner. This is not to be confused for the end time of the last order in the grid, i.e. `grid_front + num_orders * order.duration`. + */ + end_at?: string; + order: { + /** @constant */ + side: "buy"; + /** @description The instance type. */ + instance_type: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes to buy in each order. */ + quantity: number | string; + /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ + duration: number | string; + reprice?: { + /** + * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. + * @constant + */ + strategy: "grid_linear"; + /** @description Price in cents (1 = $0.01) */ + start_price: number | string; + /** @description Price in cents (1 = $0.01) */ + end_price: number | string; + /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ + relative_window_start: number | string; + /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ + relative_window_end: number | string; + }; + } | { + /** @constant */ + side: "sell"; + /** @description The instance type. */ + instance_type: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + /** @description The number of nodes to sell in each order. */ + quantity: number | string; + /** @description The duration of for which the nodes will be sold in each order, in seconds. Must be a multiple of 3600. */ + duration: number | string; + backing_contract_id: string; + reprice?: { + /** + * @description Reprice the order linearly over a given window of time, defined relative to the order's start time. + * @constant + */ + strategy: "grid_linear"; + /** @description Price in cents (1 = $0.01) */ + start_price: number | string; + /** @description Price in cents (1 = $0.01) */ + end_price: number | string; + /** @description The start time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to start 5 hours before the order start time, you'd set this to `5 * 3600`. */ + relative_window_start: number | string; + /** @description The end time of the repricing window, relative to the order's start time, in seconds before the order's start time. For instance, if you want repricing to end 1 hour before the order start time, you'd set this to `5 * 3600`. */ + relative_window_end: number | string; + }; + }; + }; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; }; - requestBody: { - content: { - "application/json": { - /** @constant */ - side: "buy"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - start_at: string | "NOW"; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags?: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - colocate_with?: string[]; - } | { - /** @constant */ - side: "sell"; - contract_id: string; - /** @description The number of nodes. */ - quantity: number | string; - start_at: string | "NOW"; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags?: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - reprice?: { - /** - * @description Adjust this order's price linearly from adjustment start to end. This is deprecated, and will soon be unsupported. Please use `linear_v2` instead. - * @constant - */ - strategy: "linear"; - /** @description For sell orders, the floor (lowest) price the order can be adjusted to, in cents. For buy orders, the ceiling (highest) price the order can be adjusted to. */ - limit: number; - /** @description When to start adjusting the order’s price. If this date is in the past, it will be clamped such that the adjustment starts immediately. */ - start_at?: string; - /** @description When to stop adjusting the order’s price. If this date is past the order’s end time, it will be clamped such that the adjustment ends at the order’s end time. */ - end_at?: string; - } | { - /** - * @description Adjust this order's price linearly from adjustment a given window of time. - * @constant - */ - strategy: "linear_v2"; - /** @description The desired order limit price at the beginning of the repricing window. */ - start_price: number | string; - /** @description The desired order limit price at the end of the repricing window, in cents. */ - end_price: number | string; - /** - * Format: date-time - * @description The start time of the repricing window. Must be at or before the window end time. If this date is in the past, it will be clamped such that window starts immediately. - */ - window_start: string; - /** - * Format: date-time - * @description The end time of the repricing window. If this date is past the order's start time, it will be clamped such that the repricing window ends at the order's start time. - */ - window_end: string; - }; - }; - "multipart/form-data": { - /** @constant */ - side: "buy"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - start_at: string | "NOW"; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags?: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - colocate_with?: string[]; - } | { - /** @constant */ - side: "sell"; - contract_id: string; - /** @description The number of nodes. */ - quantity: number | string; - start_at: string | "NOW"; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags?: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - reprice?: { - /** - * @description Adjust this order's price linearly from adjustment start to end. This is deprecated, and will soon be unsupported. Please use `linear_v2` instead. - * @constant - */ - strategy: "linear"; - /** @description For sell orders, the floor (lowest) price the order can be adjusted to, in cents. For buy orders, the ceiling (highest) price the order can be adjusted to. */ - limit: number; - /** @description When to start adjusting the order’s price. If this date is in the past, it will be clamped such that the adjustment starts immediately. */ - start_at?: string; - /** @description When to stop adjusting the order’s price. If this date is past the order’s end time, it will be clamped such that the adjustment ends at the order’s end time. */ - end_at?: string; - } | { - /** - * @description Adjust this order's price linearly from adjustment a given window of time. - * @constant - */ - strategy: "linear_v2"; - /** @description The desired order limit price at the beginning of the repricing window. */ - start_price: number | string; - /** @description The desired order limit price at the end of the repricing window, in cents. */ - end_price: number | string; - /** - * Format: date-time - * @description The start time of the repricing window. Must be at or before the window end time. If this date is in the past, it will be clamped such that window starts immediately. - */ - window_start: string; - /** - * Format: date-time - * @description The end time of the repricing window. If this date is past the order's start time, it will be clamped such that the repricing window ends at the order's start time. - */ - window_end: string; - }; - }; - "text/plain": { - /** @constant */ - side: "buy"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - start_at: string | "NOW"; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags?: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - colocate_with?: string[]; - } | { - /** @constant */ - side: "sell"; - contract_id: string; - /** @description The number of nodes. */ - quantity: number | string; - start_at: string | "NOW"; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags?: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - reprice?: { - /** - * @description Adjust this order's price linearly from adjustment start to end. This is deprecated, and will soon be unsupported. Please use `linear_v2` instead. - * @constant - */ - strategy: "linear"; - /** @description For sell orders, the floor (lowest) price the order can be adjusted to, in cents. For buy orders, the ceiling (highest) price the order can be adjusted to. */ - limit: number; - /** @description When to start adjusting the order’s price. If this date is in the past, it will be clamped such that the adjustment starts immediately. */ - start_at?: string; - /** @description When to stop adjusting the order’s price. If this date is past the order’s end time, it will be clamped such that the adjustment ends at the order’s end time. */ - end_at?: string; - } | { - /** - * @description Adjust this order's price linearly from adjustment a given window of time. - * @constant - */ - strategy: "linear_v2"; - /** @description The desired order limit price at the beginning of the repricing window. */ - start_price: number | string; - /** @description The desired order limit price at the end of the repricing window, in cents. */ - end_price: number | string; - /** - * Format: date-time - * @description The start time of the repricing window. Must be at or before the window end time. If this date is in the past, it will be clamped such that window starts immediately. - */ - window_start: string; - /** - * Format: date-time - * @description The end time of the repricing window. If this date is past the order's start time, it will be clamped such that the repricing window ends at the order's start time. - */ - window_end: string; - }; - }; - }; + getV0GridsById: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "order"; - id: string; - /** @constant */ - status: "pending"; - }; - "multipart/form-data": { - /** @constant */ - object: "order"; - id: string; - /** @constant */ - status: "pending"; - }; - "text/plain": { - /** @constant */ - object: "order"; - id: string; - /** @constant */ - status: "pending"; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - } | { - /** @constant */ - object: "error"; - /** @constant */ - code: "order.unauthorized_seller"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - } | { - /** @constant */ - object: "error"; - /** @constant */ - code: "order.unauthorized_seller"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - } | { - /** @constant */ - object: "error"; - /** @constant */ - code: "order.unauthorized_seller"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + patchV0GridsByIdGridsByIdDisable: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; }; - }; - deleteV0Orders: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + patchV0GridsByIdGridsByIdEnable: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "pending"; - }; - "multipart/form-data": { - /** @constant */ - object: "pending"; - }; - "text/plain": { - /** @constant */ - object: "pending"; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + deleteV0GridsByIdGridsById: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; }; - }; - getV0OrdersById: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path: { - id: string; - }; - cookie?: never; + getV0ProcurementsById: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "multipart/form-data": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "text/plain": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "order"; - id: string; - side: "buy" | "sell"; - status: - | "pending" - | "rejected" - | "open" - | "cancelled" - | "filled" - | "expired"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - executed: boolean; - executed_at?: string; - /** @description Execution price in cents (1 = $0.01) */ - execution_price?: number | string; - cancelled: boolean; - cancelled_at?: string; - colocate_with?: string[]; - created_at: string; - }; - "multipart/form-data": { - /** @constant */ - object: "order"; - id: string; - side: "buy" | "sell"; - status: - | "pending" - | "rejected" - | "open" - | "cancelled" - | "filled" - | "expired"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - executed: boolean; - executed_at?: string; - /** @description Execution price in cents (1 = $0.01) */ - execution_price?: number | string; - cancelled: boolean; - cancelled_at?: string; - colocate_with?: string[]; - created_at: string; - }; - "text/plain": { - /** @constant */ - object: "order"; - id: string; - side: "buy" | "sell"; - status: - | "pending" - | "rejected" - | "open" - | "cancelled" - | "filled" - | "expired"; - /** @description The instance type. */ - instance_type: string; - /** @description The number of nodes. */ - quantity: number | string; - /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ - start_at: string; - /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ - end_at: string; - /** @description Price in cents (1 = $0.01) */ - price: number | string; - flags: { - /** @description If true, this will be a market order. */ - market?: boolean; - /** @description If true, this is a post-only order. */ - post_only?: boolean; - /** @description If true, this is an immediate-or-cancel order. */ - ioc?: boolean; - }; - executed: boolean; - executed_at?: string; - /** @description Execution price in cents (1 = $0.01) */ - execution_price?: number | string; - cancelled: boolean; - cancelled_at?: string; - colocate_with?: string[]; - created_at: string; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + putV0ProcurementsById: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + "multipart/form-data": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + "text/plain": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "multipart/form-data": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "text/plain": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - deleteV0OrdersById: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path: { - id: string; - }; - cookie?: never; + postV0ProcurementsById: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path: { + id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + "multipart/form-data": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + "text/plain": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "multipart/form-data": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "text/plain": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "pending"; - }; - "multipart/form-data": { - /** @constant */ - object: "pending"; - }; - "text/plain": { - /** @constant */ - object: "pending"; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + getV0Procurements: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data: { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "multipart/form-data": { + data: { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "text/plain": { + data: { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - getV0Clusters: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + postV0Procurements: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + "multipart/form-data": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + "text/plain": { + /** @description The instance type. */ + instance_type: string; + quantity: number; + max_price_per_node_hour: number; + min_duration_in_hours: number; + }; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "multipart/form-data": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + "text/plain": { + id: string; + /** @description The instance type. */ + instance_type: string; + /** @description The quantity of the procurement */ + quantity: number; + /** @description The price per hour per node in cents */ + max_price_per_node_hour: number; + /** @description The block duration of the procurement in hours */ + min_duration_in_hours: number; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "multipart/form-data": { - data: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "text/plain": { - data: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + getV0Prices: { + parameters: { + query?: { + /** @description The instance type. */ + instance_type?: string; + /** @description The minimum quantity of nodes filled blocks included in the price calculation contain. */ + min_quantity?: string | (number | string); + /** @description The maximum quantity of nodes filled blocks included in the price calculation contain. */ + max_quantity?: string | (number | string); + /** @description The minimum duration, in seconds, of filled blocks. */ + min_duration?: string | (number | string); + /** @description The maximum duration, in seconds, of filled blocks. */ + max_duration?: string | (number | string); + /** @description The number of days to go back, starting from today. If you provide 0, you will only see prices for today. If you provide 1, you will see prices over all of yesterday, and today. */ + since_n_days_ago?: string | (number | string); + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data: { + /** @constant */ + object: "price-history-item"; + gpu_hour?: { + /** @description The minimum price per GPU hour for the period (in cents, 1 = $0.01). */ + min: number; + /** @description The maximum price per GPU hour for the period (in cents, 1 = $0.01). */ + max: number; + /** @description The average price per GPU hour for the period (in cents, 1 = $0.01). */ + avg: number; + }; + /** @description ISO 8601 datetime marking the start of the period. */ + period_start: string; + /** @description ISO 8601 datetime marking the end of the period. */ + period_end: string; + /** @description Whether there was no price data for this period. */ + no_data: boolean; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "multipart/form-data": { + data: { + /** @constant */ + object: "price-history-item"; + gpu_hour?: { + /** @description The minimum price per GPU hour for the period (in cents, 1 = $0.01). */ + min: number; + /** @description The maximum price per GPU hour for the period (in cents, 1 = $0.01). */ + max: number; + /** @description The average price per GPU hour for the period (in cents, 1 = $0.01). */ + avg: number; + }; + /** @description ISO 8601 datetime marking the start of the period. */ + period_start: string; + /** @description ISO 8601 datetime marking the end of the period. */ + period_end: string; + /** @description Whether there was no price data for this period. */ + no_data: boolean; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "text/plain": { + data: { + /** @constant */ + object: "price-history-item"; + gpu_hour?: { + /** @description The minimum price per GPU hour for the period (in cents, 1 = $0.01). */ + min: number; + /** @description The maximum price per GPU hour for the period (in cents, 1 = $0.01). */ + max: number; + /** @description The average price per GPU hour for the period (in cents, 1 = $0.01). */ + avg: number; + }; + /** @description ISO 8601 datetime marking the start of the period. */ + period_start: string; + /** @description ISO 8601 datetime marking the end of the period. */ + period_end: string; + /** @description Whether there was no price data for this period. */ + no_data: boolean; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - getV0Credentials: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + getV0Orders: { + parameters: { + query?: { + side?: "buy" | "sell"; + /** @description The instance type. */ + instance_type?: string; + include_public?: boolean | string; + min_price?: string | number; + max_price?: string | number; + min_start_date?: string; + max_start_date?: string; + min_duration?: string | number; + max_duration?: string | number; + min_quantity?: string | number; + max_quantity?: string | number; + contract_id?: string; + only_open?: boolean | string; + exclude_filled?: boolean | string; + only_filled?: boolean | string; + min_filled_at?: string; + max_filled_at?: string; + min_fill_price?: string | number; + max_fill_price?: string | number; + exclude_cancelled?: boolean | string; + only_cancelled?: boolean | string; + min_cancelled_at?: string; + max_cancelled_at?: string; + min_placed_at?: string; + max_placed_at?: string; + limit?: string | number; + offset?: string | number; + sort_by?: "created_at" | "start_time"; + sort_direction?: "ASC" | "DESC"; + }; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data: { + /** @constant */ + object: "order"; + id: string; + side: "buy" | "sell"; + status: "pending" | "rejected" | "open" | "cancelled" | "filled" | "expired"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + executed: boolean; + executed_at?: string; + /** @description Execution price in cents (1 = $0.01) */ + execution_price?: number | string; + cancelled: boolean; + cancelled_at?: string; + colocate_with?: string[]; + created_at: string; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "multipart/form-data": { + data: { + /** @constant */ + object: "order"; + id: string; + side: "buy" | "sell"; + status: "pending" | "rejected" | "open" | "cancelled" | "filled" | "expired"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + executed: boolean; + executed_at?: string; + /** @description Execution price in cents (1 = $0.01) */ + execution_price?: number | string; + cancelled: boolean; + cancelled_at?: string; + colocate_with?: string[]; + created_at: string; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "text/plain": { + data: { + /** @constant */ + object: "order"; + id: string; + side: "buy" | "sell"; + status: "pending" | "rejected" | "open" | "cancelled" | "filled" | "expired"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + executed: boolean; + executed_at?: string; + /** @description Execution price in cents (1 = $0.01) */ + execution_price?: number | string; + cancelled: boolean; + cancelled_at?: string; + colocate_with?: string[]; + created_at: string; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data: ({ - /** @constant */ - object: "ssh_credential"; - id: string; - pubkey: string; - username: string; - } | { - /** @constant */ - object: "k8s_credential"; - id: string; - username?: string; - label?: string; - pubkey: string; - cluster?: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }; - encrypted_token?: string; - nonce?: string; - ephemeral_pubkey?: string; - })[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "multipart/form-data": { - data: ({ - /** @constant */ - object: "ssh_credential"; - id: string; - pubkey: string; - username: string; - } | { - /** @constant */ - object: "k8s_credential"; - id: string; - username?: string; - label?: string; - pubkey: string; - cluster?: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }; - encrypted_token?: string; - nonce?: string; - ephemeral_pubkey?: string; - })[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "text/plain": { - data: ({ - /** @constant */ - object: "ssh_credential"; - id: string; - pubkey: string; - username: string; - } | { - /** @constant */ - object: "k8s_credential"; - id: string; - username?: string; - label?: string; - pubkey: string; - cluster?: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }; - encrypted_token?: string; - nonce?: string; - ephemeral_pubkey?: string; - })[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + postV0Orders: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @constant */ + side: "buy"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + start_at: string | "NOW"; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags?: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + colocate_with?: string[]; + } | { + /** @constant */ + side: "sell"; + contract_id: string; + /** @description The number of nodes. */ + quantity: number | string; + start_at: string | "NOW"; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags?: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + reprice?: { + /** + * @description Adjust this order's price linearly from adjustment start to end. This is deprecated, and will soon be unsupported. Please use `linear_v2` instead. + * @constant + */ + strategy: "linear"; + /** @description For sell orders, the floor (lowest) price the order can be adjusted to, in cents. For buy orders, the ceiling (highest) price the order can be adjusted to. */ + limit: number; + /** @description When to start adjusting the order’s price. If this date is in the past, it will be clamped such that the adjustment starts immediately. */ + start_at?: string; + /** @description When to stop adjusting the order’s price. If this date is past the order’s end time, it will be clamped such that the adjustment ends at the order’s end time. */ + end_at?: string; + } | { + /** + * @description Adjust this order's price linearly from adjustment a given window of time. + * @constant + */ + strategy: "linear_v2"; + /** @description The desired order limit price at the beginning of the repricing window. */ + start_price: number | string; + /** @description The desired order limit price at the end of the repricing window, in cents. */ + end_price: number | string; + /** + * Format: date-time + * @description The start time of the repricing window. Must be at or before the window end time. If this date is in the past, it will be clamped such that window starts immediately. + */ + window_start: string; + /** + * Format: date-time + * @description The end time of the repricing window. If this date is past the order's start time, it will be clamped such that the repricing window ends at the order's start time. + */ + window_end: string; + }; + }; + "multipart/form-data": { + /** @constant */ + side: "buy"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + start_at: string | "NOW"; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags?: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + colocate_with?: string[]; + } | { + /** @constant */ + side: "sell"; + contract_id: string; + /** @description The number of nodes. */ + quantity: number | string; + start_at: string | "NOW"; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags?: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + reprice?: { + /** + * @description Adjust this order's price linearly from adjustment start to end. This is deprecated, and will soon be unsupported. Please use `linear_v2` instead. + * @constant + */ + strategy: "linear"; + /** @description For sell orders, the floor (lowest) price the order can be adjusted to, in cents. For buy orders, the ceiling (highest) price the order can be adjusted to. */ + limit: number; + /** @description When to start adjusting the order’s price. If this date is in the past, it will be clamped such that the adjustment starts immediately. */ + start_at?: string; + /** @description When to stop adjusting the order’s price. If this date is past the order’s end time, it will be clamped such that the adjustment ends at the order’s end time. */ + end_at?: string; + } | { + /** + * @description Adjust this order's price linearly from adjustment a given window of time. + * @constant + */ + strategy: "linear_v2"; + /** @description The desired order limit price at the beginning of the repricing window. */ + start_price: number | string; + /** @description The desired order limit price at the end of the repricing window, in cents. */ + end_price: number | string; + /** + * Format: date-time + * @description The start time of the repricing window. Must be at or before the window end time. If this date is in the past, it will be clamped such that window starts immediately. + */ + window_start: string; + /** + * Format: date-time + * @description The end time of the repricing window. If this date is past the order's start time, it will be clamped such that the repricing window ends at the order's start time. + */ + window_end: string; + }; + }; + "text/plain": { + /** @constant */ + side: "buy"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + start_at: string | "NOW"; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags?: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + colocate_with?: string[]; + } | { + /** @constant */ + side: "sell"; + contract_id: string; + /** @description The number of nodes. */ + quantity: number | string; + start_at: string | "NOW"; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags?: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + reprice?: { + /** + * @description Adjust this order's price linearly from adjustment start to end. This is deprecated, and will soon be unsupported. Please use `linear_v2` instead. + * @constant + */ + strategy: "linear"; + /** @description For sell orders, the floor (lowest) price the order can be adjusted to, in cents. For buy orders, the ceiling (highest) price the order can be adjusted to. */ + limit: number; + /** @description When to start adjusting the order’s price. If this date is in the past, it will be clamped such that the adjustment starts immediately. */ + start_at?: string; + /** @description When to stop adjusting the order’s price. If this date is past the order’s end time, it will be clamped such that the adjustment ends at the order’s end time. */ + end_at?: string; + } | { + /** + * @description Adjust this order's price linearly from adjustment a given window of time. + * @constant + */ + strategy: "linear_v2"; + /** @description The desired order limit price at the beginning of the repricing window. */ + start_price: number | string; + /** @description The desired order limit price at the end of the repricing window, in cents. */ + end_price: number | string; + /** + * Format: date-time + * @description The start time of the repricing window. Must be at or before the window end time. If this date is in the past, it will be clamped such that window starts immediately. + */ + window_start: string; + /** + * Format: date-time + * @description The end time of the repricing window. If this date is past the order's start time, it will be clamped such that the repricing window ends at the order's start time. + */ + window_end: string; + }; + }; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "order"; + id: string; + /** @constant */ + status: "pending"; + }; + "multipart/form-data": { + /** @constant */ + object: "order"; + id: string; + /** @constant */ + status: "pending"; + }; + "text/plain": { + /** @constant */ + object: "order"; + id: string; + /** @constant */ + status: "pending"; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + } | { + /** @constant */ + object: "error"; + /** @constant */ + code: "order.unauthorized_seller"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + } | { + /** @constant */ + object: "error"; + /** @constant */ + code: "order.unauthorized_seller"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + } | { + /** @constant */ + object: "error"; + /** @constant */ + code: "order.unauthorized_seller"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - postV0Credentials: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + deleteV0Orders: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "pending"; + }; + "multipart/form-data": { + /** @constant */ + object: "pending"; + }; + "text/plain": { + /** @constant */ + object: "pending"; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody: { - content: { - "application/json": { - pubkey: string; - username: string; - /** @constant */ - object?: "ssh_credential"; - } | { - username: string; - label?: string; - cluster: string; - /** @constant */ - object: "k8s_credential"; - pubkey: string; - }; - "multipart/form-data": { - pubkey: string; - username: string; - /** @constant */ - object?: "ssh_credential"; - } | { - username: string; - label?: string; - cluster: string; - /** @constant */ - object: "k8s_credential"; - pubkey: string; - }; - "text/plain": { - pubkey: string; - username: string; - /** @constant */ - object?: "ssh_credential"; - } | { - username: string; - label?: string; - cluster: string; - /** @constant */ - object: "k8s_credential"; - pubkey: string; - }; - }; + getV0OrdersById: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "order"; + id: string; + side: "buy" | "sell"; + status: "pending" | "rejected" | "open" | "cancelled" | "filled" | "expired"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + executed: boolean; + executed_at?: string; + /** @description Execution price in cents (1 = $0.01) */ + execution_price?: number | string; + cancelled: boolean; + cancelled_at?: string; + colocate_with?: string[]; + created_at: string; + }; + "multipart/form-data": { + /** @constant */ + object: "order"; + id: string; + side: "buy" | "sell"; + status: "pending" | "rejected" | "open" | "cancelled" | "filled" | "expired"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + executed: boolean; + executed_at?: string; + /** @description Execution price in cents (1 = $0.01) */ + execution_price?: number | string; + cancelled: boolean; + cancelled_at?: string; + colocate_with?: string[]; + created_at: string; + }; + "text/plain": { + /** @constant */ + object: "order"; + id: string; + side: "buy" | "sell"; + status: "pending" | "rejected" | "open" | "cancelled" | "filled" | "expired"; + /** @description The instance type. */ + instance_type: string; + /** @description The number of nodes. */ + quantity: number | string; + /** @description The start time, as an ISO 8601 string. Start times must be either "right now" or on the hour. Order start times must be in the future, and can be either the next minute from now or on the hour. For example, if it's 16:00, valid start times include 16:01, 17:00, and 18:00, but not 16:30. Dates are always rounded up to the nearest minute. */ + start_at: string; + /** @description The end time, as an ISO 8601 string. End times must be on the hour, i.e. 16:00, 17:00, 18:00, etc. 17:30, 17:01, etc are not valid end times. Dates are always rounded up to the nearest minute. */ + end_at: string; + /** @description Price in cents (1 = $0.01) */ + price: number | string; + flags: { + /** @description If true, this will be a market order. */ + market?: boolean; + /** @description If true, this is a post-only order. */ + post_only?: boolean; + /** @description If true, this is an immediate-or-cancel order. */ + ioc?: boolean; + }; + executed: boolean; + executed_at?: string; + /** @description Execution price in cents (1 = $0.01) */ + execution_price?: number | string; + cancelled: boolean; + cancelled_at?: string; + colocate_with?: string[]; + created_at: string; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "ssh_credential"; - id: string; - pubkey: string; - username: string; - } | { - /** @constant */ - object: "k8s_credential"; - id: string; - username?: string; - label?: string; - pubkey: string; - cluster?: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }; - encrypted_token?: string; - nonce?: string; - ephemeral_pubkey?: string; - }; - "multipart/form-data": { - /** @constant */ - object: "ssh_credential"; - id: string; - pubkey: string; - username: string; - } | { - /** @constant */ - object: "k8s_credential"; - id: string; - username?: string; - label?: string; - pubkey: string; - cluster?: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }; - encrypted_token?: string; - nonce?: string; - ephemeral_pubkey?: string; - }; - "text/plain": { - /** @constant */ - object: "ssh_credential"; - id: string; - pubkey: string; - username: string; - } | { - /** @constant */ - object: "k8s_credential"; - id: string; - username?: string; - label?: string; - pubkey: string; - cluster?: { - /** @constant */ - object: "kubernetes_cluster"; - kubernetes_api_url?: string; - name: string; - kubernetes_namespace: string; - kubernetes_ca_cert?: string; - }; - encrypted_token?: string; - nonce?: string; - ephemeral_pubkey?: string; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + deleteV0OrdersById: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "pending"; + }; + "multipart/form-data": { + /** @constant */ + object: "pending"; + }; + "text/plain": { + /** @constant */ + object: "pending"; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - getV0Contracts: { - parameters: { - query?: { - active_within_interval_start?: string; - active_within_interval_end?: string; - instance_type?: string; - }; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + getV0Clusters: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "multipart/form-data": { + data: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "text/plain": { + data: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data: ({ - /** @constant */ - object: "contract"; - /** @constant */ - status: "active"; - id: string; - /** Format: date-time */ - created_at: string; - /** @description The instance type. */ - instance_type: string; - /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ - shape: { - intervals: string[]; - quantities: number[]; - }; - colocate_with?: string[]; - cluster_id?: string; - } | { - /** @constant */ - object: "contract"; - /** @constant */ - status: "pending"; - id: string; - })[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "multipart/form-data": { - data: ({ - /** @constant */ - object: "contract"; - /** @constant */ - status: "active"; - id: string; - /** Format: date-time */ - created_at: string; - /** @description The instance type. */ - instance_type: string; - /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ - shape: { - intervals: string[]; - quantities: number[]; - }; - colocate_with?: string[]; - cluster_id?: string; - } | { - /** @constant */ - object: "contract"; - /** @constant */ - status: "pending"; - id: string; - })[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - "text/plain": { - data: ({ - /** @constant */ - object: "contract"; - /** @constant */ - status: "active"; - id: string; - /** Format: date-time */ - created_at: string; - /** @description The instance type. */ - instance_type: string; - /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ - shape: { - intervals: string[]; - quantities: number[]; - }; - colocate_with?: string[]; - cluster_id?: string; - } | { - /** @constant */ - object: "contract"; - /** @constant */ - status: "pending"; - id: string; - })[]; - has_more: boolean; - /** @constant */ - object: "list"; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + getV0Credentials: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data: ({ + /** @constant */ + object: "ssh_credential"; + id: string; + pubkey: string; + username: string; + } | { + /** @constant */ + object: "k8s_credential"; + id: string; + username?: string; + label?: string; + pubkey: string; + cluster?: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }; + encrypted_token?: string; + nonce?: string; + ephemeral_pubkey?: string; + })[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "multipart/form-data": { + data: ({ + /** @constant */ + object: "ssh_credential"; + id: string; + pubkey: string; + username: string; + } | { + /** @constant */ + object: "k8s_credential"; + id: string; + username?: string; + label?: string; + pubkey: string; + cluster?: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }; + encrypted_token?: string; + nonce?: string; + ephemeral_pubkey?: string; + })[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "text/plain": { + data: ({ + /** @constant */ + object: "ssh_credential"; + id: string; + pubkey: string; + username: string; + } | { + /** @constant */ + object: "k8s_credential"; + id: string; + username?: string; + label?: string; + pubkey: string; + cluster?: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }; + encrypted_token?: string; + nonce?: string; + ephemeral_pubkey?: string; + })[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - getV0ContractsById: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path: { - id: string; - }; - cookie?: never; + postV0Credentials: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + pubkey: string; + username: string; + /** @constant */ + object?: "ssh_credential"; + } | { + username: string; + label?: string; + cluster: string; + /** @constant */ + object: "k8s_credential"; + pubkey: string; + }; + "multipart/form-data": { + pubkey: string; + username: string; + /** @constant */ + object?: "ssh_credential"; + } | { + username: string; + label?: string; + cluster: string; + /** @constant */ + object: "k8s_credential"; + pubkey: string; + }; + "text/plain": { + pubkey: string; + username: string; + /** @constant */ + object?: "ssh_credential"; + } | { + username: string; + label?: string; + cluster: string; + /** @constant */ + object: "k8s_credential"; + pubkey: string; + }; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "ssh_credential"; + id: string; + pubkey: string; + username: string; + } | { + /** @constant */ + object: "k8s_credential"; + id: string; + username?: string; + label?: string; + pubkey: string; + cluster?: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }; + encrypted_token?: string; + nonce?: string; + ephemeral_pubkey?: string; + }; + "multipart/form-data": { + /** @constant */ + object: "ssh_credential"; + id: string; + pubkey: string; + username: string; + } | { + /** @constant */ + object: "k8s_credential"; + id: string; + username?: string; + label?: string; + pubkey: string; + cluster?: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }; + encrypted_token?: string; + nonce?: string; + ephemeral_pubkey?: string; + }; + "text/plain": { + /** @constant */ + object: "ssh_credential"; + id: string; + pubkey: string; + username: string; + } | { + /** @constant */ + object: "k8s_credential"; + id: string; + username?: string; + label?: string; + pubkey: string; + cluster?: { + /** @constant */ + object: "kubernetes_cluster"; + kubernetes_api_url?: string; + name: string; + kubernetes_namespace: string; + kubernetes_ca_cert?: string; + }; + encrypted_token?: string; + nonce?: string; + ephemeral_pubkey?: string; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "contract"; - /** @constant */ - status: "active"; - id: string; - /** Format: date-time */ - created_at: string; - /** @description The instance type. */ - instance_type: string; - /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ - shape: { - intervals: string[]; - quantities: number[]; - }; - colocate_with?: string[]; - cluster_id?: string; - } | { - /** @constant */ - object: "contract"; - /** @constant */ - status: "pending"; - id: string; - }; - "multipart/form-data": { - /** @constant */ - object: "contract"; - /** @constant */ - status: "active"; - id: string; - /** Format: date-time */ - created_at: string; - /** @description The instance type. */ - instance_type: string; - /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ - shape: { - intervals: string[]; - quantities: number[]; - }; - colocate_with?: string[]; - cluster_id?: string; - } | { - /** @constant */ - object: "contract"; - /** @constant */ - status: "pending"; - id: string; - }; - "text/plain": { - /** @constant */ - object: "contract"; - /** @constant */ - status: "active"; - id: string; - /** Format: date-time */ - created_at: string; - /** @description The instance type. */ - instance_type: string; - /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ - shape: { - intervals: string[]; - quantities: number[]; - }; - colocate_with?: string[]; - cluster_id?: string; - } | { - /** @constant */ - object: "contract"; - /** @constant */ - status: "pending"; - id: string; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + getV0Contracts: { + parameters: { + query?: { + active_within_interval_start?: string; + active_within_interval_end?: string; + instance_type?: string; + }; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data: ({ + /** @constant */ + object: "contract"; + /** @constant */ + status: "active"; + id: string; + /** Format: date-time */ + created_at: string; + /** @description The instance type. */ + instance_type: string; + /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ + shape: { + intervals: string[]; + quantities: number[]; + }; + colocate_with?: string[]; + cluster_id?: string; + } | { + /** @constant */ + object: "contract"; + /** @constant */ + status: "pending"; + id: string; + })[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "multipart/form-data": { + data: ({ + /** @constant */ + object: "contract"; + /** @constant */ + status: "active"; + id: string; + /** Format: date-time */ + created_at: string; + /** @description The instance type. */ + instance_type: string; + /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ + shape: { + intervals: string[]; + quantities: number[]; + }; + colocate_with?: string[]; + cluster_id?: string; + } | { + /** @constant */ + object: "contract"; + /** @constant */ + status: "pending"; + id: string; + })[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + "text/plain": { + data: ({ + /** @constant */ + object: "contract"; + /** @constant */ + status: "active"; + id: string; + /** Format: date-time */ + created_at: string; + /** @description The instance type. */ + instance_type: string; + /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ + shape: { + intervals: string[]; + quantities: number[]; + }; + colocate_with?: string[]; + cluster_id?: string; + } | { + /** @constant */ + object: "contract"; + /** @constant */ + status: "pending"; + id: string; + })[]; + has_more: boolean; + /** @constant */ + object: "list"; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; - getV0Balance: { - parameters: { - query?: never; - header?: { - /** @description Generate a bearer token with `$ sf tokens create`. */ - authorization?: string; - }; - path?: never; - cookie?: never; + getV0ContractsById: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "contract"; + /** @constant */ + status: "active"; + id: string; + /** Format: date-time */ + created_at: string; + /** @description The instance type. */ + instance_type: string; + /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ + shape: { + intervals: string[]; + quantities: number[]; + }; + colocate_with?: string[]; + cluster_id?: string; + } | { + /** @constant */ + object: "contract"; + /** @constant */ + status: "pending"; + id: string; + }; + "multipart/form-data": { + /** @constant */ + object: "contract"; + /** @constant */ + status: "active"; + id: string; + /** Format: date-time */ + created_at: string; + /** @description The instance type. */ + instance_type: string; + /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ + shape: { + intervals: string[]; + quantities: number[]; + }; + colocate_with?: string[]; + cluster_id?: string; + } | { + /** @constant */ + object: "contract"; + /** @constant */ + status: "pending"; + id: string; + }; + "text/plain": { + /** @constant */ + object: "contract"; + /** @constant */ + status: "active"; + id: string; + /** Format: date-time */ + created_at: string; + /** @description The instance type. */ + instance_type: string; + /** @description A shape that describes the distribution of the contract's size over time. Must end with a quantity of 0 if not empty. */ + shape: { + intervals: string[]; + quantities: number[]; + }; + colocate_with?: string[]; + cluster_id?: string; + } | { + /** @constant */ + object: "contract"; + /** @constant */ + status: "pending"; + id: string; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "balance"; - available: { - /** @description Funds available to spend or withdraw. */ - amount: number; - /** @constant */ - currency: "usd"; - }; - reserved: { - /** @description Funds held in reserve for pending withdrawals & open buy orders. */ - amount: number; - /** @constant */ - currency: "usd"; - }; - }; - "multipart/form-data": { - /** @constant */ - object: "balance"; - available: { - /** @description Funds available to spend or withdraw. */ - amount: number; - /** @constant */ - currency: "usd"; - }; - reserved: { - /** @description Funds held in reserve for pending withdrawals & open buy orders. */ - amount: number; - /** @constant */ - currency: "usd"; - }; - }; - "text/plain": { - /** @constant */ - object: "balance"; - available: { - /** @description Funds available to spend or withdraw. */ - amount: number; - /** @constant */ - currency: "usd"; - }; - reserved: { - /** @description Funds held in reserve for pending withdrawals & open buy orders. */ - amount: number; - /** @constant */ - currency: "usd"; - }; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "not_authenticated"; - message: string; - details?: Record; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "multipart/form-data": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - "text/plain": { - /** @constant */ - object: "error"; - /** @constant */ - code: "internal_server"; - message: string; - details?: Record; - }; - }; - }; + getV0Balance: { + parameters: { + query?: never; + header?: { + /** @description Generate a bearer token with `$ sf tokens create`. */ + authorization?: string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "balance"; + available: { + /** @description Funds available to spend or withdraw. */ + amount: number; + /** @constant */ + currency: "usd"; + }; + reserved: { + /** @description Funds held in reserve for pending withdrawals & open buy orders. */ + amount: number; + /** @constant */ + currency: "usd"; + }; + }; + "multipart/form-data": { + /** @constant */ + object: "balance"; + available: { + /** @description Funds available to spend or withdraw. */ + amount: number; + /** @constant */ + currency: "usd"; + }; + reserved: { + /** @description Funds held in reserve for pending withdrawals & open buy orders. */ + amount: number; + /** @constant */ + currency: "usd"; + }; + }; + "text/plain": { + /** @constant */ + object: "balance"; + available: { + /** @description Funds available to spend or withdraw. */ + amount: number; + /** @constant */ + currency: "usd"; + }; + reserved: { + /** @description Funds held in reserve for pending withdrawals & open buy orders. */ + amount: number; + /** @constant */ + currency: "usd"; + }; + }; + }; + }; + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "not_authenticated"; + message: string; + details?: Record; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "multipart/form-data": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + "text/plain": { + /** @constant */ + object: "error"; + /** @constant */ + code: "internal_server"; + message: string; + details?: Record; + }; + }; + }; + }; }; - }; }