/** * Auto-generated file. Do not change. */ import { ClientImplementation } from '../types/Client'; import { ShipmentStatus } from './ShipmentStatus'; import { TransportationMode } from './TransportationMode'; import { LiftedAddress } from './Address'; import { LiftedBooking } from './Booking'; import { LiftedBookingAmendment } from './BookingAmendment'; import { LiftedBookingLineItem } from './BookingLineItem'; import { LiftedCarbonCalculation } from './CarbonCalculation'; import { LiftedCommercialInvoice } from './CommercialInvoice'; import { LiftedCompany } from './Company'; import { LiftedCompanyEntity } from './CompanyEntity'; import { LiftedContact } from './Contact'; import { LiftedCustomsEntry } from './CustomsEntry'; import { LiftedDocument } from './Document'; import { LiftedInvoice } from './Invoice'; import { LiftedLocation } from './Location'; import { LiftedOceanShipmentContainerLeg } from './OceanShipmentContainerLeg'; import { LiftedProduct } from './Product'; import { LiftedPurchaseOrder } from './PurchaseOrder'; import { LiftedPurchaseOrderLineItem } from './PurchaseOrderLineItem'; import { LiftedShipment } from './Shipment'; import { LiftedShipmentContainer } from './ShipmentContainer'; import { LiftedShipmentLeg } from './ShipmentLeg'; import { LiftedWebhookEvent } from './WebhookEvent'; import { TaskEither } from 'fp-ts/lib/TaskEither'; import { ErrorInfo } from '../types/ErrorInfo'; import { Page } from '../types/Page'; export declare enum BookingLineItemIndexSortTypes { CARGO_READY_DATE = "cargo_ready_date", CREATED_AT = "created_at" } export declare enum BookingLineItemIndexDirectionTypes { ASC = "asc", DESC = "desc" } export declare enum BookingsIndexSortTypes { CARGO_READY_DATE = "cargo_ready_date", CREATED_AT = "created_at" } export declare enum BookingsIndexDirectionTypes { ASC = "asc", DESC = "desc" } export declare enum BookingsIndexStatusTypes { BOOKED = "booked", SUBMITTED = "submitted" } export declare enum InvoiceIndexSortTypes { DUE_DATE = "due_date" } export declare enum InvoiceIndexDirectionTypes { ASC = "asc", DESC = "desc" } export declare enum InvoiceIndexStatusTypes { OUTSTANDING = "outstanding", PAST_DUE = "past_due", VOID = "void", PAID = "paid" } export declare enum PortsIndexPortTypeTypes { AIRPORT = "airport", RAILPORT = "railport", ROADPORT = "roadport", SEAPORT = "seaport" } export declare enum PurchaseOrderLineItemIndexSortTypes { CARGO_READY_DATE = "cargo_ready_date", CREATED_AT = "created_at" } export declare enum PurchaseOrderLineItemIndexDirectionTypes { ASC = "asc", DESC = "desc" } export declare enum PurchaseOrderIndexSortTypes { ID = "id" } export declare enum PurchaseOrderIndexDirectionTypes { ASC = "asc", DESC = "desc" } export declare enum PurchaseOrderIndexStatusTypes { OPEN = "open", CLOSED = "closed", CANCELLED = "cancelled" } export declare enum PurchaseOrderIndexRoleTypes { BUYER = "buyer", SELLER = "seller" } export declare enum ShipmentIndexSortTypes { ID = "id", TRANSPORTATION_MODE = "transportation_mode", STATUS = "status", UPDATED_AT = "updated_at" } export declare enum ShipmentIndexDirectionTypes { ASC = "asc", DESC = "desc" } /** * Generated API client for the Flexport v2 API * * This client is auto-generated from the OpenAPI documentation published by Flexport, with some corrections. * * @see https://api.flexport.com/docs/v2/flexport */ export declare type FlexportApiV2ClientInstance = { /** * Create and return a booking amendment - a request to change an existing booking. * * Returns: * - for status code 200: The created booking amendment * FIXME: Implement request body handling */ booking_amendment_create: () => TaskEither; /** * List all booking line items * * Returns a list of booking line items * * Returns: * - for status code 200: collection of booking line items */ booking_line_item_index: (params?: { ['page']?: number; ['per']?: number; ['sort']?: BookingLineItemIndexSortTypes; ['direction']?: BookingLineItemIndexDirectionTypes; ['f.purchase_order.id']?: number; }) => TaskEither>; /** * Create a booking line item * * Creates and returns a booking line item * * Returns: * - for status code 200: The created booking line item * FIXME: Implement request body handling */ booking_line_item_create: () => TaskEither; /** * Retrieves the details of a single booking line item. * * Returns a list of booking line items * * Returns: * - for status code 200: A collection of booking line items */ booking_line_item_show: (params: { ['id']: number; }) => TaskEither; /** * List all bookings * * Returns a list of bookings. * * Returns: * - for status code 200: collection of bookings */ bookings_index: (params?: { ['page']?: number; ['per']?: number; ['sort']?: BookingsIndexSortTypes; ['direction']?: BookingsIndexDirectionTypes; ['f.status']?: BookingsIndexStatusTypes; ['f.shipment.id']?: number; ['f.consignee_entity_ref']?: string; ['f.shipper_entity_ref']?: string; ['f.cargo_ready_date']?: string; ['f.cargo_ready_date.gt']?: string; ['f.cargo_ready_date.gte']?: string; ['f.cargo_ready_date.lt']?: string; ['f.cargo_ready_date.lte']?: string; ['f.created_at']?: string; ['f.created_at.gt']?: string; ['f.created_at.gte']?: string; ['f.created_at.lt']?: string; ['f.created_at.lte']?: string; ['f.metadata.YOUR_METADATA_KEY']?: string; }) => TaskEither>; /** * Create and return a booking * * Returns: * - for status code 200: The created booking * FIXME: Implement request body handling */ booking_create: () => TaskEither; /** * Retrieve a booking * * Retrieves the details of a single booking. * * Returns: * - for status code 200: Success */ booking_show: (params: { ['id']: number; }) => TaskEither; /** * Return a new carbon calculation. Rate limited to 1,000 requests per hour. * * Returns: * - for status code 200: The new carbon calculation * FIXME: Implement request body handling */ carbon_calculation_create: () => TaskEither; /** * List commercial invoices * * Returns a list of commercial invoices. * * Returns: * - for status code 200: Success */ commercial_invoices_index: (params?: { ['page']?: number; ['per']?: number; ['f.shipment.id']?: string; ['f.invoice_number']?: string; ['f.involved_party_seller_id']?: string; ['f.involved_party_seller_ref']?: string; }) => TaskEither>; /** * Create and return a new commercial invoice. Special permissions are required to use this endpoint, please contact your integration team for more details. * * Returns: * - for status code 200: The created commercial invoice * FIXME: Implement request body handling */ commercial_invoices_create: () => TaskEither; /** * Update an existing commercial invoice. Special permissions are required to use this endpoint, please contact your integration team for more details. * * Returns: * - for status code 200: The updated commercial invoice * FIXME: Implement request body handling */ commercial_invoices_update: () => TaskEither; /** * Retrieve a commercial invoice * * Retrieves the details of a single commercial invoice. * * Returns: * - for status code 200: Success */ commercial_invoices_show: (params: { ['id']: number; }) => TaskEither; /** * List customs entry objects * * Returns a list of customs entries. * * Returns: * - for status code 200: collection of customs entries */ customs_entry_index: (params?: { ['page']?: number; ['per']?: number; ['f.shipment.id']?: string; }) => TaskEither>; /** * Retrieve a customs entry * * Retrieves the details of a single customs entry. * * Returns: * - for status code 200: Success */ customs_entries_show: (params: { ['id']: number; }) => TaskEither; /** * List document objects * * Returns a list of all documents associated with shipments. * * Returns: * - for status code 200: collection of documents */ documents_index: (params?: { ['page']?: number; ['per']?: number; ['f.shipment.id']?: string; ['f.document_type']?: string; ['f.archived_at.exists']?: string; ['f.uploaded_at.gt']?: string; ['f.uploaded_at.lt']?: string; ['f.uploaded_at.gte']?: string; ['f.uploaded_at.lte']?: string; }) => TaskEither>; /** * Retrieve a document * * Retrieves the details of a single document. * * Returns: * - for status code 200: Success */ documents_show: (params: { ['id']: number; }) => TaskEither; /** * Download a document * * Retrieves the contents of a specified file. Returns the file as a stream of bytes. * * Returns: * - for status code 200: Success * FIXME: Only the first response type is handled */ documents_download: (params: { ['id']: number; }) => TaskEither; /** * List all webhook events * * Returns a list of all events delivered to any webhook registered by this client * * Returns: * - for status code 200: Success */ events_index: (params?: { ['f.occurred_at.gte']?: string; ['f.occurred_at.lte']?: string; ['f.data.shipment.id']?: number; ['f.data.resource._object']?: string; }) => TaskEither>; /** * Retrieve a single webhook event * * Returns the webhook event with ID ":id" * * Returns: * - for status code 200: Success */ events_show: () => TaskEither; /** * List all invoices * * Returns a list of invoices. * * Returns: * - for status code 200: collection of invoices */ invoice_index: (params?: { ['page']?: number; ['per']?: number; ['sort']?: InvoiceIndexSortTypes; ['direction']?: InvoiceIndexDirectionTypes; ['f.status']?: InvoiceIndexStatusTypes; ['f.shipment.id']?: number; ['f.billed_directly_to_client']?: boolean; ['f.entity.id']?: number; ['f.entity.ref']?: string; ['f.name']?: string; ['f.issued_at.gt']?: string; ['f.issued_at.lt']?: string; ['f.last_updated_at.gt']?: string; ['f.last_updated_at.lt']?: string; ['f.client_id']?: number; ['f.shipment_id']?: number; }) => TaskEither>; /** * Retrieve an invoice * * Retrieves the details of a single invoice * * Returns: * - for status code 200: Success */ invoices_show: (params: { ['id']: number; }) => TaskEither; /** * List company objects * * Returns a list of companies in the network. * * Returns: * - for status code 200: collection of companies */ network_company_index: (params?: { ['page']?: number; ['per']?: number; ['f.ref']?: string; ['f.metadata.YOUR_METADATA_KEY']?: string; }) => TaskEither>; /** * Create a new company object * * Returns: * - for status code 200: The created company * FIXME: Implement request body handling */ network_company_create: () => TaskEither; /** * Retrieve a company * * Retrieves the details of a single company. * * Returns: * - for status code 200: Success */ network_company_show: (params: { ['id']: number; }) => TaskEither; /** * Update an existing company * * Returns: * - for status code 200: The updated company * FIXME: Implement request body handling */ network_company_update: (params: { ['id']: number; }) => TaskEither; /** * List of company entity objects * * Returns a list of the company entity objects in the network. * * Returns: * - for status code 200: collection of company entities */ company_entity_index: (params?: { ['page']?: number; ['per']?: number; ['f.ref']?: string; ['f.company_id']?: string; ['f.company_ref']?: string; }) => TaskEither>; /** * Create and return a new company entity * * Returns: * - for status code 200: The created company entity * FIXME: Implement request body handling */ network_company_entity_create: () => TaskEither; /** * Retrieve a company entity * * Retrieves the details of a single company entity * * Returns: * - for status code 200: Success */ network_company_entity_show: (params: { ['id']: number; }) => TaskEither; /** * Update a company entity * * Returns: * - for status code 200: Success * FIXME: Implement request body handling */ network_company_entity_update: (params: { ['id']: number; }) => TaskEither; /** * List contact objects * * Returns a list of contacts in the network. * * Returns: * - for status code 200: collection of contacts */ network_contact_index: (params?: { ['page']?: number; ['per']?: number; ['f.company_ref']?: string; ['f.company.id']?: string; ['f.location.id']?: string; }) => TaskEither>; /** * Create a new contact object * * Returns: * - for status code 200: The created contact * FIXME: Implement request body handling */ network_contact_create: () => TaskEither; /** * Retrieve a contact * * Retrieves the details of a single contact. * * Returns: * - for status code 200: Success */ network_contact_show: (params: { ['id']: number; }) => TaskEither; /** * Update an existing contact * * Returns: * - for status code 200: The updated contact * FIXME: Implement request body handling */ network_contact_update: (params: { ['id']: number; }) => TaskEither; /** * List of location objects * * Returns a list of location objects in the network. * * Returns: * - for status code 200: collection of locations */ location_index: (params?: { ['page']?: number; ['per']?: number; ['f.ref']?: string; ['f.company_ref']?: string; ['f.company.id']?: string; ['f.contact.id']?: string; ['f.metadata.YOUR_METADATA_KEY']?: string; }) => TaskEither>; /** * Create and return a new location * * Returns: * - for status code 200: The created location * FIXME: Implement request body handling */ network_location_create: () => TaskEither; /** * Retrieve a location by id * * Retrieves the details of a single location * * Returns: * - for status code 200: Success */ network_location_show: (params: { ['id']: number; }) => TaskEither; /** * Update a network location * * Returns: * - for status code 200: Success * FIXME: Implement request body handling */ location_update: (params: { ['id']: number; }) => TaskEither; /** * Retrieve your company * * Retrieves the details of your own organization. * * Returns: * - for status code 200: Success */ network_company_me: () => TaskEither; /** * List all containers. * * Returns a list of containers. The containers are sorted descending by creation date. * * Returns: * - for status code 200: Success */ ocean_shipment_legs_index: (params?: { ['page']?: number; ['per']?: number; ['f.leg.id']?: number; ['f.shipment_container.id']?: number; ['f.shipment_container.container_number']?: string; }) => TaskEither>; /** * Retrieve a shipment leg * * Returns a list of containers. The containers are sorted descending by creation date. * * Returns: * - for status code 200: Success */ ocean_shipment_legs_show: () => TaskEither; /** * List all containers. * * Returns a list of containers. The containers are sorted descending by creation date. * * Returns: * - for status code 200: Success */ container_list: (params?: { ['page']?: number; ['per']?: number; ['f.shipment.id']?: number; ['f.container_number']?: string; ['f.metadata.YOUR_METADATA_KEY']?: string; }) => TaskEither>; /** * Retrieve a container. * * Retrieves the details of a single container. * * Returns: * - for status code 200: Success */ container_show: (params: { ['id']: number; }) => TaskEither; /** * List of ports * * Returns: * - for status code 200: collection of ports */ ports_index: (params?: { ['page']?: number; ['per']?: number; ['f.port_type']?: PortsIndexPortTypeTypes; ['f.unlocode']?: string; }) => TaskEither>; /** * List all products for a client * * Returns a list of all products belonging to this client * * Returns: * - for status code 200: Success */ product_index: (params?: { ['f.sku']?: string; ['f.archived_at.exists']?: boolean; ['f.product_properties.TYPE']?: string; }) => TaskEither>; /** * Create a product * * Create a new product for this client using the request payload * * Returns: * - for status code 200: Created * FIXME: Implement request body handling */ product_create: () => TaskEither; /** * Retrieve a single product * * Returns the client's product with this ID * * Returns: * - for status code 200: Success */ product_show: (params: { ['id']: number; }) => TaskEither; /** * Update a product * * Update this product to represent the request payload * * Returns: * - for status code 200: Updated * FIXME: Implement request body handling */ product_update: (params: { ['id']: number; }) => TaskEither; /** * List all purchase order line items * * Returns a list of purchase order line items * * Returns: * - for status code 200: collection of purchase order line items */ purchase_order_line_item_index: (params?: { ['page']?: number; ['per']?: number; ['sort']?: PurchaseOrderLineItemIndexSortTypes; ['direction']?: PurchaseOrderLineItemIndexDirectionTypes; ['f.purchase_order.id']?: number; ['f.line_item_number']?: string; ['f.item_key']?: string; }) => TaskEither>; /** * Retrieve a purchase order line item * * Returns the details of a purchase order line item * * Returns: * - for status code 200: collection of purchase order line items */ purchase_order_line_item_show: (params: { ['id']: number; }) => TaskEither; /** * List all purchase orders * * Returns a list of purchase orders * * Returns: * - for status code 200: collection of purchase orders */ purchase_order_index: (params?: { ['page']?: number; ['per']?: number; ['sort']?: PurchaseOrderIndexSortTypes; ['direction']?: PurchaseOrderIndexDirectionTypes; ['f.archived_at.exists']?: boolean; ['f.status']?: PurchaseOrderIndexStatusTypes; ['f.buyer_ref']?: string; ['f.seller_ref']?: string; ['f.role']?: PurchaseOrderIndexRoleTypes; ['f.shipment.id']?: number; ['f.name']?: string; }) => TaskEither>; /** * Retrieve a purchase order * * Retrieves the details of a single purchase order. * * Returns: * - for status code 200: Success */ purchase_order_show: (params: { ['id']: number; }) => TaskEither; /** * List all shipment route legs * * Returns a list of shipment route legs. The legs are sorted descending by creation date. * * Returns: * - for status code 200: Success */ shipment_leg_index: (params?: { ['page']?: number; ['per']?: number; ['f.shipment.id']?: number; ['f.transportation_mode']?: number; }) => TaskEither>; /** * Retrieve a shipment route leg * * Returns: * - for status code 200: Success */ shipment_leg_show: () => TaskEither; /** * List all shipments * * Returns a list of shipments. * * Returns: * - for status code 200: collection of shipments */ shipment_index: (params?: { ['page']?: number; ['per']?: number; ['sort']?: ShipmentIndexSortTypes; ['direction']?: ShipmentIndexDirectionTypes; ['f.transportation_mode']?: TransportationMode; ['f.status']?: ShipmentStatus; ['f.statuses.any']?: ShipmentStatus; ['f.container_number']?: string; ['f.purchase_order']?: string; ['f.sku']?: string; ['f.updated_at.gt']?: string; ['f.updated_at.lt']?: string; ['f.master_bill_number']?: string; ['f.house_bill_number']?: string; ['f.consignee_external_ref']?: string; ['f.metadata.YOUR_METADATA_KEY']?: string; ['f.wants_freight_management_bco']?: boolean; ['f.wants_flexport_freight']?: boolean; ['f.wants_import_customs_service']?: boolean; ['f.wants_export_customs_service']?: boolean; }) => TaskEither>; /** * Retrieve a shipment * * Retrieves the details of a single shipment. * * Returns: * - for status code 200: Success */ shipment_show: (params: { ['id']: number; }) => TaskEither; /** * Update an existing shipment * * Returns: * - for status code 200: The updated shipment * FIXME: Implement request body handling */ shipment_update: (params: { ['id']: number; }) => TaskEither; }; export declare const flexportApiV2: (apiClient: ClientImplementation) => FlexportApiV2ClientInstance;