From 15c06e888e690417f99f1a2aa1dff27cc9c79fae Mon Sep 17 00:00:00 2001 From: Daniel K Date: Sun, 4 Jun 2023 08:07:39 -0700 Subject: [PATCH] (add) new API types and carrier connection config options --- karrio/graphql/queries.ts | 21 +------ karrio/graphql/types.ts | 69 +++-------------------- karrio/rest/generated/api.ts | 58 +++++++++---------- karrio/rest/generated/base.ts | 4 +- karrio/rest/generated/common.ts | 4 +- karrio/rest/generated/configuration.ts | 4 +- karrio/rest/generated/index.ts | 4 +- src/components/connect-provider-modal.tsx | 28 +++++---- 8 files changed, 65 insertions(+), 127 deletions(-) diff --git a/karrio/graphql/queries.ts b/karrio/graphql/queries.ts index 7f679978..0c9d4027 100644 --- a/karrio/graphql/queries.ts +++ b/karrio/graphql/queries.ts @@ -2166,25 +2166,8 @@ export const GET_USER_CONNECTIONS = gql`query get_user_connections { active metadata capabilities - username - password - access_license_number - account_number - account_country_code - config - } - ... on UPSFreightSettingsType { - id - carrier_id - carrier_name - display_name - test_mode - active - metadata - capabilities - username - password - access_license_number + client_id + client_secret account_number account_country_code config diff --git a/karrio/graphql/types.ts b/karrio/graphql/types.ts index be9dbfca..2efa50ac 100644 --- a/karrio/graphql/types.ts +++ b/karrio/graphql/types.ts @@ -2815,6 +2815,7 @@ export interface get_user_connections_user_connections_DPDHLSettingsType { zt_id: string | null; zt_password: string | null; account_number: string | null; + config: any | null; services: get_user_connections_user_connections_DPDHLSettingsType_services[] | null; } @@ -3093,27 +3094,8 @@ export interface get_user_connections_user_connections_UPSSettingsType { active: boolean; metadata: any | null; capabilities: string[]; - username: string; - password: string; - access_license_number: string; - account_number: string | null; - account_country_code: string | null; - config: any | null; -} - -export interface get_user_connections_user_connections_UPSFreightSettingsType { - __typename: "UPSFreightSettingsType"; - id: string; - carrier_id: string; - carrier_name: string; - display_name: string; - test_mode: boolean; - active: boolean; - metadata: any | null; - capabilities: string[]; - username: string; - password: string; - access_license_number: string; + client_id: string; + client_secret: string; account_number: string | null; account_country_code: string | null; config: any | null; @@ -3185,7 +3167,7 @@ export interface get_user_connections_user_connections_YunExpressSettingsType { config: any | null; } -export type get_user_connections_user_connections = get_user_connections_user_connections_AmazonMwsSettingsType | get_user_connections_user_connections_AramexSettingsType | get_user_connections_user_connections_AustraliaPostSettingsType | get_user_connections_user_connections_BoxKnightSettingsType | get_user_connections_user_connections_CanadaPostSettingsType | get_user_connections_user_connections_CanparSettingsType | get_user_connections_user_connections_ChronopostSettingsType | get_user_connections_user_connections_DHLExpressSettingsType | get_user_connections_user_connections_DHLPolandSettingsType | get_user_connections_user_connections_DHLUniversalSettingsType | get_user_connections_user_connections_DicomSettingsType | get_user_connections_user_connections_DPDSettingsType | get_user_connections_user_connections_DPDHLSettingsType | get_user_connections_user_connections_EShipperSettingsType | get_user_connections_user_connections_EasyPostSettingsType | get_user_connections_user_connections_FedexSettingsType | get_user_connections_user_connections_FreightcomSettingsType | get_user_connections_user_connections_GenericSettingsType | get_user_connections_user_connections_GEODISSettingsType | get_user_connections_user_connections_LaPosteSettingsType | get_user_connections_user_connections_NationexSettingsType | get_user_connections_user_connections_PurolatorSettingsType | get_user_connections_user_connections_RoadieSettingsType | get_user_connections_user_connections_RoyalMailSettingsType | get_user_connections_user_connections_SendleSettingsType | get_user_connections_user_connections_SFExpressSettingsType | get_user_connections_user_connections_TNTSettingsType | get_user_connections_user_connections_UPSSettingsType | get_user_connections_user_connections_UPSFreightSettingsType | get_user_connections_user_connections_USPSSettingsType | get_user_connections_user_connections_USPSInternationalSettingsType | get_user_connections_user_connections_YanwenSettingsType | get_user_connections_user_connections_YunExpressSettingsType; +export type get_user_connections_user_connections = get_user_connections_user_connections_AmazonMwsSettingsType | get_user_connections_user_connections_AramexSettingsType | get_user_connections_user_connections_AustraliaPostSettingsType | get_user_connections_user_connections_BoxKnightSettingsType | get_user_connections_user_connections_CanadaPostSettingsType | get_user_connections_user_connections_CanparSettingsType | get_user_connections_user_connections_ChronopostSettingsType | get_user_connections_user_connections_DHLExpressSettingsType | get_user_connections_user_connections_DHLPolandSettingsType | get_user_connections_user_connections_DHLUniversalSettingsType | get_user_connections_user_connections_DicomSettingsType | get_user_connections_user_connections_DPDSettingsType | get_user_connections_user_connections_DPDHLSettingsType | get_user_connections_user_connections_EShipperSettingsType | get_user_connections_user_connections_EasyPostSettingsType | get_user_connections_user_connections_FedexSettingsType | get_user_connections_user_connections_FreightcomSettingsType | get_user_connections_user_connections_GenericSettingsType | get_user_connections_user_connections_GEODISSettingsType | get_user_connections_user_connections_LaPosteSettingsType | get_user_connections_user_connections_NationexSettingsType | get_user_connections_user_connections_PurolatorSettingsType | get_user_connections_user_connections_RoadieSettingsType | get_user_connections_user_connections_RoyalMailSettingsType | get_user_connections_user_connections_SendleSettingsType | get_user_connections_user_connections_SFExpressSettingsType | get_user_connections_user_connections_TNTSettingsType | get_user_connections_user_connections_UPSSettingsType | get_user_connections_user_connections_USPSSettingsType | get_user_connections_user_connections_USPSInternationalSettingsType | get_user_connections_user_connections_YanwenSettingsType | get_user_connections_user_connections_YunExpressSettingsType; export interface get_user_connections { user_connections: get_user_connections_user_connections[]; @@ -5055,7 +5037,6 @@ export interface CreateCarrierConnectionMutationInput { sf_express?: SFExpressSettingsInput | null; tnt?: TNTSettingsInput | null; ups?: UPSSettingsInput | null; - ups_freight?: UPSFreightSettingsInput | null; usps?: USPSSettingsInput | null; usps_international?: USPSInternationalSettingsInput | null; yanwen?: YanwenSettingsInput | null; @@ -5449,24 +5430,9 @@ export interface UPSSettingsInput { active?: boolean | null; config?: any | null; metadata?: any | null; - username: string; - password: string; - access_license_number: string; - account_number: string; - test_mode?: boolean | null; - carrier_id: string; -} - -// null -export interface UPSFreightSettingsInput { - account_country_code?: string | null; - active?: boolean | null; - config?: any | null; - metadata?: any | null; - username: string; - password: string; - access_license_number: string; - account_number: string; + client_id: string; + client_secret: string; + account_number?: string | null; test_mode?: boolean | null; carrier_id: string; } @@ -5551,7 +5517,6 @@ export interface UpdateCarrierConnectionMutationInput { sf_express?: UpdateSFExpressSettingsInput | null; tnt?: UpdateTNTSettingsInput | null; ups?: UpdateUPSSettingsInput | null; - ups_freight?: UpdateUPSFreightSettingsInput | null; usps?: UpdateUSPSSettingsInput | null; usps_international?: UpdateUSPSInternationalSettingsInput | null; yanwen?: UpdateYanwenSettingsInput | null; @@ -5963,24 +5928,8 @@ export interface UpdateUPSSettingsInput { active?: boolean | null; config?: any | null; metadata?: any | null; - username?: string | null; - password?: string | null; - access_license_number?: string | null; - account_number?: string | null; - test_mode?: boolean | null; - carrier_id?: string | null; -} - -// null -export interface UpdateUPSFreightSettingsInput { - id: string; - account_country_code?: string | null; - active?: boolean | null; - config?: any | null; - metadata?: any | null; - username?: string | null; - password?: string | null; - access_license_number?: string | null; + client_id?: string | null; + client_secret?: string | null; account_number?: string | null; test_mode?: boolean | null; carrier_id?: string | null; diff --git a/karrio/rest/generated/api.ts b/karrio/rest/generated/api.ts index ea89e2db..fcfb346c 100644 --- a/karrio/rest/generated/api.ts +++ b/karrio/rest/generated/api.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * Karrio API - * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.4.4`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. + * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.5`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. * - * The version of the OpenAPI document: 2023.4.4 + * The version of the OpenAPI document: 2023.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -1032,7 +1032,7 @@ export interface CarrierSettings { */ 'carrier_id': string; /** - * Indicates a carrier (type) * `amazon_mws` - amazon_mws * `aramex` - aramex * `australiapost` - australiapost * `boxknight` - boxknight * `canadapost` - canadapost * `canpar` - canpar * `chronopost` - chronopost * `dhl_express` - dhl_express * `dhl_poland` - dhl_poland * `dhl_universal` - dhl_universal * `dicom` - dicom * `dpd` - dpd * `dpdhl` - dpdhl * `easypost` - easypost * `eshipper` - eshipper * `fedex` - fedex * `freightcom` - freightcom * `generic` - generic * `geodis` - geodis * `laposte` - laposte * `nationex` - nationex * `purolator` - purolator * `roadie` - roadie * `royalmail` - royalmail * `sendle` - sendle * `sf_express` - sf_express * `tnt` - tnt * `ups` - ups * `ups_freight` - ups_freight * `usps` - usps * `usps_international` - usps_international * `yanwen` - yanwen * `yunexpress` - yunexpress + * Indicates a carrier (type) * `amazon_mws` - amazon_mws * `aramex` - aramex * `australiapost` - australiapost * `boxknight` - boxknight * `canadapost` - canadapost * `canpar` - canpar * `chronopost` - chronopost * `dhl_express` - dhl_express * `dhl_poland` - dhl_poland * `dhl_universal` - dhl_universal * `dicom` - dicom * `dpd` - dpd * `dpdhl` - dpdhl * `easypost` - easypost * `eshipper` - eshipper * `fedex` - fedex * `freightcom` - freightcom * `generic` - generic * `geodis` - geodis * `laposte` - laposte * `nationex` - nationex * `purolator` - purolator * `roadie` - roadie * `royalmail` - royalmail * `sendle` - sendle * `sf_express` - sf_express * `tnt` - tnt * `ups` - ups * `usps` - usps * `usps_international` - usps_international * `yanwen` - yanwen * `yunexpress` - yunexpress * @type {string} * @memberof CarrierSettings */ @@ -1104,7 +1104,6 @@ export const CarrierSettingsCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -12219,7 +12218,7 @@ export interface TrackingData { */ 'tracking_number': string; /** - * The tracking carrier * `amazon_mws` - amazon_mws * `aramex` - aramex * `australiapost` - australiapost * `boxknight` - boxknight * `canadapost` - canadapost * `canpar` - canpar * `chronopost` - chronopost * `dhl_express` - dhl_express * `dhl_poland` - dhl_poland * `dhl_universal` - dhl_universal * `dicom` - dicom * `dpd` - dpd * `dpdhl` - dpdhl * `fedex` - fedex * `generic` - generic * `geodis` - geodis * `laposte` - laposte * `nationex` - nationex * `purolator` - purolator * `roadie` - roadie * `royalmail` - royalmail * `sendle` - sendle * `sf_express` - sf_express * `tnt` - tnt * `ups` - ups * `ups_freight` - ups_freight * `usps` - usps * `usps_international` - usps_international * `yanwen` - yanwen * `yunexpress` - yunexpress + * The tracking carrier * `amazon_mws` - amazon_mws * `aramex` - aramex * `australiapost` - australiapost * `boxknight` - boxknight * `canadapost` - canadapost * `canpar` - canpar * `chronopost` - chronopost * `dhl_express` - dhl_express * `dhl_poland` - dhl_poland * `dhl_universal` - dhl_universal * `dicom` - dicom * `dpd` - dpd * `dpdhl` - dpdhl * `fedex` - fedex * `generic` - generic * `geodis` - geodis * `laposte` - laposte * `nationex` - nationex * `purolator` - purolator * `roadie` - roadie * `royalmail` - royalmail * `sendle` - sendle * `sf_express` - sf_express * `tnt` - tnt * `ups` - ups * `usps` - usps * `usps_international` - usps_international * `yanwen` - yanwen * `yunexpress` - yunexpress * @type {string} * @memberof TrackingData */ @@ -12242,6 +12241,12 @@ export interface TrackingData { * @memberof TrackingData */ 'info'?: TrackerUpdateDataInfo | null; + /** + * The carrier user metadata. + * @type {{ [key: string]: any; }} + * @memberof TrackingData + */ + 'metadata'?: { [key: string]: any; }; } export const TrackingDataCarrierNameEnum = { @@ -12270,7 +12275,6 @@ export const TrackingDataCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -14692,7 +14696,7 @@ export const CarriersApiAxiosParamCreator = function (configuration?: Configurat /** * Retrieve a carrier\'s services * @summary Get carrier services - * @param {string} carrierName The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} carrierName The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -14741,7 +14745,7 @@ export const CarriersApiAxiosParamCreator = function (configuration?: Configurat * Returns the list of configured carriers * @summary List all carriers * @param {boolean} [active] - * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {boolean} [systemOnly] * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14809,7 +14813,7 @@ export const CarriersApiFp = function(configuration?: Configuration) { /** * Retrieve a carrier\'s services * @summary Get carrier services - * @param {string} carrierName The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} carrierName The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -14821,7 +14825,7 @@ export const CarriersApiFp = function(configuration?: Configuration) { * Returns the list of configured carriers * @summary List all carriers * @param {boolean} [active] - * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {boolean} [systemOnly] * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14870,7 +14874,7 @@ export const CarriersApiFactory = function (configuration?: Configuration, baseP */ export interface CarriersApiGetServicesRequest { /** - * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @type {string} * @memberof CarriersApiGetServices */ @@ -14891,7 +14895,7 @@ export interface CarriersApiListRequest { readonly active?: boolean /** - * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @type {string} * @memberof CarriersApiList */ @@ -18106,7 +18110,7 @@ export interface ProxyApiBuyLabelRequest { export interface ProxyApiCancelPickupRequest { /** * - * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'ups_freight' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} + * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} * @memberof ProxyApiCancelPickup */ readonly carrierName: CancelPickupCarrierNameEnum @@ -18162,7 +18166,7 @@ export interface ProxyApiGetTrackingRequest { export interface ProxyApiSchedulePickupRequest { /** * - * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'ups_freight' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} + * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} * @memberof ProxyApiSchedulePickup */ readonly carrierName: SchedulePickupCarrierNameEnum @@ -18183,7 +18187,7 @@ export interface ProxyApiSchedulePickupRequest { export interface ProxyApiTrackShipmentRequest { /** * - * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'fedex' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'ups_freight' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} + * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'fedex' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} * @memberof ProxyApiTrackShipment */ readonly carrierName: TrackShipmentCarrierNameEnum @@ -18211,7 +18215,7 @@ export interface ProxyApiTrackShipmentRequest { export interface ProxyApiUpdatePickupRequest { /** * - * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'ups_freight' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} + * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} * @memberof ProxyApiUpdatePickup */ readonly carrierName: UpdatePickupCarrierNameEnum @@ -18232,7 +18236,7 @@ export interface ProxyApiUpdatePickupRequest { export interface ProxyApiVoidLabelRequest { /** * - * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'ups_freight' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} + * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'easypost' | 'eshipper' | 'fedex' | 'freightcom' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} * @memberof ProxyApiVoidLabel */ readonly carrierName: VoidLabelCarrierNameEnum @@ -18382,7 +18386,6 @@ export const CancelPickupCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -18421,7 +18424,6 @@ export const SchedulePickupCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -18457,7 +18459,6 @@ export const TrackShipmentCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -18496,7 +18497,6 @@ export const UpdatePickupCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -18535,7 +18535,6 @@ export const VoidLabelCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', @@ -18652,7 +18651,7 @@ export const ShipmentsApiAxiosParamCreator = function (configuration?: Configura * Retrieve all shipments. * @summary List all shipments * @param {string} [address] - * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {string} [createdAfter] * @param {string} [createdBefore] * @param {string} [keyword] @@ -19003,7 +19002,7 @@ export const ShipmentsApiFp = function(configuration?: Configuration) { * Retrieve all shipments. * @summary List all shipments * @param {string} [address] - * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {string} [createdAfter] * @param {string} [createdBefore] * @param {string} [keyword] @@ -19194,7 +19193,7 @@ export interface ShipmentsApiListRequest { readonly address?: string /** - * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @type {string} * @memberof ShipmentsApiList */ @@ -19583,7 +19582,7 @@ export const TrackersApiAxiosParamCreator = function (configuration?: Configurat /** * Retrieve all shipment trackers. * @summary List all package trackers - * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {string} [createdAfter] * @param {string} [createdBefore] * @param {string} [status] Valid tracker status. <br/>Values: `pending`, `unknown`, `delivered`, `on_hold`, `in_transit`, `delivery_delayed`, `out_for_delivery`, `ready_for_pickup`, `delivery_failed` @@ -19842,7 +19841,7 @@ export const TrackersApiFp = function(configuration?: Configuration) { /** * Retrieve all shipment trackers. * @summary List all package trackers - * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * @param {string} [carrierName] The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @param {string} [createdAfter] * @param {string} [createdBefore] * @param {string} [status] Valid tracker status. <br/>Values: `pending`, `unknown`, `delivered`, `on_hold`, `in_transit`, `delivery_delayed`, `out_for_delivery`, `ready_for_pickup`, `delivery_failed` @@ -20005,7 +20004,7 @@ export interface TrackersApiCreateRequest { /** * - * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'fedex' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'ups_freight' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} + * @type {'amazon_mws' | 'aramex' | 'australiapost' | 'boxknight' | 'canadapost' | 'canpar' | 'chronopost' | 'dhl_express' | 'dhl_poland' | 'dhl_universal' | 'dicom' | 'dpd' | 'dpdhl' | 'fedex' | 'generic' | 'geodis' | 'laposte' | 'nationex' | 'purolator' | 'roadie' | 'royalmail' | 'sendle' | 'sf_express' | 'tnt' | 'ups' | 'usps' | 'usps_international' | 'yanwen' | 'yunexpress'} * @memberof TrackersApiCreate */ readonly carrierName2: CreateCarrierNameEnum @@ -20032,7 +20031,7 @@ export interface TrackersApiCreateRequest { */ export interface TrackersApiListRequest { /** - * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `ups_freight`, `usps`, `usps_international`, `yanwen`, `yunexpress` + * The unique carrier slug. <br/>Values: `amazon_mws`, `aramex`, `australiapost`, `boxknight`, `canadapost`, `canpar`, `chronopost`, `dhl_express`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpdhl`, `easypost`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `laposte`, `nationex`, `purolator`, `roadie`, `royalmail`, `sendle`, `sf_express`, `tnt`, `ups`, `usps`, `usps_international`, `yanwen`, `yunexpress` * @type {string} * @memberof TrackersApiList */ @@ -20226,7 +20225,6 @@ export const CreateCarrierNameEnum = { SfExpress: 'sf_express', Tnt: 'tnt', Ups: 'ups', - UpsFreight: 'ups_freight', Usps: 'usps', UspsInternational: 'usps_international', Yanwen: 'yanwen', diff --git a/karrio/rest/generated/base.ts b/karrio/rest/generated/base.ts index 47bd8bf1..b7bd4822 100644 --- a/karrio/rest/generated/base.ts +++ b/karrio/rest/generated/base.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * Karrio API - * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.4.4`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. + * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.5`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. * - * The version of the OpenAPI document: 2023.4.4 + * The version of the OpenAPI document: 2023.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/karrio/rest/generated/common.ts b/karrio/rest/generated/common.ts index 014280bf..67c94ca3 100644 --- a/karrio/rest/generated/common.ts +++ b/karrio/rest/generated/common.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * Karrio API - * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.4.4`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. + * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.5`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. * - * The version of the OpenAPI document: 2023.4.4 + * The version of the OpenAPI document: 2023.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/karrio/rest/generated/configuration.ts b/karrio/rest/generated/configuration.ts index fc689e82..c9d13122 100644 --- a/karrio/rest/generated/configuration.ts +++ b/karrio/rest/generated/configuration.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * Karrio API - * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.4.4`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. + * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.5`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. * - * The version of the OpenAPI document: 2023.4.4 + * The version of the OpenAPI document: 2023.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/karrio/rest/generated/index.ts b/karrio/rest/generated/index.ts index 83ec6037..7c1862cd 100644 --- a/karrio/rest/generated/index.ts +++ b/karrio/rest/generated/index.ts @@ -2,9 +2,9 @@ /* eslint-disable */ /** * Karrio API - * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.4.4`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. + * ## API Reference Karrio is an open source multi-carrier shipping API that simplifies the integration of logistic carrier services. The Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The Karrio API differs for every account as we release new versions. These docs are customized to your version of the API. ## Versioning When backwards-incompatible changes are made to the API, a new, dated version is released. The current version is `2023.5`. Read our API changelog and to learn more about backwards compatibility. As a precaution, use API versioning to check a new API version before committing to an upgrade. ## Environments The Karrio API offer the possibility to create and retrieve certain objects in `test_mode`. In development, it is therefore possible to add carrier connections, get live rates, buy labels, create trackers and schedule pickups in `test_mode`. ## Pagination All top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses, list shipments, and list trackers. These list API methods share a common structure, taking at least these two parameters: limit, and offset. Karrio utilizes offset-based pagination via the offset and limit parameters. Both parameters take a number as value (see below) and return objects in reverse chronological order. The offset parameter returns objects listed after an index. The limit parameter take a limit on the number of objects to be returned from 1 to 100. ```json { \"count\": 100, \"next\": \"/v1/shipments?limit=25&offset=50\", \"previous\": \"/v1/shipments?limit=25&offset=25\", \"results\": [ { ... }, ] } ``` ## Metadata Updateable Karrio objects—including Shipment and Order—have a metadata parameter. You can use this parameter to attach key-value data to these Karrio objects. Metadata is useful for storing additional, structured information on an object. As an example, you could store your user\'s full name and corresponding unique identifier from your system on a Karrio Order object. Do not store any sensitive information as metadata. ## Authentication API keys are used to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Basic Auth. Provide your API token as the basic auth username value. You do not need to provide a password. ```shell $ curl https://instance.api.com/v1/shipments \\ -u key_xxxxxx: # The colon prevents curl from asking for a password. ``` If you need to authenticate via bearer auth (e.g., for a cross-origin request), use `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). API requests without authentication will also fail. * - * The version of the OpenAPI document: 2023.4.4 + * The version of the OpenAPI document: 2023.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/components/connect-provider-modal.tsx b/src/components/connect-provider-modal.tsx index 42c57120..2dbe5f6e 100644 --- a/src/components/connect-provider-modal.tsx +++ b/src/components/connect-provider-modal.tsx @@ -10,9 +10,9 @@ import InputField from '@/components/generic/input-field'; import Notifier, { Notify } from '@/components/notifier'; import { MetadataObjectTypeEnum } from 'karrio/graphql'; import { useAPIMetadata } from '@/context/api-metadata'; -import { Loading } from '@/components/loader'; import { useAppMode } from '@/context/app-mode'; import { Disclosure } from '@headlessui/react'; +import { Loading } from '@/components/loader'; type CarrierNameType = CarrierSettingsCarrierNameEnum | NoneEnum; type OperationType = { @@ -422,13 +422,6 @@ const ConnectProviderModal: React.FC = ({ childre required={field("user_token").required} />} - {field("access_license_number").exists && } - {field("account_pin").exists && = ({ childre } + {"skip_service_filter" in connection_configs[carrier_name.toString()] && +
+
+ +
+
} + {"service_suffix" in connection_configs[carrier_name.toString()] &&