/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/orders/pickups": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Get Pickups * @description Retrieves a list of pickups. * * ## Examples * * You can filter the list to return pickup objects specific to a list of requested pickup or order IDs. * This is achieved by appending the query string `?order_id:in=100,103,202` or `pickup_id:in=1,4` to the * resource `/orders/pickups`. * * ```http * GET /orders/pickups?order_id:in=100,300,500 * ``` * or * ```http * GET /orders/pickups?pickup_id:in=7,13,17 * ``` */ readonly get: operations["get-pickup"]; /** * Update Pickups * @description Update pickups by providing `pickup_id`, `collected_at`, and `ready_at` in the input. */ readonly put: operations["put-pickup"]; /** * Create Pickups * @description Creates one or many pickups. * * This is a batch operation that can create up to 100 pickup objects in one request. * * ## Limits * * Limit of creating 100 pickup objects per `POST` request. */ readonly post: operations["post-pickup"]; /** * Delete Pickups * @description Delete pickups by providing a list of `pickup_id`s. * * ## Examples * You can use the list of `pickup_ids` to delete the pickup items. This is achieved by appending the query string **?id:in=1,2,3** to the resource **\/pickup**. * * ```http * DELETE /pickup?id:in=1,2,3 * ``` */ readonly delete: operations["delete-pickup"]; }; } export type webhooks = Record; export interface components { schemas: { readonly BasePickup: { /** * @description ID of pickup method. * @example 2 */ readonly pickup_method_id?: number; /** * @description ID of order. * @example 103 */ readonly order_id?: number; }; readonly Pickup: { /** * @description The ID of pickup. * @example 1 */ readonly id?: number; } & components["schemas"]["BasePickup"] & { /** * Format: date-time * @description Datetime when pickup was ready for collection. * @example 2022-08-15T09:30:44Z */ readonly ready_at?: string; /** * Format: date-time * @description Datetime when pickup was created. * @example 2022-08-12T04:15:19.150539Z */ readonly created_at?: string; /** * Format: date-time * @description Datetime when pickup was updated. * @example 2022-08-12T04:15:19.150539Z */ readonly updated_at?: string; readonly pickup_items?: readonly components["schemas"]["PickupItem"][]; }; readonly BasePickupItem: { /** * @description The ID of the product. * @example 4 */ readonly order_product_id?: number; /** * @description The quantity of an item. * @example 5 */ readonly quantity?: number; }; readonly PickupItem: { /** * @description The ID of pickup. * @example 3 */ readonly id?: number; } & components["schemas"]["BasePickupItem"] & { /** * @description The status of the pickup. * @example COLLECTED * @enum {string} */ readonly status?: "AWAITING_COLLECTION" | "COLLECTED"; /** * Format: date-time * @description Date and time when the pickup was collected. * @example 2022-08-12T04:15:19.150539Z */ readonly collected_at?: string | null; }; readonly PostRequestPickup: components["schemas"]["BasePickup"] & { /** * @description Can be provided as two inputs. * Unix: Represents the time in seconds that has elapsed since Unix epoch (00:00:00 UTC on 1 January 1970) * ISO-8601: Represents the time in ISO format. * * @example '1660555844' or '2022-06-11T00:00:20Z' */ readonly ready_at: string; /** * @description Can be provided as two inputs. * Unix: Represents the time in seconds that has elapsed since Unix epoch (00:00:00 UTC on 1 January 1970). * ISO-8601: Represents the time in ISO format. * If this value is not supplied, the pickup item collected_at property will be null. * * @example '1660831392' or '2022-06-18T00:00:30Z' */ readonly collected_at?: string; readonly pickup_items: readonly components["schemas"]["PostRequestPickupItem"][]; }; readonly PostRequestPickupItem: { /** * @description The ID of the product. * @example 4 */ readonly order_product_id: number; /** * @description The quantity of an item. * @example 5 */ readonly quantity: number; }; readonly PutRequestPickup: { /** * @deprecated * @example 2 */ readonly id: number; /** * @description The ID of pickup. * @example 2 */ readonly pickup_id: number; /** * @description Can be provided as two inputs. * Unix: Represents the time in seconds that has elapsed since Unix epoch (00:00:00 UTC on 1 January 1970) * ISO-8601: Represents the time in ISO format. * * @example '1660555844' or '2022-06-11T00:00:20Z' */ readonly ready_at?: string; /** * @description Can be provided as two inputs. * Unix: Represents the time in seconds that has elapsed since Unix epoch (00:00:00 UTC on 1 January 1970). * ISO-8601: Represents the time in ISO format. * If this value is not supplied, the pickup item collected_at property will be null. * * @example '1660831392' or '2022-06-18T00:00:30Z' */ readonly collected_at?: string; }; readonly ErrorResponse: { /** * @description The HTTP status code generated by the origin server for this occurrence of the problem. * @example 422 */ readonly status?: number; /** * @description Human readable error message. * @example JSON data is missing or invalid */ readonly title?: string; /** @description URL identifying the error type. Dereferencing the URL leads to documentation about the error type. * */ readonly type?: string; /** @description Detailed summary describing the particular error. */ readonly errors?: { readonly [key: string]: unknown; }; }; }; responses: never; parameters: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: string; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly ContentType: string; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly "get-pickup": { readonly parameters: { readonly query?: { /** @description Comma separated list of order IDs. */ readonly "order_id:in"?: number; /** @description Comma separated list of pickup IDs. */ readonly "pickup_id:in"?: number; }; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description The request has been processed and a list of pickups has been returned successfully. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["Pickup"][]; }; }; }; }; }; readonly "put-pickup": { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": readonly components["schemas"]["PutRequestPickup"][]; }; }; readonly responses: { /** @description The request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["Pickup"][]; readonly meta?: { readonly [key: string]: unknown; }; }; }; }; /** @description Incorrect entity. Locations were not valid. This results from missing required fields, invalid data, or partial error. See the response for more details. * */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly "post-pickup": { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": readonly components["schemas"]["PostRequestPickup"][]; }; }; readonly responses: { /** @description The request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["Pickup"][]; readonly meta?: { readonly [key: string]: unknown; }; }; }; }; /** @description Incorrect entity. Locations were not valid. This results from missing required fields, invalid data, or partial error. See the response for more details. * */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly "delete-pickup": { readonly parameters: { readonly query: { /** @description Comma separated list of pickup IDs. */ readonly "id:in": number; }; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description No Content */ readonly 204: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; }