From 624eed98b67b298ac512002ac8e34b45d6b391a4 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Thu, 4 Mar 2021 15:18:32 +0700 Subject: [PATCH] feat: init api models --- .../aplus-content-api-model/.gitignore | 4 + .../aplus-content-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/aplus-content-api-model/api.ts | 2422 ++++++++++++ .../aplus-content-api-model/base.ts | 71 + .../aplus-content-api-model/common.ts | 131 + .../aplus-content-api-model/configuration.ts | 101 + .../aplus-content-api-model/git_push.sh | 58 + .../aplus-content-api-model/index.ts | 18 + .../authorization-api-model/.gitignore | 4 + .../authorization-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/authorization-api-model/api.ts | 209 + .../authorization-api-model/base.ts | 71 + .../authorization-api-model/common.ts | 131 + .../authorization-api-model/configuration.ts | 101 + .../authorization-api-model/git_push.sh | 58 + .../authorization-api-model/index.ts | 18 + .../catalog-items-api-model/.gitignore | 4 + .../catalog-items-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/catalog-items-api-model/api.ts | 1507 +++++++ .../catalog-items-api-model/base.ts | 71 + .../catalog-items-api-model/common.ts | 131 + .../catalog-items-api-model/configuration.ts | 101 + .../catalog-items-api-model/git_push.sh | 58 + .../catalog-items-api-model/index.ts | 18 + .../.gitignore | 4 + .../.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + .../fba-inbound-eligibility-api-model/api.ts | 281 ++ .../fba-inbound-eligibility-api-model/base.ts | 71 + .../common.ts | 131 + .../configuration.ts | 101 + .../git_push.sh | 58 + .../index.ts | 18 + .../fba-inventory-api-model/.gitignore | 4 + .../fba-inventory-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/fba-inventory-api-model/api.ts | 525 +++ .../fba-inventory-api-model/base.ts | 71 + .../fba-inventory-api-model/common.ts | 131 + .../fba-inventory-api-model/configuration.ts | 101 + .../fba-inventory-api-model/git_push.sh | 58 + .../fba-inventory-api-model/index.ts | 18 + .../fba-small-and-light-api-model/.gitignore | 4 + .../fba-small-and-light-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + .../fba-small-and-light-api-model/api.ts | 665 ++++ .../fba-small-and-light-api-model/base.ts | 71 + .../fba-small-and-light-api-model/common.ts | 131 + .../configuration.ts | 101 + .../fba-small-and-light-api-model/git_push.sh | 58 + .../fba-small-and-light-api-model/index.ts | 18 + src/api-models/feeds-api-model/.gitignore | 4 + src/api-models/feeds-api-model/.npmignore | 1 + .../feeds-api-model/.openapi-generator-ignore | 23 + .../feeds-api-model/.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/feeds-api-model/api.ts | 860 ++++ src/api-models/feeds-api-model/base.ts | 71 + src/api-models/feeds-api-model/common.ts | 131 + .../feeds-api-model/configuration.ts | 101 + src/api-models/feeds-api-model/git_push.sh | 58 + src/api-models/feeds-api-model/index.ts | 18 + src/api-models/finances-api-model/.gitignore | 4 + src/api-models/finances-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/finances-api-model/api.ts | 2082 ++++++++++ src/api-models/finances-api-model/base.ts | 71 + src/api-models/finances-api-model/common.ts | 131 + .../finances-api-model/configuration.ts | 101 + src/api-models/finances-api-model/git_push.sh | 58 + src/api-models/finances-api-model/index.ts | 18 + .../fulfillment-inbound-api-model/.gitignore | 4 + .../fulfillment-inbound-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + .../fulfillment-inbound-api-model/api.ts | 3505 +++++++++++++++++ .../fulfillment-inbound-api-model/base.ts | 71 + .../fulfillment-inbound-api-model/common.ts | 131 + .../configuration.ts | 101 + .../fulfillment-inbound-api-model/git_push.sh | 58 + .../fulfillment-inbound-api-model/index.ts | 18 + .../fulfillment-outbound-api-model/.gitignore | 4 + .../fulfillment-outbound-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + .../fulfillment-outbound-api-model/api.ts | 3115 +++++++++++++++ .../fulfillment-outbound-api-model/base.ts | 71 + .../fulfillment-outbound-api-model/common.ts | 131 + .../configuration.ts | 101 + .../git_push.sh | 58 + .../fulfillment-outbound-api-model/index.ts | 18 + .../merchant-fulfillment-api-model/.gitignore | 4 + .../merchant-fulfillment-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + .../merchant-fulfillment-api-model/api.ts | 1983 ++++++++++ .../merchant-fulfillment-api-model/base.ts | 71 + .../merchant-fulfillment-api-model/common.ts | 131 + .../configuration.ts | 101 + .../git_push.sh | 58 + .../merchant-fulfillment-api-model/index.ts | 18 + src/api-models/messaging-api-model/.gitignore | 4 + src/api-models/messaging-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/messaging-api-model/api.ts | 1556 ++++++++ src/api-models/messaging-api-model/base.ts | 71 + src/api-models/messaging-api-model/common.ts | 131 + .../messaging-api-model/configuration.ts | 101 + .../messaging-api-model/git_push.sh | 58 + src/api-models/messaging-api-model/index.ts | 18 + .../notifications-api-model/.gitignore | 4 + .../notifications-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/notifications-api-model/api.ts | 932 +++++ .../notifications-api-model/base.ts | 71 + .../notifications-api-model/common.ts | 131 + .../notifications-api-model/configuration.ts | 101 + .../notifications-api-model/git_push.sh | 58 + .../notifications-api-model/index.ts | 18 + src/api-models/orders-api-model/.gitignore | 4 + src/api-models/orders-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../orders-api-model/.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/orders-api-model/api.ts | 1622 ++++++++ src/api-models/orders-api-model/base.ts | 71 + src/api-models/orders-api-model/common.ts | 131 + .../orders-api-model/configuration.ts | 101 + src/api-models/orders-api-model/git_push.sh | 58 + src/api-models/orders-api-model/index.ts | 18 + .../product-fees-api-model/.gitignore | 4 + .../product-fees-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/product-fees-api-model/api.ts | 609 +++ src/api-models/product-fees-api-model/base.ts | 71 + .../product-fees-api-model/common.ts | 131 + .../product-fees-api-model/configuration.ts | 101 + .../product-fees-api-model/git_push.sh | 58 + .../product-fees-api-model/index.ts | 18 + .../product-pricing-api-model/.gitignore | 4 + .../product-pricing-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + .../product-pricing-api-model/api.ts | 1254 ++++++ .../product-pricing-api-model/base.ts | 71 + .../product-pricing-api-model/common.ts | 131 + .../configuration.ts | 101 + .../product-pricing-api-model/git_push.sh | 58 + .../product-pricing-api-model/index.ts | 18 + src/api-models/reports-api-model/.gitignore | 4 + src/api-models/reports-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/reports-api-model/api.ts | 1208 ++++++ src/api-models/reports-api-model/base.ts | 71 + src/api-models/reports-api-model/common.ts | 131 + .../reports-api-model/configuration.ts | 101 + src/api-models/reports-api-model/git_push.sh | 58 + src/api-models/reports-api-model/index.ts | 18 + src/api-models/sales-api-model/.gitignore | 4 + src/api-models/sales-api-model/.npmignore | 1 + .../sales-api-model/.openapi-generator-ignore | 23 + .../sales-api-model/.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/sales-api-model/api.ts | 302 ++ src/api-models/sales-api-model/base.ts | 71 + src/api-models/sales-api-model/common.ts | 131 + .../sales-api-model/configuration.ts | 101 + src/api-models/sales-api-model/git_push.sh | 58 + src/api-models/sales-api-model/index.ts | 18 + src/api-models/sellers-api-model/.gitignore | 4 + src/api-models/sellers-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/sellers-api-model/api.ts | 243 ++ src/api-models/sellers-api-model/base.ts | 71 + src/api-models/sellers-api-model/common.ts | 131 + .../sellers-api-model/configuration.ts | 101 + src/api-models/sellers-api-model/git_push.sh | 58 + src/api-models/sellers-api-model/index.ts | 18 + src/api-models/services-api-model/.gitignore | 4 + src/api-models/services-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/services-api-model/api.ts | 1342 +++++++ src/api-models/services-api-model/base.ts | 71 + src/api-models/services-api-model/common.ts | 131 + .../services-api-model/configuration.ts | 101 + src/api-models/services-api-model/git_push.sh | 58 + src/api-models/services-api-model/index.ts | 18 + src/api-models/shipping-api-model/.gitignore | 4 + src/api-models/shipping-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/shipping-api-model/api.ts | 1773 +++++++++ src/api-models/shipping-api-model/base.ts | 71 + src/api-models/shipping-api-model/common.ts | 131 + .../shipping-api-model/configuration.ts | 101 + src/api-models/shipping-api-model/git_push.sh | 58 + src/api-models/shipping-api-model/index.ts | 18 + .../solicitations-api-model/.gitignore | 4 + .../solicitations-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/solicitations-api-model/api.ts | 436 ++ .../solicitations-api-model/base.ts | 71 + .../solicitations-api-model/common.ts | 131 + .../solicitations-api-model/configuration.ts | 101 + .../solicitations-api-model/git_push.sh | 58 + .../solicitations-api-model/index.ts | 18 + src/api-models/uploads-api-model/.gitignore | 4 + src/api-models/uploads-api-model/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 9 + .../.openapi-generator/VERSION | 1 + src/api-models/uploads-api-model/api.ts | 222 ++ src/api-models/uploads-api-model/base.ts | 71 + src/api-models/uploads-api-model/common.ts | 131 + .../uploads-api-model/configuration.ts | 101 + src/api-models/uploads-api-model/git_push.sh | 58 + src/api-models/uploads-api-model/index.ts | 18 + 253 files changed, 38244 insertions(+) create mode 100644 src/api-models/aplus-content-api-model/.gitignore create mode 100644 src/api-models/aplus-content-api-model/.npmignore create mode 100644 src/api-models/aplus-content-api-model/.openapi-generator-ignore create mode 100644 src/api-models/aplus-content-api-model/.openapi-generator/FILES create mode 100644 src/api-models/aplus-content-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/aplus-content-api-model/api.ts create mode 100644 src/api-models/aplus-content-api-model/base.ts create mode 100644 src/api-models/aplus-content-api-model/common.ts create mode 100644 src/api-models/aplus-content-api-model/configuration.ts create mode 100644 src/api-models/aplus-content-api-model/git_push.sh create mode 100644 src/api-models/aplus-content-api-model/index.ts create mode 100644 src/api-models/authorization-api-model/.gitignore create mode 100644 src/api-models/authorization-api-model/.npmignore create mode 100644 src/api-models/authorization-api-model/.openapi-generator-ignore create mode 100644 src/api-models/authorization-api-model/.openapi-generator/FILES create mode 100644 src/api-models/authorization-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/authorization-api-model/api.ts create mode 100644 src/api-models/authorization-api-model/base.ts create mode 100644 src/api-models/authorization-api-model/common.ts create mode 100644 src/api-models/authorization-api-model/configuration.ts create mode 100644 src/api-models/authorization-api-model/git_push.sh create mode 100644 src/api-models/authorization-api-model/index.ts create mode 100644 src/api-models/catalog-items-api-model/.gitignore create mode 100644 src/api-models/catalog-items-api-model/.npmignore create mode 100644 src/api-models/catalog-items-api-model/.openapi-generator-ignore create mode 100644 src/api-models/catalog-items-api-model/.openapi-generator/FILES create mode 100644 src/api-models/catalog-items-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/catalog-items-api-model/api.ts create mode 100644 src/api-models/catalog-items-api-model/base.ts create mode 100644 src/api-models/catalog-items-api-model/common.ts create mode 100644 src/api-models/catalog-items-api-model/configuration.ts create mode 100644 src/api-models/catalog-items-api-model/git_push.sh create mode 100644 src/api-models/catalog-items-api-model/index.ts create mode 100644 src/api-models/fba-inbound-eligibility-api-model/.gitignore create mode 100644 src/api-models/fba-inbound-eligibility-api-model/.npmignore create mode 100644 src/api-models/fba-inbound-eligibility-api-model/.openapi-generator-ignore create mode 100644 src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/FILES create mode 100644 src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/fba-inbound-eligibility-api-model/api.ts create mode 100644 src/api-models/fba-inbound-eligibility-api-model/base.ts create mode 100644 src/api-models/fba-inbound-eligibility-api-model/common.ts create mode 100644 src/api-models/fba-inbound-eligibility-api-model/configuration.ts create mode 100644 src/api-models/fba-inbound-eligibility-api-model/git_push.sh create mode 100644 src/api-models/fba-inbound-eligibility-api-model/index.ts create mode 100644 src/api-models/fba-inventory-api-model/.gitignore create mode 100644 src/api-models/fba-inventory-api-model/.npmignore create mode 100644 src/api-models/fba-inventory-api-model/.openapi-generator-ignore create mode 100644 src/api-models/fba-inventory-api-model/.openapi-generator/FILES create mode 100644 src/api-models/fba-inventory-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/fba-inventory-api-model/api.ts create mode 100644 src/api-models/fba-inventory-api-model/base.ts create mode 100644 src/api-models/fba-inventory-api-model/common.ts create mode 100644 src/api-models/fba-inventory-api-model/configuration.ts create mode 100644 src/api-models/fba-inventory-api-model/git_push.sh create mode 100644 src/api-models/fba-inventory-api-model/index.ts create mode 100644 src/api-models/fba-small-and-light-api-model/.gitignore create mode 100644 src/api-models/fba-small-and-light-api-model/.npmignore create mode 100644 src/api-models/fba-small-and-light-api-model/.openapi-generator-ignore create mode 100644 src/api-models/fba-small-and-light-api-model/.openapi-generator/FILES create mode 100644 src/api-models/fba-small-and-light-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/fba-small-and-light-api-model/api.ts create mode 100644 src/api-models/fba-small-and-light-api-model/base.ts create mode 100644 src/api-models/fba-small-and-light-api-model/common.ts create mode 100644 src/api-models/fba-small-and-light-api-model/configuration.ts create mode 100644 src/api-models/fba-small-and-light-api-model/git_push.sh create mode 100644 src/api-models/fba-small-and-light-api-model/index.ts create mode 100644 src/api-models/feeds-api-model/.gitignore create mode 100644 src/api-models/feeds-api-model/.npmignore create mode 100644 src/api-models/feeds-api-model/.openapi-generator-ignore create mode 100644 src/api-models/feeds-api-model/.openapi-generator/FILES create mode 100644 src/api-models/feeds-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/feeds-api-model/api.ts create mode 100644 src/api-models/feeds-api-model/base.ts create mode 100644 src/api-models/feeds-api-model/common.ts create mode 100644 src/api-models/feeds-api-model/configuration.ts create mode 100644 src/api-models/feeds-api-model/git_push.sh create mode 100644 src/api-models/feeds-api-model/index.ts create mode 100644 src/api-models/finances-api-model/.gitignore create mode 100644 src/api-models/finances-api-model/.npmignore create mode 100644 src/api-models/finances-api-model/.openapi-generator-ignore create mode 100644 src/api-models/finances-api-model/.openapi-generator/FILES create mode 100644 src/api-models/finances-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/finances-api-model/api.ts create mode 100644 src/api-models/finances-api-model/base.ts create mode 100644 src/api-models/finances-api-model/common.ts create mode 100644 src/api-models/finances-api-model/configuration.ts create mode 100644 src/api-models/finances-api-model/git_push.sh create mode 100644 src/api-models/finances-api-model/index.ts create mode 100644 src/api-models/fulfillment-inbound-api-model/.gitignore create mode 100644 src/api-models/fulfillment-inbound-api-model/.npmignore create mode 100644 src/api-models/fulfillment-inbound-api-model/.openapi-generator-ignore create mode 100644 src/api-models/fulfillment-inbound-api-model/.openapi-generator/FILES create mode 100644 src/api-models/fulfillment-inbound-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/fulfillment-inbound-api-model/api.ts create mode 100644 src/api-models/fulfillment-inbound-api-model/base.ts create mode 100644 src/api-models/fulfillment-inbound-api-model/common.ts create mode 100644 src/api-models/fulfillment-inbound-api-model/configuration.ts create mode 100644 src/api-models/fulfillment-inbound-api-model/git_push.sh create mode 100644 src/api-models/fulfillment-inbound-api-model/index.ts create mode 100644 src/api-models/fulfillment-outbound-api-model/.gitignore create mode 100644 src/api-models/fulfillment-outbound-api-model/.npmignore create mode 100644 src/api-models/fulfillment-outbound-api-model/.openapi-generator-ignore create mode 100644 src/api-models/fulfillment-outbound-api-model/.openapi-generator/FILES create mode 100644 src/api-models/fulfillment-outbound-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/fulfillment-outbound-api-model/api.ts create mode 100644 src/api-models/fulfillment-outbound-api-model/base.ts create mode 100644 src/api-models/fulfillment-outbound-api-model/common.ts create mode 100644 src/api-models/fulfillment-outbound-api-model/configuration.ts create mode 100644 src/api-models/fulfillment-outbound-api-model/git_push.sh create mode 100644 src/api-models/fulfillment-outbound-api-model/index.ts create mode 100644 src/api-models/merchant-fulfillment-api-model/.gitignore create mode 100644 src/api-models/merchant-fulfillment-api-model/.npmignore create mode 100644 src/api-models/merchant-fulfillment-api-model/.openapi-generator-ignore create mode 100644 src/api-models/merchant-fulfillment-api-model/.openapi-generator/FILES create mode 100644 src/api-models/merchant-fulfillment-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/merchant-fulfillment-api-model/api.ts create mode 100644 src/api-models/merchant-fulfillment-api-model/base.ts create mode 100644 src/api-models/merchant-fulfillment-api-model/common.ts create mode 100644 src/api-models/merchant-fulfillment-api-model/configuration.ts create mode 100644 src/api-models/merchant-fulfillment-api-model/git_push.sh create mode 100644 src/api-models/merchant-fulfillment-api-model/index.ts create mode 100644 src/api-models/messaging-api-model/.gitignore create mode 100644 src/api-models/messaging-api-model/.npmignore create mode 100644 src/api-models/messaging-api-model/.openapi-generator-ignore create mode 100644 src/api-models/messaging-api-model/.openapi-generator/FILES create mode 100644 src/api-models/messaging-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/messaging-api-model/api.ts create mode 100644 src/api-models/messaging-api-model/base.ts create mode 100644 src/api-models/messaging-api-model/common.ts create mode 100644 src/api-models/messaging-api-model/configuration.ts create mode 100644 src/api-models/messaging-api-model/git_push.sh create mode 100644 src/api-models/messaging-api-model/index.ts create mode 100644 src/api-models/notifications-api-model/.gitignore create mode 100644 src/api-models/notifications-api-model/.npmignore create mode 100644 src/api-models/notifications-api-model/.openapi-generator-ignore create mode 100644 src/api-models/notifications-api-model/.openapi-generator/FILES create mode 100644 src/api-models/notifications-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/notifications-api-model/api.ts create mode 100644 src/api-models/notifications-api-model/base.ts create mode 100644 src/api-models/notifications-api-model/common.ts create mode 100644 src/api-models/notifications-api-model/configuration.ts create mode 100644 src/api-models/notifications-api-model/git_push.sh create mode 100644 src/api-models/notifications-api-model/index.ts create mode 100644 src/api-models/orders-api-model/.gitignore create mode 100644 src/api-models/orders-api-model/.npmignore create mode 100644 src/api-models/orders-api-model/.openapi-generator-ignore create mode 100644 src/api-models/orders-api-model/.openapi-generator/FILES create mode 100644 src/api-models/orders-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/orders-api-model/api.ts create mode 100644 src/api-models/orders-api-model/base.ts create mode 100644 src/api-models/orders-api-model/common.ts create mode 100644 src/api-models/orders-api-model/configuration.ts create mode 100644 src/api-models/orders-api-model/git_push.sh create mode 100644 src/api-models/orders-api-model/index.ts create mode 100644 src/api-models/product-fees-api-model/.gitignore create mode 100644 src/api-models/product-fees-api-model/.npmignore create mode 100644 src/api-models/product-fees-api-model/.openapi-generator-ignore create mode 100644 src/api-models/product-fees-api-model/.openapi-generator/FILES create mode 100644 src/api-models/product-fees-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/product-fees-api-model/api.ts create mode 100644 src/api-models/product-fees-api-model/base.ts create mode 100644 src/api-models/product-fees-api-model/common.ts create mode 100644 src/api-models/product-fees-api-model/configuration.ts create mode 100644 src/api-models/product-fees-api-model/git_push.sh create mode 100644 src/api-models/product-fees-api-model/index.ts create mode 100644 src/api-models/product-pricing-api-model/.gitignore create mode 100644 src/api-models/product-pricing-api-model/.npmignore create mode 100644 src/api-models/product-pricing-api-model/.openapi-generator-ignore create mode 100644 src/api-models/product-pricing-api-model/.openapi-generator/FILES create mode 100644 src/api-models/product-pricing-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/product-pricing-api-model/api.ts create mode 100644 src/api-models/product-pricing-api-model/base.ts create mode 100644 src/api-models/product-pricing-api-model/common.ts create mode 100644 src/api-models/product-pricing-api-model/configuration.ts create mode 100644 src/api-models/product-pricing-api-model/git_push.sh create mode 100644 src/api-models/product-pricing-api-model/index.ts create mode 100644 src/api-models/reports-api-model/.gitignore create mode 100644 src/api-models/reports-api-model/.npmignore create mode 100644 src/api-models/reports-api-model/.openapi-generator-ignore create mode 100644 src/api-models/reports-api-model/.openapi-generator/FILES create mode 100644 src/api-models/reports-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/reports-api-model/api.ts create mode 100644 src/api-models/reports-api-model/base.ts create mode 100644 src/api-models/reports-api-model/common.ts create mode 100644 src/api-models/reports-api-model/configuration.ts create mode 100644 src/api-models/reports-api-model/git_push.sh create mode 100644 src/api-models/reports-api-model/index.ts create mode 100644 src/api-models/sales-api-model/.gitignore create mode 100644 src/api-models/sales-api-model/.npmignore create mode 100644 src/api-models/sales-api-model/.openapi-generator-ignore create mode 100644 src/api-models/sales-api-model/.openapi-generator/FILES create mode 100644 src/api-models/sales-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/sales-api-model/api.ts create mode 100644 src/api-models/sales-api-model/base.ts create mode 100644 src/api-models/sales-api-model/common.ts create mode 100644 src/api-models/sales-api-model/configuration.ts create mode 100644 src/api-models/sales-api-model/git_push.sh create mode 100644 src/api-models/sales-api-model/index.ts create mode 100644 src/api-models/sellers-api-model/.gitignore create mode 100644 src/api-models/sellers-api-model/.npmignore create mode 100644 src/api-models/sellers-api-model/.openapi-generator-ignore create mode 100644 src/api-models/sellers-api-model/.openapi-generator/FILES create mode 100644 src/api-models/sellers-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/sellers-api-model/api.ts create mode 100644 src/api-models/sellers-api-model/base.ts create mode 100644 src/api-models/sellers-api-model/common.ts create mode 100644 src/api-models/sellers-api-model/configuration.ts create mode 100644 src/api-models/sellers-api-model/git_push.sh create mode 100644 src/api-models/sellers-api-model/index.ts create mode 100644 src/api-models/services-api-model/.gitignore create mode 100644 src/api-models/services-api-model/.npmignore create mode 100644 src/api-models/services-api-model/.openapi-generator-ignore create mode 100644 src/api-models/services-api-model/.openapi-generator/FILES create mode 100644 src/api-models/services-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/services-api-model/api.ts create mode 100644 src/api-models/services-api-model/base.ts create mode 100644 src/api-models/services-api-model/common.ts create mode 100644 src/api-models/services-api-model/configuration.ts create mode 100644 src/api-models/services-api-model/git_push.sh create mode 100644 src/api-models/services-api-model/index.ts create mode 100644 src/api-models/shipping-api-model/.gitignore create mode 100644 src/api-models/shipping-api-model/.npmignore create mode 100644 src/api-models/shipping-api-model/.openapi-generator-ignore create mode 100644 src/api-models/shipping-api-model/.openapi-generator/FILES create mode 100644 src/api-models/shipping-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/shipping-api-model/api.ts create mode 100644 src/api-models/shipping-api-model/base.ts create mode 100644 src/api-models/shipping-api-model/common.ts create mode 100644 src/api-models/shipping-api-model/configuration.ts create mode 100644 src/api-models/shipping-api-model/git_push.sh create mode 100644 src/api-models/shipping-api-model/index.ts create mode 100644 src/api-models/solicitations-api-model/.gitignore create mode 100644 src/api-models/solicitations-api-model/.npmignore create mode 100644 src/api-models/solicitations-api-model/.openapi-generator-ignore create mode 100644 src/api-models/solicitations-api-model/.openapi-generator/FILES create mode 100644 src/api-models/solicitations-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/solicitations-api-model/api.ts create mode 100644 src/api-models/solicitations-api-model/base.ts create mode 100644 src/api-models/solicitations-api-model/common.ts create mode 100644 src/api-models/solicitations-api-model/configuration.ts create mode 100644 src/api-models/solicitations-api-model/git_push.sh create mode 100644 src/api-models/solicitations-api-model/index.ts create mode 100644 src/api-models/uploads-api-model/.gitignore create mode 100644 src/api-models/uploads-api-model/.npmignore create mode 100644 src/api-models/uploads-api-model/.openapi-generator-ignore create mode 100644 src/api-models/uploads-api-model/.openapi-generator/FILES create mode 100644 src/api-models/uploads-api-model/.openapi-generator/VERSION create mode 100644 src/api-models/uploads-api-model/api.ts create mode 100644 src/api-models/uploads-api-model/base.ts create mode 100644 src/api-models/uploads-api-model/common.ts create mode 100644 src/api-models/uploads-api-model/configuration.ts create mode 100644 src/api-models/uploads-api-model/git_push.sh create mode 100644 src/api-models/uploads-api-model/index.ts diff --git a/src/api-models/aplus-content-api-model/.gitignore b/src/api-models/aplus-content-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/aplus-content-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/aplus-content-api-model/.npmignore b/src/api-models/aplus-content-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/aplus-content-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/aplus-content-api-model/.openapi-generator-ignore b/src/api-models/aplus-content-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/aplus-content-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/aplus-content-api-model/.openapi-generator/FILES b/src/api-models/aplus-content-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/aplus-content-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/aplus-content-api-model/.openapi-generator/VERSION b/src/api-models/aplus-content-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/aplus-content-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/aplus-content-api-model/api.ts b/src/api-models/aplus-content-api-model/api.ts new file mode 100644 index 00000000..13d2ad72 --- /dev/null +++ b/src/api-models/aplus-content-api-model/api.ts @@ -0,0 +1,2422 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for A+ Content Management + * With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The base response data for paginated A+ Content operations. Individual operations may extend this with additional data. If nextPageToken is not returned, there are no more pages to return. + * @export + * @interface AplusPaginatedResponse + */ +export interface AplusPaginatedResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof AplusPaginatedResponse + */ + warnings?: Set; + /** + * A page token that is returned when the results of the call exceed the page size. To get another page of results, call the operation again, passing in this value with the pageToken parameter. + * @type {string} + * @memberof AplusPaginatedResponse + */ + nextPageToken?: string; +} +/** + * + * @export + * @interface AplusPaginatedResponseAllOf + */ +export interface AplusPaginatedResponseAllOf { + /** + * A page token that is returned when the results of the call exceed the page size. To get another page of results, call the operation again, passing in this value with the pageToken parameter. + * @type {string} + * @memberof AplusPaginatedResponseAllOf + */ + nextPageToken?: string; +} +/** + * The base response data for all A+ Content operations when a request is successful or partially successful. Individual operations may extend this with additional data. + * @export + * @interface AplusResponse + */ +export interface AplusResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof AplusResponse + */ + warnings?: Set; +} +/** + * A flag that provides additional information about an ASIN. This is contextual and may change depending on the request that generated it. + * @export + * @enum {string} + */ +export enum AsinBadge { + BrandNotEligible = 'BRAND_NOT_ELIGIBLE', + CatalogNotFound = 'CATALOG_NOT_FOUND', + ContentNotPublished = 'CONTENT_NOT_PUBLISHED', + ContentPublished = 'CONTENT_PUBLISHED' +} + +/** + * The A+ Content ASIN with additional metadata for content management. If you don\'t include the `includedDataSet` parameter in a call to the listContentDocumentAsinRelations operation, the related ASINs are returned without metadata. + * @export + * @interface AsinMetadata + */ +export interface AsinMetadata { + /** + * The Amazon Standard Identification Number (ASIN). + * @type {string} + * @memberof AsinMetadata + */ + asin: string; + /** + * The set of ASIN badges. + * @type {Set} + * @memberof AsinMetadata + */ + badgeSet?: Set; + /** + * The Amazon Standard Identification Number (ASIN). + * @type {string} + * @memberof AsinMetadata + */ + parent?: string; + /** + * The title for the ASIN in the Amazon catalog. + * @type {string} + * @memberof AsinMetadata + */ + title?: string; + /** + * The default image for the ASIN in the Amazon catalog. + * @type {string} + * @memberof AsinMetadata + */ + imageUrl?: string; + /** + * A set of content reference keys. + * @type {Set} + * @memberof AsinMetadata + */ + contentReferenceKeySet?: Set; +} +/** + * The relative color scheme of content. + * @export + * @enum {string} + */ +export enum ColorType { + Dark = 'DARK', + Light = 'LIGHT' +} + +/** + * A flag that provides additional information about an A+ Content document. + * @export + * @enum {string} + */ +export enum ContentBadge { + Bulk = 'BULK', + Generated = 'GENERATED', + Launchpad = 'LAUNCHPAD', + Premium = 'PREMIUM', + Standard = 'STANDARD' +} + +/** + * The A+ Content document. This is the enhanced content that is published to product detail pages. + * @export + * @interface ContentDocument + */ +export interface ContentDocument { + /** + * The A+ Content document name. + * @type {string} + * @memberof ContentDocument + */ + name: string; + /** + * + * @type {ContentType} + * @memberof ContentDocument + */ + contentType: ContentType; + /** + * The A+ Content document subtype. This represents a special-purpose type of an A+ Content document. Not every A+ Content document type will have a subtype, and subtypes may change at any time. + * @type {string} + * @memberof ContentDocument + */ + contentSubType?: string; + /** + * The IETF language tag. This only supports the primary language subtag with one secondary language subtag. The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary subtags. **Pattern:** ^[a-z]{2,}-[A-Z0-9]{2,}$ + * @type {string} + * @memberof ContentDocument + */ + locale: string; + /** + * A list of A+ Content modules. + * @type {Array} + * @memberof ContentDocument + */ + contentModuleList: Array; +} +/** + * The metadata of an A+ Content document. + * @export + * @interface ContentMetadata + */ +export interface ContentMetadata { + /** + * The A+ Content document name. + * @type {string} + * @memberof ContentMetadata + */ + name: string; + /** + * The identifier for the marketplace where the A+ Content is published. + * @type {string} + * @memberof ContentMetadata + */ + marketplaceId: string; + /** + * + * @type {ContentStatus} + * @memberof ContentMetadata + */ + status: ContentStatus; + /** + * The set of content badges. + * @type {Set} + * @memberof ContentMetadata + */ + badgeSet: Set; + /** + * The approximate age of the A+ Content document and metadata. + * @type {string} + * @memberof ContentMetadata + */ + updateTime: string; +} +/** + * The metadata for an A+ Content document, with additional information for content management. + * @export + * @interface ContentMetadataRecord + */ +export interface ContentMetadataRecord { + /** + * A unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @type {string} + * @memberof ContentMetadataRecord + */ + contentReferenceKey: string; + /** + * + * @type {ContentMetadata} + * @memberof ContentMetadataRecord + */ + contentMetadata: ContentMetadata; +} +/** + * An A+ Content module. An A+ Content document is composed of content modules. The contentModuleType property selects which content module types to use. + * @export + * @interface ContentModule + */ +export interface ContentModule { + /** + * + * @type {ContentModuleType} + * @memberof ContentModule + */ + contentModuleType: ContentModuleType; + /** + * + * @type {StandardCompanyLogoModule} + * @memberof ContentModule + */ + standardCompanyLogo?: StandardCompanyLogoModule; + /** + * + * @type {StandardComparisonTableModule} + * @memberof ContentModule + */ + standardComparisonTable?: StandardComparisonTableModule; + /** + * + * @type {StandardFourImageTextModule} + * @memberof ContentModule + */ + standardFourImageText?: StandardFourImageTextModule; + /** + * + * @type {StandardFourImageTextQuadrantModule} + * @memberof ContentModule + */ + standardFourImageTextQuadrant?: StandardFourImageTextQuadrantModule; + /** + * + * @type {StandardHeaderImageTextModule} + * @memberof ContentModule + */ + standardHeaderImageText?: StandardHeaderImageTextModule; + /** + * + * @type {StandardImageSidebarModule} + * @memberof ContentModule + */ + standardImageSidebar?: StandardImageSidebarModule; + /** + * + * @type {StandardImageTextOverlayModule} + * @memberof ContentModule + */ + standardImageTextOverlay?: StandardImageTextOverlayModule; + /** + * + * @type {StandardMultipleImageTextModule} + * @memberof ContentModule + */ + standardMultipleImageText?: StandardMultipleImageTextModule; + /** + * + * @type {StandardProductDescriptionModule} + * @memberof ContentModule + */ + standardProductDescription?: StandardProductDescriptionModule; + /** + * + * @type {StandardSingleImageHighlightsModule} + * @memberof ContentModule + */ + standardSingleImageHighlights?: StandardSingleImageHighlightsModule; + /** + * + * @type {StandardSingleImageSpecsDetailModule} + * @memberof ContentModule + */ + standardSingleImageSpecsDetail?: StandardSingleImageSpecsDetailModule; + /** + * + * @type {StandardSingleSideImageModule} + * @memberof ContentModule + */ + standardSingleSideImage?: StandardSingleSideImageModule; + /** + * + * @type {StandardTechSpecsModule} + * @memberof ContentModule + */ + standardTechSpecs?: StandardTechSpecsModule; + /** + * + * @type {StandardTextModule} + * @memberof ContentModule + */ + standardText?: StandardTextModule; + /** + * + * @type {StandardThreeImageTextModule} + * @memberof ContentModule + */ + standardThreeImageText?: StandardThreeImageTextModule; +} +/** + * The type of A+ Content module. + * @export + * @enum {string} + */ +export enum ContentModuleType { + CompanyLogo = 'STANDARD_COMPANY_LOGO', + ComparisonTable = 'STANDARD_COMPARISON_TABLE', + FourImageText = 'STANDARD_FOUR_IMAGE_TEXT', + FourImageTextQuadrant = 'STANDARD_FOUR_IMAGE_TEXT_QUADRANT', + HeaderImageText = 'STANDARD_HEADER_IMAGE_TEXT', + ImageSidebar = 'STANDARD_IMAGE_SIDEBAR', + ImageTextOverlay = 'STANDARD_IMAGE_TEXT_OVERLAY', + MultipleImageText = 'STANDARD_MULTIPLE_IMAGE_TEXT', + ProductDescription = 'STANDARD_PRODUCT_DESCRIPTION', + SingleImageHighlights = 'STANDARD_SINGLE_IMAGE_HIGHLIGHTS', + SingleImageSpecsDetail = 'STANDARD_SINGLE_IMAGE_SPECS_DETAIL', + SingleSideImage = 'STANDARD_SINGLE_SIDE_IMAGE', + TechSpecs = 'STANDARD_TECH_SPECS', + Text = 'STANDARD_TEXT', + ThreeImageText = 'STANDARD_THREE_IMAGE_TEXT' +} + +/** + * A content document with additional information for content management. + * @export + * @interface ContentRecord + */ +export interface ContentRecord { + /** + * A unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @type {string} + * @memberof ContentRecord + */ + contentReferenceKey: string; + /** + * + * @type {ContentMetadata} + * @memberof ContentRecord + */ + contentMetadata?: ContentMetadata; + /** + * + * @type {ContentDocument} + * @memberof ContentRecord + */ + contentDocument?: ContentDocument; +} +/** + * The submission status of the content document. + * @export + * @enum {string} + */ +export enum ContentStatus { + Approved = 'APPROVED', + Draft = 'DRAFT', + Rejected = 'REJECTED', + Submitted = 'SUBMITTED' +} + +/** + * The A+ Content document type. + * @export + * @enum {string} + */ +export enum ContentType { + Ebc = 'EBC', + Emc = 'EMC' +} + +/** + * A decorator applied to a content string value in order to create rich text. + * @export + * @interface Decorator + */ +export interface Decorator { + /** + * + * @type {DecoratorType} + * @memberof Decorator + */ + type?: DecoratorType; + /** + * The starting character of this decorator within the content string. Use zero for the first character. + * @type {number} + * @memberof Decorator + */ + offset?: number; + /** + * The number of content characters to alter with this decorator. Decorators such as line breaks can have zero length and fit between characters. + * @type {number} + * @memberof Decorator + */ + length?: number; + /** + * The relative intensity or variation of this decorator. Decorators such as bullet-points, for example, can have multiple indentation depths. + * @type {number} + * @memberof Decorator + */ + depth?: number; +} +/** + * The type of rich text decorator. + * @export + * @enum {string} + */ +export enum DecoratorType { + ListItem = 'LIST_ITEM', + ListOrdered = 'LIST_ORDERED', + ListUnordered = 'LIST_UNORDERED', + StyleBold = 'STYLE_BOLD', + StyleItalic = 'STYLE_ITALIC', + StyleLinebreak = 'STYLE_LINEBREAK', + StyleParagraph = 'STYLE_PARAGRAPH', + StyleUnderline = 'STYLE_UNDERLINE' +} + +/** + * The error response for when a request is unsuccessful. + * @export + * @interface ErrorList + */ +export interface ErrorList { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ErrorList + */ + errors: Array; +} +/** + * The type of data to include in the response, such as the contents or the metadata of the A+ Content documents. + * @export + * @enum {string} + */ +export enum GetContentDocumentIncludedDataType { + Contents = 'CONTENTS', + Metadata = 'METADATA' +} + +/** + * + * @export + * @interface GetContentDocumentResponse + */ +export interface GetContentDocumentResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof GetContentDocumentResponse + */ + warnings?: Set; + /** + * + * @type {ContentRecord} + * @memberof GetContentDocumentResponse + */ + contentRecord: ContentRecord; +} +/** + * + * @export + * @interface GetContentDocumentResponseAllOf + */ +export interface GetContentDocumentResponseAllOf { + /** + * + * @type {ContentRecord} + * @memberof GetContentDocumentResponseAllOf + */ + contentRecord: ContentRecord; +} +/** + * A reference to an image, hosted in the A+ Content media library. + * @export + * @interface ImageComponent + */ +export interface ImageComponent { + /** + * This identifier is provided by the Selling Partner API for Uploads. + * @type {string} + * @memberof ImageComponent + */ + uploadDestinationId: string; + /** + * + * @type {ImageCropSpecification} + * @memberof ImageComponent + */ + imageCropSpecification: ImageCropSpecification; + /** + * The alternative text for the image. + * @type {string} + * @memberof ImageComponent + */ + altText: string; +} +/** + * The instructions for optionally cropping an image. If no cropping is desired, set the dimensions to the original image size. If the image is cropped and no offset values are provided, then the coordinates of the top left corner of the cropped image, relative to the original image, are defaulted to (0,0). + * @export + * @interface ImageCropSpecification + */ +export interface ImageCropSpecification { + /** + * + * @type {ImageDimensions} + * @memberof ImageCropSpecification + */ + size: ImageDimensions; + /** + * + * @type {ImageOffsets} + * @memberof ImageCropSpecification + */ + offset?: ImageOffsets; +} +/** + * The dimensions extending from the top left corner of the cropped image, or the top left corner of the original image if there is no cropping. Only `pixels` is allowed as the units value for ImageDimensions. + * @export + * @interface ImageDimensions + */ +export interface ImageDimensions { + /** + * + * @type {IntegerWithUnits} + * @memberof ImageDimensions + */ + width: IntegerWithUnits; + /** + * + * @type {IntegerWithUnits} + * @memberof ImageDimensions + */ + height: IntegerWithUnits; +} +/** + * The top left corner of the cropped image, specified in the original image\'s coordinate space. + * @export + * @interface ImageOffsets + */ +export interface ImageOffsets { + /** + * + * @type {IntegerWithUnits} + * @memberof ImageOffsets + */ + x: IntegerWithUnits; + /** + * + * @type {IntegerWithUnits} + * @memberof ImageOffsets + */ + y: IntegerWithUnits; +} +/** + * A whole number dimension and its unit of measurement. For example, this can represent 100 pixels. + * @export + * @interface IntegerWithUnits + */ +export interface IntegerWithUnits { + /** + * The dimension value. + * @type {number} + * @memberof IntegerWithUnits + */ + value: number; + /** + * The unit of measurement. + * @type {string} + * @memberof IntegerWithUnits + */ + units: string; +} +/** + * The type of data to include in the response, such as metadata about the related ASINs. + * @export + * @enum {string} + */ +export enum ListContentDocumentAsinRelationsIncludedDataType { + Metadata = 'METADATA' +} + +/** + * + * @export + * @interface ListContentDocumentAsinRelationsResponse + */ +export interface ListContentDocumentAsinRelationsResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof ListContentDocumentAsinRelationsResponse + */ + warnings?: Set; + /** + * A page token that is returned when the results of the call exceed the page size. To get another page of results, call the operation again, passing in this value with the pageToken parameter. + * @type {string} + * @memberof ListContentDocumentAsinRelationsResponse + */ + nextPageToken?: string; + /** + * The set of ASIN metadata. + * @type {Set} + * @memberof ListContentDocumentAsinRelationsResponse + */ + asinMetadataSet: Set; +} +/** + * + * @export + * @interface ListContentDocumentAsinRelationsResponseAllOf + */ +export interface ListContentDocumentAsinRelationsResponseAllOf { + /** + * The set of ASIN metadata. + * @type {Set} + * @memberof ListContentDocumentAsinRelationsResponseAllOf + */ + asinMetadataSet: Set; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * The code that identifies the type of error condition. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A human readable description of the error condition. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional information, if available, to clarify the error condition. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * A list of rich text content, usually presented in a text box. + * @export + * @interface ParagraphComponent + */ +export interface ParagraphComponent { + /** + * + * @type {Array} + * @memberof ParagraphComponent + */ + textList: Array; +} +/** + * Plain positional text, used in collections of brief labels and descriptors. + * @export + * @interface PlainTextItem + */ +export interface PlainTextItem { + /** + * The rank or index of this text item within the collection. Different items cannot occupy the same position within a single collection. + * @type {number} + * @memberof PlainTextItem + */ + position: number; + /** + * The actual plain text. + * @type {string} + * @memberof PlainTextItem + */ + value: string; +} +/** + * The relative positioning of content. + * @export + * @enum {string} + */ +export enum PositionType { + Left = 'LEFT', + Right = 'RIGHT' +} + +/** + * + * @export + * @interface PostContentDocumentApprovalSubmissionResponse + */ +export interface PostContentDocumentApprovalSubmissionResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof PostContentDocumentApprovalSubmissionResponse + */ + warnings?: Set; +} +/** + * + * @export + * @interface PostContentDocumentAsinRelationsRequest + */ +export interface PostContentDocumentAsinRelationsRequest { + /** + * The set of ASINs. + * @type {Set} + * @memberof PostContentDocumentAsinRelationsRequest + */ + asinSet: Set; +} +/** + * + * @export + * @interface PostContentDocumentAsinRelationsResponse + */ +export interface PostContentDocumentAsinRelationsResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof PostContentDocumentAsinRelationsResponse + */ + warnings?: Set; +} +/** + * + * @export + * @interface PostContentDocumentRequest + */ +export interface PostContentDocumentRequest { + /** + * + * @type {ContentDocument} + * @memberof PostContentDocumentRequest + */ + contentDocument: ContentDocument; +} +/** + * + * @export + * @interface PostContentDocumentResponse + */ +export interface PostContentDocumentResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof PostContentDocumentResponse + */ + warnings?: Set; + /** + * A unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @type {string} + * @memberof PostContentDocumentResponse + */ + contentReferenceKey: string; +} +/** + * + * @export + * @interface PostContentDocumentResponseAllOf + */ +export interface PostContentDocumentResponseAllOf { + /** + * A unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @type {string} + * @memberof PostContentDocumentResponseAllOf + */ + contentReferenceKey: string; +} +/** + * + * @export + * @interface PostContentDocumentSuspendSubmissionResponse + */ +export interface PostContentDocumentSuspendSubmissionResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof PostContentDocumentSuspendSubmissionResponse + */ + warnings?: Set; +} +/** + * The full context for an A+ Content publishing event. + * @export + * @interface PublishRecord + */ +export interface PublishRecord { + /** + * The identifier for the marketplace where the A+ Content is published. + * @type {string} + * @memberof PublishRecord + */ + marketplaceId: string; + /** + * The IETF language tag. This only supports the primary language subtag with one secondary language subtag. The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary subtags. **Pattern:** ^[a-z]{2,}-[A-Z0-9]{2,}$ + * @type {string} + * @memberof PublishRecord + */ + locale: string; + /** + * The Amazon Standard Identification Number (ASIN). + * @type {string} + * @memberof PublishRecord + */ + asin: string; + /** + * + * @type {ContentType} + * @memberof PublishRecord + */ + contentType: ContentType; + /** + * The A+ Content document subtype. This represents a special-purpose type of an A+ Content document. Not every A+ Content document type will have a subtype, and subtypes may change at any time. + * @type {string} + * @memberof PublishRecord + */ + contentSubType?: string; + /** + * A unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @type {string} + * @memberof PublishRecord + */ + contentReferenceKey: string; +} +/** + * + * @export + * @interface SearchContentDocumentsResponse + */ +export interface SearchContentDocumentsResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof SearchContentDocumentsResponse + */ + warnings?: Set; + /** + * A page token that is returned when the results of the call exceed the page size. To get another page of results, call the operation again, passing in this value with the pageToken parameter. + * @type {string} + * @memberof SearchContentDocumentsResponse + */ + nextPageToken?: string; + /** + * A list of A+ Content metadata records. + * @type {Array} + * @memberof SearchContentDocumentsResponse + */ + contentMetadataRecords: Array; +} +/** + * + * @export + * @interface SearchContentDocumentsResponseAllOf + */ +export interface SearchContentDocumentsResponseAllOf { + /** + * A list of A+ Content metadata records. + * @type {Array} + * @memberof SearchContentDocumentsResponseAllOf + */ + contentMetadataRecords: Array; +} +/** + * + * @export + * @interface SearchContentPublishRecordsResponse + */ +export interface SearchContentPublishRecordsResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof SearchContentPublishRecordsResponse + */ + warnings?: Set; + /** + * A page token that is returned when the results of the call exceed the page size. To get another page of results, call the operation again, passing in this value with the pageToken parameter. + * @type {string} + * @memberof SearchContentPublishRecordsResponse + */ + nextPageToken?: string; + /** + * A list of A+ Content publishing records. + * @type {Array} + * @memberof SearchContentPublishRecordsResponse + */ + publishRecordList: Array; +} +/** + * + * @export + * @interface SearchContentPublishRecordsResponseAllOf + */ +export interface SearchContentPublishRecordsResponseAllOf { + /** + * A list of A+ Content publishing records. + * @type {Array} + * @memberof SearchContentPublishRecordsResponseAllOf + */ + publishRecordList: Array; +} +/** + * The standard company logo image. + * @export + * @interface StandardCompanyLogoModule + */ +export interface StandardCompanyLogoModule { + /** + * + * @type {ImageComponent} + * @memberof StandardCompanyLogoModule + */ + companyLogo: ImageComponent; +} +/** + * The A+ Content standard comparison product block. + * @export + * @interface StandardComparisonProductBlock + */ +export interface StandardComparisonProductBlock { + /** + * The rank or index of this comparison product block within the module. Different blocks cannot occupy the same position within a single module. + * @type {number} + * @memberof StandardComparisonProductBlock + */ + position: number; + /** + * + * @type {ImageComponent} + * @memberof StandardComparisonProductBlock + */ + image?: ImageComponent; + /** + * The comparison product title. + * @type {string} + * @memberof StandardComparisonProductBlock + */ + title?: string; + /** + * The Amazon Standard Identification Number (ASIN). + * @type {string} + * @memberof StandardComparisonProductBlock + */ + asin?: string; + /** + * Determines whether this block of content is visually highlighted. + * @type {boolean} + * @memberof StandardComparisonProductBlock + */ + highlight?: boolean; + /** + * Comparison metrics for the product. + * @type {Array} + * @memberof StandardComparisonProductBlock + */ + metrics?: Array; +} +/** + * The standard product comparison table. + * @export + * @interface StandardComparisonTableModule + */ +export interface StandardComparisonTableModule { + /** + * + * @type {Array} + * @memberof StandardComparisonTableModule + */ + productColumns?: Array; + /** + * + * @type {Array} + * @memberof StandardComparisonTableModule + */ + metricRowLabels?: Array; +} +/** + * Four standard images with text, presented across a single row. + * @export + * @interface StandardFourImageTextModule + */ +export interface StandardFourImageTextModule { + /** + * + * @type {TextComponent} + * @memberof StandardFourImageTextModule + */ + headline?: TextComponent; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextModule + */ + block1?: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextModule + */ + block2?: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextModule + */ + block3?: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextModule + */ + block4?: StandardImageTextBlock; +} +/** + * Four standard images with text, presented on a grid of four quadrants. + * @export + * @interface StandardFourImageTextQuadrantModule + */ +export interface StandardFourImageTextQuadrantModule { + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextQuadrantModule + */ + block1: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextQuadrantModule + */ + block2: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextQuadrantModule + */ + block3: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardFourImageTextQuadrantModule + */ + block4: StandardImageTextBlock; +} +/** + * Standard headline text, an image, and body text. + * @export + * @interface StandardHeaderImageTextModule + */ +export interface StandardHeaderImageTextModule { + /** + * + * @type {TextComponent} + * @memberof StandardHeaderImageTextModule + */ + headline?: TextComponent; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardHeaderImageTextModule + */ + block?: StandardImageTextBlock; +} +/** + * The A+ standard fixed-length list of text, with a related headline. + * @export + * @interface StandardHeaderTextListBlock + */ +export interface StandardHeaderTextListBlock { + /** + * + * @type {TextComponent} + * @memberof StandardHeaderTextListBlock + */ + headline?: TextComponent; + /** + * + * @type {StandardTextListBlock} + * @memberof StandardHeaderTextListBlock + */ + block?: StandardTextListBlock; +} +/** + * The A+ Content standard image and caption block. + * @export + * @interface StandardImageCaptionBlock + */ +export interface StandardImageCaptionBlock { + /** + * + * @type {ImageComponent} + * @memberof StandardImageCaptionBlock + */ + image?: ImageComponent; + /** + * + * @type {TextComponent} + * @memberof StandardImageCaptionBlock + */ + caption?: TextComponent; +} +/** + * Two images, two paragraphs, and two bulleted lists. One image is smaller and displayed in the sidebar. + * @export + * @interface StandardImageSidebarModule + */ +export interface StandardImageSidebarModule { + /** + * + * @type {TextComponent} + * @memberof StandardImageSidebarModule + */ + headline?: TextComponent; + /** + * + * @type {StandardImageCaptionBlock} + * @memberof StandardImageSidebarModule + */ + imageCaptionBlock?: StandardImageCaptionBlock; + /** + * + * @type {StandardTextBlock} + * @memberof StandardImageSidebarModule + */ + descriptionTextBlock?: StandardTextBlock; + /** + * + * @type {StandardTextListBlock} + * @memberof StandardImageSidebarModule + */ + descriptionListBlock?: StandardTextListBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardImageSidebarModule + */ + sidebarImageTextBlock?: StandardImageTextBlock; + /** + * + * @type {StandardTextListBlock} + * @memberof StandardImageSidebarModule + */ + sidebarListBlock?: StandardTextListBlock; +} +/** + * The A+ Content standard image and text box block. + * @export + * @interface StandardImageTextBlock + */ +export interface StandardImageTextBlock { + /** + * + * @type {ImageComponent} + * @memberof StandardImageTextBlock + */ + image?: ImageComponent; + /** + * + * @type {TextComponent} + * @memberof StandardImageTextBlock + */ + headline?: TextComponent; + /** + * + * @type {ParagraphComponent} + * @memberof StandardImageTextBlock + */ + body?: ParagraphComponent; +} +/** + * The A+ Content standard image and text block, with a related caption. The caption may not display on all devices. + * @export + * @interface StandardImageTextCaptionBlock + */ +export interface StandardImageTextCaptionBlock { + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardImageTextCaptionBlock + */ + block?: StandardImageTextBlock; + /** + * + * @type {TextComponent} + * @memberof StandardImageTextCaptionBlock + */ + caption?: TextComponent; +} +/** + * A standard background image with a floating text box. + * @export + * @interface StandardImageTextOverlayModule + */ +export interface StandardImageTextOverlayModule { + /** + * + * @type {ColorType} + * @memberof StandardImageTextOverlayModule + */ + overlayColorType: ColorType; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardImageTextOverlayModule + */ + block?: StandardImageTextBlock; +} +/** + * Standard images with text, presented one at a time. The user clicks on thumbnails to view each block. + * @export + * @interface StandardMultipleImageTextModule + */ +export interface StandardMultipleImageTextModule { + /** + * + * @type {Array} + * @memberof StandardMultipleImageTextModule + */ + blocks?: Array; +} +/** + * Standard product description text. + * @export + * @interface StandardProductDescriptionModule + */ +export interface StandardProductDescriptionModule { + /** + * + * @type {ParagraphComponent} + * @memberof StandardProductDescriptionModule + */ + body: ParagraphComponent; +} +/** + * A standard image with several paragraphs and a bulleted list. + * @export + * @interface StandardSingleImageHighlightsModule + */ +export interface StandardSingleImageHighlightsModule { + /** + * + * @type {ImageComponent} + * @memberof StandardSingleImageHighlightsModule + */ + image?: ImageComponent; + /** + * + * @type {TextComponent} + * @memberof StandardSingleImageHighlightsModule + */ + headline?: TextComponent; + /** + * + * @type {StandardTextBlock} + * @memberof StandardSingleImageHighlightsModule + */ + textBlock1?: StandardTextBlock; + /** + * + * @type {StandardTextBlock} + * @memberof StandardSingleImageHighlightsModule + */ + textBlock2?: StandardTextBlock; + /** + * + * @type {StandardTextBlock} + * @memberof StandardSingleImageHighlightsModule + */ + textBlock3?: StandardTextBlock; + /** + * + * @type {StandardHeaderTextListBlock} + * @memberof StandardSingleImageHighlightsModule + */ + bulletedListBlock?: StandardHeaderTextListBlock; +} +/** + * A standard image with paragraphs and a bulleted list, and extra space for technical details. + * @export + * @interface StandardSingleImageSpecsDetailModule + */ +export interface StandardSingleImageSpecsDetailModule { + /** + * + * @type {TextComponent} + * @memberof StandardSingleImageSpecsDetailModule + */ + headline?: TextComponent; + /** + * + * @type {ImageComponent} + * @memberof StandardSingleImageSpecsDetailModule + */ + image?: ImageComponent; + /** + * + * @type {TextComponent} + * @memberof StandardSingleImageSpecsDetailModule + */ + descriptionHeadline?: TextComponent; + /** + * + * @type {StandardTextBlock} + * @memberof StandardSingleImageSpecsDetailModule + */ + descriptionBlock1?: StandardTextBlock; + /** + * + * @type {StandardTextBlock} + * @memberof StandardSingleImageSpecsDetailModule + */ + descriptionBlock2?: StandardTextBlock; + /** + * + * @type {TextComponent} + * @memberof StandardSingleImageSpecsDetailModule + */ + specificationHeadline?: TextComponent; + /** + * + * @type {StandardHeaderTextListBlock} + * @memberof StandardSingleImageSpecsDetailModule + */ + specificationListBlock?: StandardHeaderTextListBlock; + /** + * + * @type {StandardTextBlock} + * @memberof StandardSingleImageSpecsDetailModule + */ + specificationTextBlock?: StandardTextBlock; +} +/** + * A standard headline and body text with an image on the side. + * @export + * @interface StandardSingleSideImageModule + */ +export interface StandardSingleSideImageModule { + /** + * + * @type {PositionType} + * @memberof StandardSingleSideImageModule + */ + imagePositionType: PositionType; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardSingleSideImageModule + */ + block?: StandardImageTextBlock; +} +/** + * The standard table of technical feature names and definitions. + * @export + * @interface StandardTechSpecsModule + */ +export interface StandardTechSpecsModule { + /** + * + * @type {TextComponent} + * @memberof StandardTechSpecsModule + */ + headline?: TextComponent; + /** + * The specification list. + * @type {Array} + * @memberof StandardTechSpecsModule + */ + specificationList: Array; + /** + * The number of tables to present. Features are evenly divided between the tables. + * @type {number} + * @memberof StandardTechSpecsModule + */ + tableCount?: number; +} +/** + * The A+ Content standard text box block, comprised of a paragraph with a headline. + * @export + * @interface StandardTextBlock + */ +export interface StandardTextBlock { + /** + * + * @type {TextComponent} + * @memberof StandardTextBlock + */ + headline?: TextComponent; + /** + * + * @type {ParagraphComponent} + * @memberof StandardTextBlock + */ + body?: ParagraphComponent; +} +/** + * The A+ Content standard fixed length list of text, usually presented as bullet points. + * @export + * @interface StandardTextListBlock + */ +export interface StandardTextListBlock { + /** + * + * @type {Array} + * @memberof StandardTextListBlock + */ + textList: Array; +} +/** + * A standard headline and body text. + * @export + * @interface StandardTextModule + */ +export interface StandardTextModule { + /** + * + * @type {TextComponent} + * @memberof StandardTextModule + */ + headline?: TextComponent; + /** + * + * @type {ParagraphComponent} + * @memberof StandardTextModule + */ + body: ParagraphComponent; +} +/** + * The A+ Content standard label and description block, comprised of a pair of text components. + * @export + * @interface StandardTextPairBlock + */ +export interface StandardTextPairBlock { + /** + * + * @type {TextComponent} + * @memberof StandardTextPairBlock + */ + label?: TextComponent; + /** + * + * @type {TextComponent} + * @memberof StandardTextPairBlock + */ + description?: TextComponent; +} +/** + * Three standard images with text, presented across a single row. + * @export + * @interface StandardThreeImageTextModule + */ +export interface StandardThreeImageTextModule { + /** + * + * @type {TextComponent} + * @memberof StandardThreeImageTextModule + */ + headline?: TextComponent; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardThreeImageTextModule + */ + block1?: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardThreeImageTextModule + */ + block2?: StandardImageTextBlock; + /** + * + * @type {StandardImageTextBlock} + * @memberof StandardThreeImageTextModule + */ + block3?: StandardImageTextBlock; +} +/** + * Rich text content. + * @export + * @interface TextComponent + */ +export interface TextComponent { + /** + * The actual plain text. + * @type {string} + * @memberof TextComponent + */ + value: string; + /** + * A set of content decorators. + * @type {Set} + * @memberof TextComponent + */ + decoratorSet?: Set; +} +/** + * Rich positional text, usually presented as a collection of bullet points. + * @export + * @interface TextItem + */ +export interface TextItem { + /** + * The rank or index of this text item within the collection. Different items cannot occupy the same position within a single collection. + * @type {number} + * @memberof TextItem + */ + position: number; + /** + * + * @type {TextComponent} + * @memberof TextItem + */ + text: TextComponent; +} +/** + * + * @export + * @interface ValidateContentDocumentAsinRelationsResponse + */ +export interface ValidateContentDocumentAsinRelationsResponse { + /** + * A set of messages to the user, such as warnings or comments. + * @type {Set} + * @memberof ValidateContentDocumentAsinRelationsResponse + */ + warnings?: Set; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ValidateContentDocumentAsinRelationsResponse + */ + errors: Array; +} + +/** + * AplusContentApi - axios parameter creator + * @export + */ +export const AplusContentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createContentDocument: async (marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('createContentDocument', 'marketplaceId', marketplaceId) + // verify required parameter 'postContentDocumentRequest' is not null or undefined + assertParamExists('createContentDocument', 'postContentDocumentRequest', postContentDocumentRequest) + const localVarPath = `/aplus/2020-11-01/contentDocuments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postContentDocumentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'CONTENTS' | 'METADATA'>} includedDataSet The set of A+ Content data types to include in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getContentDocument: async (contentReferenceKey: string, marketplaceId: string, includedDataSet: Set<'CONTENTS' | 'METADATA'>, options: any = {}): Promise => { + // verify required parameter 'contentReferenceKey' is not null or undefined + assertParamExists('getContentDocument', 'contentReferenceKey', contentReferenceKey) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getContentDocument', 'marketplaceId', marketplaceId) + // verify required parameter 'includedDataSet' is not null or undefined + assertParamExists('getContentDocument', 'includedDataSet', includedDataSet) + const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}` + .replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (includedDataSet) { + localVarQueryParameter['includedDataSet'] = includedDataSet.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'METADATA'>} [includedDataSet] The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata. + * @param {Set} [asinSet] The set of ASINs. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContentDocumentAsinRelations: async (contentReferenceKey: string, marketplaceId: string, includedDataSet?: Set<'METADATA'>, asinSet?: Set, pageToken?: string, options: any = {}): Promise => { + // verify required parameter 'contentReferenceKey' is not null or undefined + assertParamExists('listContentDocumentAsinRelations', 'contentReferenceKey', contentReferenceKey) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('listContentDocumentAsinRelations', 'marketplaceId', marketplaceId) + const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins` + .replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (includedDataSet) { + localVarQueryParameter['includedDataSet'] = includedDataSet.join(COLLECTION_FORMATS.csv); + } + + if (asinSet) { + localVarQueryParameter['asinSet'] = asinSet.join(COLLECTION_FORMATS.csv); + } + + if (pageToken !== undefined) { + localVarQueryParameter['pageToken'] = pageToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postContentDocumentApprovalSubmission: async (contentReferenceKey: string, marketplaceId: string, options: any = {}): Promise => { + // verify required parameter 'contentReferenceKey' is not null or undefined + assertParamExists('postContentDocumentApprovalSubmission', 'contentReferenceKey', contentReferenceKey) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('postContentDocumentApprovalSubmission', 'marketplaceId', marketplaceId) + const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/approvalSubmissions` + .replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentAsinRelationsRequest} postContentDocumentAsinRelationsRequest The content document ASIN relations request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postContentDocumentAsinRelations: async (contentReferenceKey: string, marketplaceId: string, postContentDocumentAsinRelationsRequest: PostContentDocumentAsinRelationsRequest, options: any = {}): Promise => { + // verify required parameter 'contentReferenceKey' is not null or undefined + assertParamExists('postContentDocumentAsinRelations', 'contentReferenceKey', contentReferenceKey) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('postContentDocumentAsinRelations', 'marketplaceId', marketplaceId) + // verify required parameter 'postContentDocumentAsinRelationsRequest' is not null or undefined + assertParamExists('postContentDocumentAsinRelations', 'postContentDocumentAsinRelationsRequest', postContentDocumentAsinRelationsRequest) + const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins` + .replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postContentDocumentAsinRelationsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postContentDocumentSuspendSubmission: async (contentReferenceKey: string, marketplaceId: string, options: any = {}): Promise => { + // verify required parameter 'contentReferenceKey' is not null or undefined + assertParamExists('postContentDocumentSuspendSubmission', 'contentReferenceKey', contentReferenceKey) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('postContentDocumentSuspendSubmission', 'marketplaceId', marketplaceId) + const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/suspendSubmissions` + .replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchContentDocuments: async (marketplaceId: string, pageToken?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('searchContentDocuments', 'marketplaceId', marketplaceId) + const localVarPath = `/aplus/2020-11-01/contentDocuments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (pageToken !== undefined) { + localVarQueryParameter['pageToken'] = pageToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} asin The Amazon Standard Identification Number (ASIN). + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchContentPublishRecords: async (marketplaceId: string, asin: string, pageToken?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('searchContentPublishRecords', 'marketplaceId', marketplaceId) + // verify required parameter 'asin' is not null or undefined + assertParamExists('searchContentPublishRecords', 'asin', asin) + const localVarPath = `/aplus/2020-11-01/contentPublishRecords`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (asin !== undefined) { + localVarQueryParameter['asin'] = asin; + } + + if (pageToken !== undefined) { + localVarQueryParameter['pageToken'] = pageToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateContentDocument: async (contentReferenceKey: string, marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options: any = {}): Promise => { + // verify required parameter 'contentReferenceKey' is not null or undefined + assertParamExists('updateContentDocument', 'contentReferenceKey', contentReferenceKey) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('updateContentDocument', 'marketplaceId', marketplaceId) + // verify required parameter 'postContentDocumentRequest' is not null or undefined + assertParamExists('updateContentDocument', 'postContentDocumentRequest', postContentDocumentRequest) + const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}` + .replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postContentDocumentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {Set} [asinSet] The set of ASINs. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateContentDocumentAsinRelations: async (marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, asinSet?: Set, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('validateContentDocumentAsinRelations', 'marketplaceId', marketplaceId) + // verify required parameter 'postContentDocumentRequest' is not null or undefined + assertParamExists('validateContentDocumentAsinRelations', 'postContentDocumentRequest', postContentDocumentRequest) + const localVarPath = `/aplus/2020-11-01/contentAsinValidations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (asinSet) { + localVarQueryParameter['asinSet'] = asinSet.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postContentDocumentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AplusContentApi - functional programming interface + * @export + */ +export const AplusContentApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AplusContentApiAxiosParamCreator(configuration) + return { + /** + * Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createContentDocument(marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createContentDocument(marketplaceId, postContentDocumentRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'CONTENTS' | 'METADATA'>} includedDataSet The set of A+ Content data types to include in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getContentDocument(contentReferenceKey: string, marketplaceId: string, includedDataSet: Set<'CONTENTS' | 'METADATA'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getContentDocument(contentReferenceKey, marketplaceId, includedDataSet, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'METADATA'>} [includedDataSet] The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata. + * @param {Set} [asinSet] The set of ASINs. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listContentDocumentAsinRelations(contentReferenceKey: string, marketplaceId: string, includedDataSet?: Set<'METADATA'>, asinSet?: Set, pageToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listContentDocumentAsinRelations(contentReferenceKey, marketplaceId, includedDataSet, asinSet, pageToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postContentDocumentApprovalSubmission(contentReferenceKey: string, marketplaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postContentDocumentApprovalSubmission(contentReferenceKey, marketplaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentAsinRelationsRequest} postContentDocumentAsinRelationsRequest The content document ASIN relations request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postContentDocumentAsinRelations(contentReferenceKey: string, marketplaceId: string, postContentDocumentAsinRelationsRequest: PostContentDocumentAsinRelationsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postContentDocumentAsinRelations(contentReferenceKey, marketplaceId, postContentDocumentAsinRelationsRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postContentDocumentSuspendSubmission(contentReferenceKey: string, marketplaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postContentDocumentSuspendSubmission(contentReferenceKey, marketplaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchContentDocuments(marketplaceId: string, pageToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchContentDocuments(marketplaceId, pageToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} asin The Amazon Standard Identification Number (ASIN). + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchContentPublishRecords(marketplaceId: string, asin: string, pageToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchContentPublishRecords(marketplaceId, asin, pageToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateContentDocument(contentReferenceKey: string, marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateContentDocument(contentReferenceKey, marketplaceId, postContentDocumentRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {Set} [asinSet] The set of ASINs. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async validateContentDocumentAsinRelations(marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, asinSet?: Set, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.validateContentDocumentAsinRelations(marketplaceId, postContentDocumentRequest, asinSet, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AplusContentApi - factory interface + * @export + */ +export const AplusContentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AplusContentApiFp(configuration) + return { + /** + * Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createContentDocument(marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options?: any): AxiosPromise { + return localVarFp.createContentDocument(marketplaceId, postContentDocumentRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'CONTENTS' | 'METADATA'>} includedDataSet The set of A+ Content data types to include in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getContentDocument(contentReferenceKey: string, marketplaceId: string, includedDataSet: Set<'CONTENTS' | 'METADATA'>, options?: any): AxiosPromise { + return localVarFp.getContentDocument(contentReferenceKey, marketplaceId, includedDataSet, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'METADATA'>} [includedDataSet] The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata. + * @param {Set} [asinSet] The set of ASINs. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContentDocumentAsinRelations(contentReferenceKey: string, marketplaceId: string, includedDataSet?: Set<'METADATA'>, asinSet?: Set, pageToken?: string, options?: any): AxiosPromise { + return localVarFp.listContentDocumentAsinRelations(contentReferenceKey, marketplaceId, includedDataSet, asinSet, pageToken, options).then((request) => request(axios, basePath)); + }, + /** + * Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postContentDocumentApprovalSubmission(contentReferenceKey: string, marketplaceId: string, options?: any): AxiosPromise { + return localVarFp.postContentDocumentApprovalSubmission(contentReferenceKey, marketplaceId, options).then((request) => request(axios, basePath)); + }, + /** + * Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentAsinRelationsRequest} postContentDocumentAsinRelationsRequest The content document ASIN relations request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postContentDocumentAsinRelations(contentReferenceKey: string, marketplaceId: string, postContentDocumentAsinRelationsRequest: PostContentDocumentAsinRelationsRequest, options?: any): AxiosPromise { + return localVarFp.postContentDocumentAsinRelations(contentReferenceKey, marketplaceId, postContentDocumentAsinRelationsRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postContentDocumentSuspendSubmission(contentReferenceKey: string, marketplaceId: string, options?: any): AxiosPromise { + return localVarFp.postContentDocumentSuspendSubmission(contentReferenceKey, marketplaceId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchContentDocuments(marketplaceId: string, pageToken?: string, options?: any): AxiosPromise { + return localVarFp.searchContentDocuments(marketplaceId, pageToken, options).then((request) => request(axios, basePath)); + }, + /** + * Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} asin The Amazon Standard Identification Number (ASIN). + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchContentPublishRecords(marketplaceId: string, asin: string, pageToken?: string, options?: any): AxiosPromise { + return localVarFp.searchContentPublishRecords(marketplaceId, asin, pageToken, options).then((request) => request(axios, basePath)); + }, + /** + * Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateContentDocument(contentReferenceKey: string, marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options?: any): AxiosPromise { + return localVarFp.updateContentDocument(contentReferenceKey, marketplaceId, postContentDocumentRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {Set} [asinSet] The set of ASINs. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateContentDocumentAsinRelations(marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, asinSet?: Set, options?: any): AxiosPromise { + return localVarFp.validateContentDocumentAsinRelations(marketplaceId, postContentDocumentRequest, asinSet, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AplusContentApi - object-oriented interface + * @export + * @class AplusContentApi + * @extends {BaseAPI} + */ +export class AplusContentApi extends BaseAPI { + /** + * Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public createContentDocument(marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options?: any) { + return AplusContentApiFp(this.configuration).createContentDocument(marketplaceId, postContentDocumentRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'CONTENTS' | 'METADATA'>} includedDataSet The set of A+ Content data types to include in the response. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public getContentDocument(contentReferenceKey: string, marketplaceId: string, includedDataSet: Set<'CONTENTS' | 'METADATA'>, options?: any) { + return AplusContentApiFp(this.configuration).getContentDocument(contentReferenceKey, marketplaceId, includedDataSet, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {Set<'METADATA'>} [includedDataSet] The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata. + * @param {Set} [asinSet] The set of ASINs. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public listContentDocumentAsinRelations(contentReferenceKey: string, marketplaceId: string, includedDataSet?: Set<'METADATA'>, asinSet?: Set, pageToken?: string, options?: any) { + return AplusContentApiFp(this.configuration).listContentDocumentAsinRelations(contentReferenceKey, marketplaceId, includedDataSet, asinSet, pageToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public postContentDocumentApprovalSubmission(contentReferenceKey: string, marketplaceId: string, options?: any) { + return AplusContentApiFp(this.configuration).postContentDocumentApprovalSubmission(contentReferenceKey, marketplaceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentAsinRelationsRequest} postContentDocumentAsinRelationsRequest The content document ASIN relations request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public postContentDocumentAsinRelations(contentReferenceKey: string, marketplaceId: string, postContentDocumentAsinRelationsRequest: PostContentDocumentAsinRelationsRequest, options?: any) { + return AplusContentApiFp(this.configuration).postContentDocumentAsinRelations(contentReferenceKey, marketplaceId, postContentDocumentAsinRelationsRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public postContentDocumentSuspendSubmission(contentReferenceKey: string, marketplaceId: string, options?: any) { + return AplusContentApiFp(this.configuration).postContentDocumentSuspendSubmission(contentReferenceKey, marketplaceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public searchContentDocuments(marketplaceId: string, pageToken?: string, options?: any) { + return AplusContentApiFp(this.configuration).searchContentDocuments(marketplaceId, pageToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {string} asin The Amazon Standard Identification Number (ASIN). + * @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public searchContentPublishRecords(marketplaceId: string, asin: string, pageToken?: string, options?: any) { + return AplusContentApiFp(this.configuration).searchContentPublishRecords(marketplaceId, asin, pageToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public updateContentDocument(contentReferenceKey: string, marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, options?: any) { + return AplusContentApiFp(this.configuration).updateContentDocument(contentReferenceKey, marketplaceId, postContentDocumentRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published. + * @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details. + * @param {Set} [asinSet] The set of ASINs. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AplusContentApi + */ + public validateContentDocumentAsinRelations(marketplaceId: string, postContentDocumentRequest: PostContentDocumentRequest, asinSet?: Set, options?: any) { + return AplusContentApiFp(this.configuration).validateContentDocumentAsinRelations(marketplaceId, postContentDocumentRequest, asinSet, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/aplus-content-api-model/base.ts b/src/api-models/aplus-content-api-model/base.ts new file mode 100644 index 00000000..6f5f6747 --- /dev/null +++ b/src/api-models/aplus-content-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for A+ Content Management + * With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/aplus-content-api-model/common.ts b/src/api-models/aplus-content-api-model/common.ts new file mode 100644 index 00000000..58f3a5c4 --- /dev/null +++ b/src/api-models/aplus-content-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for A+ Content Management + * With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/aplus-content-api-model/configuration.ts b/src/api-models/aplus-content-api-model/configuration.ts new file mode 100644 index 00000000..3cbe70e1 --- /dev/null +++ b/src/api-models/aplus-content-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for A+ Content Management + * With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/aplus-content-api-model/git_push.sh b/src/api-models/aplus-content-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/aplus-content-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/aplus-content-api-model/index.ts b/src/api-models/aplus-content-api-model/index.ts new file mode 100644 index 00000000..31381f7a --- /dev/null +++ b/src/api-models/aplus-content-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for A+ Content Management + * With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/authorization-api-model/.gitignore b/src/api-models/authorization-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/authorization-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/authorization-api-model/.npmignore b/src/api-models/authorization-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/authorization-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/authorization-api-model/.openapi-generator-ignore b/src/api-models/authorization-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/authorization-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/authorization-api-model/.openapi-generator/FILES b/src/api-models/authorization-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/authorization-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/authorization-api-model/.openapi-generator/VERSION b/src/api-models/authorization-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/authorization-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/authorization-api-model/api.ts b/src/api-models/authorization-api-model/api.ts new file mode 100644 index 00000000..598ed7d4 --- /dev/null +++ b/src/api-models/authorization-api-model/api.ts @@ -0,0 +1,209 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Authorization + * The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * A Login with Amazon (LWA) authorization code. + * @export + * @interface AuthorizationCode + */ +export interface AuthorizationCode { + /** + * A Login with Amazon (LWA) authorization code that can be exchanged for a refresh token and access token that authorize you to make calls to a Selling Partner API. + * @type {string} + * @memberof AuthorizationCode + */ + authorizationCode?: string; +} +/** + * The response schema for the GetAuthorizationCode operation. + * @export + * @interface GetAuthorizationCodeResponse + */ +export interface GetAuthorizationCodeResponse { + /** + * + * @type {AuthorizationCode} + * @memberof GetAuthorizationCodeResponse + */ + payload?: AuthorizationCode; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetAuthorizationCodeResponse + */ + errors?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} + +/** + * AuthorizationApi - axios parameter creator + * @export + */ +export const AuthorizationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller\'s behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @summary Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. + * @param {string} sellingPartnerId The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore. + * @param {string} developerId Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central. + * @param {string} mwsAuthToken The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAuthorizationCode: async (sellingPartnerId: string, developerId: string, mwsAuthToken: string, options: any = {}): Promise => { + // verify required parameter 'sellingPartnerId' is not null or undefined + assertParamExists('getAuthorizationCode', 'sellingPartnerId', sellingPartnerId) + // verify required parameter 'developerId' is not null or undefined + assertParamExists('getAuthorizationCode', 'developerId', developerId) + // verify required parameter 'mwsAuthToken' is not null or undefined + assertParamExists('getAuthorizationCode', 'mwsAuthToken', mwsAuthToken) + const localVarPath = `/authorization/v1/authorizationCode`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (sellingPartnerId !== undefined) { + localVarQueryParameter['sellingPartnerId'] = sellingPartnerId; + } + + if (developerId !== undefined) { + localVarQueryParameter['developerId'] = developerId; + } + + if (mwsAuthToken !== undefined) { + localVarQueryParameter['mwsAuthToken'] = mwsAuthToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuthorizationApi - functional programming interface + * @export + */ +export const AuthorizationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuthorizationApiAxiosParamCreator(configuration) + return { + /** + * With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller\'s behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @summary Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. + * @param {string} sellingPartnerId The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore. + * @param {string} developerId Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central. + * @param {string} mwsAuthToken The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAuthorizationCode(sellingPartnerId: string, developerId: string, mwsAuthToken: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthorizationCode(sellingPartnerId, developerId, mwsAuthToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AuthorizationApi - factory interface + * @export + */ +export const AuthorizationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuthorizationApiFp(configuration) + return { + /** + * With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller\'s behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @summary Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. + * @param {string} sellingPartnerId The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore. + * @param {string} developerId Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central. + * @param {string} mwsAuthToken The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAuthorizationCode(sellingPartnerId: string, developerId: string, mwsAuthToken: string, options?: any): AxiosPromise { + return localVarFp.getAuthorizationCode(sellingPartnerId, developerId, mwsAuthToken, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AuthorizationApi - object-oriented interface + * @export + * @class AuthorizationApi + * @extends {BaseAPI} + */ +export class AuthorizationApi extends BaseAPI { + /** + * With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller\'s behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @summary Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. + * @param {string} sellingPartnerId The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore. + * @param {string} developerId Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central. + * @param {string} mwsAuthToken The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthorizationApi + */ + public getAuthorizationCode(sellingPartnerId: string, developerId: string, mwsAuthToken: string, options?: any) { + return AuthorizationApiFp(this.configuration).getAuthorizationCode(sellingPartnerId, developerId, mwsAuthToken, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/authorization-api-model/base.ts b/src/api-models/authorization-api-model/base.ts new file mode 100644 index 00000000..f0fe9d20 --- /dev/null +++ b/src/api-models/authorization-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Authorization + * The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/authorization-api-model/common.ts b/src/api-models/authorization-api-model/common.ts new file mode 100644 index 00000000..4501d087 --- /dev/null +++ b/src/api-models/authorization-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Authorization + * The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/authorization-api-model/configuration.ts b/src/api-models/authorization-api-model/configuration.ts new file mode 100644 index 00000000..25123fb8 --- /dev/null +++ b/src/api-models/authorization-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Authorization + * The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/authorization-api-model/git_push.sh b/src/api-models/authorization-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/authorization-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/authorization-api-model/index.ts b/src/api-models/authorization-api-model/index.ts new file mode 100644 index 00000000..15dbe19b --- /dev/null +++ b/src/api-models/authorization-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Authorization + * The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/catalog-items-api-model/.gitignore b/src/api-models/catalog-items-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/catalog-items-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/catalog-items-api-model/.npmignore b/src/api-models/catalog-items-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/catalog-items-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/catalog-items-api-model/.openapi-generator-ignore b/src/api-models/catalog-items-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/catalog-items-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/catalog-items-api-model/.openapi-generator/FILES b/src/api-models/catalog-items-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/catalog-items-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/catalog-items-api-model/.openapi-generator/VERSION b/src/api-models/catalog-items-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/catalog-items-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/catalog-items-api-model/api.ts b/src/api-models/catalog-items-api-model/api.ts new file mode 100644 index 00000000..af7068d8 --- /dev/null +++ b/src/api-models/catalog-items-api-model/api.ts @@ -0,0 +1,1507 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Catalog Items + * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * + * @export + * @interface ASINIdentifier + */ +export interface ASINIdentifier { + /** + * A marketplace identifier. + * @type {string} + * @memberof ASINIdentifier + */ + MarketplaceId: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ASINIdentifier + */ + ASIN: string; +} +/** + * The attributes of the item. + * @export + * @interface AttributeSetListType + */ +export interface AttributeSetListType { + /** + * The actor attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Actor?: Array; + /** + * The artist attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Artist?: Array; + /** + * The aspect ratio attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + AspectRatio?: string; + /** + * The audience rating attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + AudienceRating?: string; + /** + * The author attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Author?: Array; + /** + * The back finding attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + BackFinding?: string; + /** + * The band material type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + BandMaterialType?: string; + /** + * The binding attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Binding?: string; + /** + * The Bluray region attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + BlurayRegion?: string; + /** + * The brand attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Brand?: string; + /** + * The CERO age rating attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + CeroAgeRating?: string; + /** + * The chain type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ChainType?: string; + /** + * The clasp type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ClaspType?: string; + /** + * The color attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Color?: string; + /** + * The CPU manufacturer attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + CpuManufacturer?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + CpuSpeed?: DecimalWithUnits; + /** + * The CPU type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + CpuType?: string; + /** + * The creator attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Creator?: Array; + /** + * The department attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Department?: string; + /** + * The director attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Director?: Array; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + DisplaySize?: DecimalWithUnits; + /** + * The edition attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Edition?: string; + /** + * The episode sequence attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + EpisodeSequence?: string; + /** + * The ESRB age rating attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + EsrbAgeRating?: string; + /** + * The feature attributes of the item + * @type {Array} + * @memberof AttributeSetListType + */ + Feature?: Array; + /** + * The flavor attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Flavor?: string; + /** + * The format attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Format?: Array; + /** + * The gem type attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + GemType?: Array; + /** + * The genre attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Genre?: string; + /** + * The golf club flex attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + GolfClubFlex?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + GolfClubLoft?: DecimalWithUnits; + /** + * The hand orientation attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + HandOrientation?: string; + /** + * The hard disk interface attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + HardDiskInterface?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + HardDiskSize?: DecimalWithUnits; + /** + * The hardware platform attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + HardwarePlatform?: string; + /** + * The hazardous material type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + HazardousMaterialType?: string; + /** + * + * @type {DimensionType} + * @memberof AttributeSetListType + */ + ItemDimensions?: DimensionType; + /** + * The adult product attribute of the item. + * @type {boolean} + * @memberof AttributeSetListType + */ + IsAdultProduct?: boolean; + /** + * The autographed attribute of the item. + * @type {boolean} + * @memberof AttributeSetListType + */ + IsAutographed?: boolean; + /** + * The is eligible for trade in attribute of the item. + * @type {boolean} + * @memberof AttributeSetListType + */ + IsEligibleForTradeIn?: boolean; + /** + * The is memorabilia attribute of the item. + * @type {boolean} + * @memberof AttributeSetListType + */ + IsMemorabilia?: boolean; + /** + * The issues per year attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + IssuesPerYear?: string; + /** + * The item part number attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ItemPartNumber?: string; + /** + * The label attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Label?: string; + /** + * The languages attribute of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Languages?: Array; + /** + * The legal disclaimer attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + LegalDisclaimer?: string; + /** + * + * @type {Price} + * @memberof AttributeSetListType + */ + ListPrice?: Price; + /** + * The manufacturer attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Manufacturer?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + ManufacturerMaximumAge?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + ManufacturerMinimumAge?: DecimalWithUnits; + /** + * The manufacturer parts warranty description attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ManufacturerPartsWarrantyDescription?: string; + /** + * The material type attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + MaterialType?: Array; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + MaximumResolution?: DecimalWithUnits; + /** + * The media type attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + MediaType?: Array; + /** + * The metal stamp attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + MetalStamp?: string; + /** + * The metal type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + MetalType?: string; + /** + * The model attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Model?: string; + /** + * The number of discs attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + NumberOfDiscs?: number; + /** + * The number of issues attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + NumberOfIssues?: number; + /** + * The number of items attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + NumberOfItems?: number; + /** + * The number of pages attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + NumberOfPages?: number; + /** + * The number of tracks attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + NumberOfTracks?: number; + /** + * The operating system attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + OperatingSystem?: Array; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + OpticalZoom?: DecimalWithUnits; + /** + * + * @type {DimensionType} + * @memberof AttributeSetListType + */ + PackageDimensions?: DimensionType; + /** + * The package quantity attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + PackageQuantity?: number; + /** + * The part number attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + PartNumber?: string; + /** + * The PEGI rating attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + PegiRating?: string; + /** + * The platform attributes of the item. + * @type {Array} + * @memberof AttributeSetListType + */ + Platform?: Array; + /** + * The processor count attribute of the item. + * @type {number} + * @memberof AttributeSetListType + */ + ProcessorCount?: number; + /** + * The product group attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ProductGroup?: string; + /** + * The product type name attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ProductTypeName?: string; + /** + * The product type subcategory attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ProductTypeSubcategory?: string; + /** + * The publication date attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + PublicationDate?: string; + /** + * The publisher attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Publisher?: string; + /** + * The region code attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + RegionCode?: string; + /** + * The release date attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ReleaseDate?: string; + /** + * The ring size attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + RingSize?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + RunningTime?: DecimalWithUnits; + /** + * The shaft material attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + ShaftMaterial?: string; + /** + * The scent attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Scent?: string; + /** + * The season sequence attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + SeasonSequence?: string; + /** + * The Seikodo product code attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + SeikodoProductCode?: string; + /** + * The size attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Size?: string; + /** + * The size per pearl attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + SizePerPearl?: string; + /** + * + * @type {Image} + * @memberof AttributeSetListType + */ + SmallImage?: Image; + /** + * The studio attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Studio?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + SubscriptionLength?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + SystemMemorySize?: DecimalWithUnits; + /** + * The system memory type attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + SystemMemoryType?: string; + /** + * The theatrical release date attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + TheatricalReleaseDate?: string; + /** + * The title attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Title?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + TotalDiamondWeight?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof AttributeSetListType + */ + TotalGemWeight?: DecimalWithUnits; + /** + * The warranty attribute of the item. + * @type {string} + * @memberof AttributeSetListType + */ + Warranty?: string; + /** + * + * @type {Price} + * @memberof AttributeSetListType + */ + WeeeTaxValue?: Price; +} +/** + * + * @export + * @interface Categories + */ +export interface Categories { + /** + * The identifier for the product category (or browse node). + * @type {string} + * @memberof Categories + */ + ProductCategoryId?: string; + /** + * The name of the product category (or browse node). + * @type {string} + * @memberof Categories + */ + ProductCategoryName?: string; + /** + * The parent product category. + * @type {object} + * @memberof Categories + */ + parent?: object; +} +/** + * The creator type attribute of an item. + * @export + * @interface CreatorType + */ +export interface CreatorType { + /** + * The value of the attribute. + * @type {string} + * @memberof CreatorType + */ + value?: string; + /** + * The role of the value. + * @type {string} + * @memberof CreatorType + */ + Role?: string; +} +/** + * The decimal value and unit. + * @export + * @interface DecimalWithUnits + */ +export interface DecimalWithUnits { + /** + * The decimal value. + * @type {number} + * @memberof DecimalWithUnits + */ + value?: number; + /** + * The unit of the decimal value. + * @type {string} + * @memberof DecimalWithUnits + */ + Units?: string; +} +/** + * The dimension type attribute of an item. + * @export + * @interface DimensionType + */ +export interface DimensionType { + /** + * + * @type {DecimalWithUnits} + * @memberof DimensionType + */ + Height?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof DimensionType + */ + Length?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof DimensionType + */ + Width?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof DimensionType + */ + Weight?: DecimalWithUnits; +} +/** + * + * @export + * @interface GetCatalogItemResponse + */ +export interface GetCatalogItemResponse { + /** + * + * @type {Item} + * @memberof GetCatalogItemResponse + */ + payload?: Item; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetCatalogItemResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface IdentifierType + */ +export interface IdentifierType { + /** + * + * @type {ASINIdentifier} + * @memberof IdentifierType + */ + MarketplaceASIN?: ASINIdentifier; + /** + * + * @type {SellerSKUIdentifier} + * @memberof IdentifierType + */ + SKUIdentifier?: SellerSKUIdentifier; +} +/** + * The image attribute of the item. + * @export + * @interface Image + */ +export interface Image { + /** + * The image URL attribute of the item. + * @type {string} + * @memberof Image + */ + URL?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof Image + */ + Height?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof Image + */ + Width?: DecimalWithUnits; +} +/** + * An item in the Amazon catalog. + * @export + * @interface Item + */ +export interface Item { + /** + * + * @type {IdentifierType} + * @memberof Item + */ + Identifiers: IdentifierType; + /** + * A list of attributes for the item. + * @type {Array} + * @memberof Item + */ + AttributeSets?: Array; + /** + * A list of variation relationship information, if applicable for the item. + * @type {Array} + * @memberof Item + */ + Relationships?: Array; + /** + * A list of sales rank information for the item by category. + * @type {Array} + * @memberof Item + */ + SalesRankings?: Array; +} +/** + * The language type attribute of an item. + * @export + * @interface LanguageType + */ +export interface LanguageType { + /** + * The name attribute of the item. + * @type {string} + * @memberof LanguageType + */ + Name?: string; + /** + * The type attribute of the item. + * @type {string} + * @memberof LanguageType + */ + Type?: string; + /** + * The audio format attribute of the item. + * @type {string} + * @memberof LanguageType + */ + AudioFormat?: string; +} +/** + * + * @export + * @interface ListCatalogCategoriesResponse + */ +export interface ListCatalogCategoriesResponse { + /** + * + * @type {Array} + * @memberof ListCatalogCategoriesResponse + */ + payload?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ListCatalogCategoriesResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface ListCatalogItemsResponse + */ +export interface ListCatalogItemsResponse { + /** + * + * @type {ListMatchingItemsResponse} + * @memberof ListCatalogItemsResponse + */ + payload?: ListMatchingItemsResponse; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ListCatalogItemsResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface ListMatchingItemsResponse + */ +export interface ListMatchingItemsResponse { + /** + * A list of items. + * @type {Array} + * @memberof ListMatchingItemsResponse + */ + Items?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The number of offer listings with the specified condition. + * @export + * @interface OfferListingCountType + */ +export interface OfferListingCountType { + /** + * The number of offer listings. + * @type {number} + * @memberof OfferListingCountType + */ + Count: number; + /** + * The condition of the item. + * @type {string} + * @memberof OfferListingCountType + */ + condition: string; +} +/** + * The price attribute of the item. + * @export + * @interface Price + */ +export interface Price { + /** + * The amount. + * @type {number} + * @memberof Price + */ + Amount?: number; + /** + * The currency code of the amount. + * @type {string} + * @memberof Price + */ + CurrencyCode?: string; +} +/** + * + * @export + * @interface QualifiersType + */ +export interface QualifiersType { + /** + * The condition of the item. Possible values: New, Used, Collectible, Refurbished, or Club. + * @type {string} + * @memberof QualifiersType + */ + ItemCondition: string; + /** + * The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other. + * @type {string} + * @memberof QualifiersType + */ + ItemSubcondition: string; + /** + * The fulfillment channel for the item. Possible values: * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller. + * @type {string} + * @memberof QualifiersType + */ + FulfillmentChannel: string; + /** + * Indicates whether the marketplace specified in the request and the location that the item ships from are in the same country. Possible values: True, False, or Unknown. + * @type {string} + * @memberof QualifiersType + */ + ShipsDomestically: string; + /** + * + * @type {ShippingTimeType} + * @memberof QualifiersType + */ + ShippingTime: ShippingTimeType; + /** + * (98-100%, 95-97%, 90-94%, 80-89%, 70-79%, Less than 70%, or Just launched ) – Indicates the percentage of feedback ratings that were positive over the past 12 months. + * @type {string} + * @memberof QualifiersType + */ + SellerPositiveFeedbackRating: string; +} +/** + * Specific variations of the item. + * @export + * @interface RelationshipType + */ +export interface RelationshipType { + /** + * The color variation of the item. + * @type {string} + * @memberof RelationshipType + */ + Color?: string; + /** + * The edition variation of the item. + * @type {string} + * @memberof RelationshipType + */ + Edition?: string; + /** + * The flavor variation of the item. + * @type {string} + * @memberof RelationshipType + */ + Flavor?: string; + /** + * The gem type variations of the item. + * @type {Array} + * @memberof RelationshipType + */ + GemType?: Array; + /** + * The golf club flex variation of an item. + * @type {string} + * @memberof RelationshipType + */ + GolfClubFlex?: string; + /** + * The hand orientation variation of an item. + * @type {string} + * @memberof RelationshipType + */ + HandOrientation?: string; + /** + * The hardware platform variation of an item. + * @type {string} + * @memberof RelationshipType + */ + HardwarePlatform?: string; + /** + * The material type variations of an item. + * @type {Array} + * @memberof RelationshipType + */ + MaterialType?: Array; + /** + * The metal type variation of an item. + * @type {string} + * @memberof RelationshipType + */ + MetalType?: string; + /** + * The model variation of an item. + * @type {string} + * @memberof RelationshipType + */ + Model?: string; + /** + * The operating system variations of an item. + * @type {Array} + * @memberof RelationshipType + */ + OperatingSystem?: Array; + /** + * The product type subcategory variation of an item. + * @type {string} + * @memberof RelationshipType + */ + ProductTypeSubcategory?: string; + /** + * The ring size variation of an item. + * @type {string} + * @memberof RelationshipType + */ + RingSize?: string; + /** + * The shaft material variation of an item. + * @type {string} + * @memberof RelationshipType + */ + ShaftMaterial?: string; + /** + * The scent variation of an item. + * @type {string} + * @memberof RelationshipType + */ + Scent?: string; + /** + * The size variation of an item. + * @type {string} + * @memberof RelationshipType + */ + Size?: string; + /** + * The size per pearl variation of an item. + * @type {string} + * @memberof RelationshipType + */ + SizePerPearl?: string; + /** + * + * @type {DecimalWithUnits} + * @memberof RelationshipType + */ + GolfClubLoft?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof RelationshipType + */ + TotalDiamondWeight?: DecimalWithUnits; + /** + * + * @type {DecimalWithUnits} + * @memberof RelationshipType + */ + TotalGemWeight?: DecimalWithUnits; + /** + * The package quantity variation of an item. + * @type {number} + * @memberof RelationshipType + */ + PackageQuantity?: number; + /** + * + * @type {DimensionType} + * @memberof RelationshipType + */ + ItemDimensions?: DimensionType; +} +/** + * + * @export + * @interface SalesRankType + */ +export interface SalesRankType { + /** + * Identifies the item category from which the sales rank is taken. + * @type {string} + * @memberof SalesRankType + */ + ProductCategoryId: string; + /** + * The sales rank of the item within the item category. + * @type {number} + * @memberof SalesRankType + */ + Rank: number; +} +/** + * + * @export + * @interface SellerSKUIdentifier + */ +export interface SellerSKUIdentifier { + /** + * A marketplace identifier. + * @type {string} + * @memberof SellerSKUIdentifier + */ + MarketplaceId: string; + /** + * The seller identifier submitted for the operation. + * @type {string} + * @memberof SellerSKUIdentifier + */ + SellerId: string; + /** + * The seller stock keeping unit (SKU) of the item. + * @type {string} + * @memberof SellerSKUIdentifier + */ + SellerSKU: string; +} +/** + * + * @export + * @interface ShippingTimeType + */ +export interface ShippingTimeType { + /** + * (0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed. + * @type {string} + * @memberof ShippingTimeType + */ + Max?: string; +} + +/** + * CatalogApi - axios parameter creator + * @export + */ +export const CatalogApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCatalogItem: async (marketplaceId: string, asin: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getCatalogItem', 'marketplaceId', marketplaceId) + // verify required parameter 'asin' is not null or undefined + assertParamExists('getCatalogItem', 'asin', asin) + const localVarPath = `/catalog/v0/items/{asin}` + .replace(`{${"asin"}}`, encodeURIComponent(String(asin))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item. + * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCatalogCategories: async (marketplaceId: string, aSIN?: string, sellerSKU?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('listCatalogCategories', 'marketplaceId', marketplaceId) + const localVarPath = `/catalog/v0/categories`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (aSIN !== undefined) { + localVarQueryParameter['ASIN'] = aSIN; + } + + if (sellerSKU !== undefined) { + localVarQueryParameter['SellerSKU'] = sellerSKU; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned. + * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \'harry potter books\'. + * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. + * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {string} [uPC] A 12-digit bar code used for retail packaging. + * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. + * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally. + * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCatalogItems: async (marketplaceId: string, query?: string, queryContextId?: string, sellerSKU?: string, uPC?: string, eAN?: string, iSBN?: string, jAN?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('listCatalogItems', 'marketplaceId', marketplaceId) + const localVarPath = `/catalog/v0/items`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (query !== undefined) { + localVarQueryParameter['Query'] = query; + } + + if (queryContextId !== undefined) { + localVarQueryParameter['QueryContextId'] = queryContextId; + } + + if (sellerSKU !== undefined) { + localVarQueryParameter['SellerSKU'] = sellerSKU; + } + + if (uPC !== undefined) { + localVarQueryParameter['UPC'] = uPC; + } + + if (eAN !== undefined) { + localVarQueryParameter['EAN'] = eAN; + } + + if (iSBN !== undefined) { + localVarQueryParameter['ISBN'] = iSBN; + } + + if (jAN !== undefined) { + localVarQueryParameter['JAN'] = jAN; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CatalogApi - functional programming interface + * @export + */ +export const CatalogApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CatalogApiAxiosParamCreator(configuration) + return { + /** + * Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCatalogItem(marketplaceId: string, asin: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(marketplaceId, asin, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item. + * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCatalogCategories(marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCatalogCategories(marketplaceId, aSIN, sellerSKU, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned. + * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \'harry potter books\'. + * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. + * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {string} [uPC] A 12-digit bar code used for retail packaging. + * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. + * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally. + * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCatalogItems(marketplaceId: string, query?: string, queryContextId?: string, sellerSKU?: string, uPC?: string, eAN?: string, iSBN?: string, jAN?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * CatalogApi - factory interface + * @export + */ +export const CatalogApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CatalogApiFp(configuration) + return { + /** + * Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCatalogItem(marketplaceId: string, asin: string, options?: any): AxiosPromise { + return localVarFp.getCatalogItem(marketplaceId, asin, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item. + * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCatalogCategories(marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: any): AxiosPromise { + return localVarFp.listCatalogCategories(marketplaceId, aSIN, sellerSKU, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned. + * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \'harry potter books\'. + * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. + * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {string} [uPC] A 12-digit bar code used for retail packaging. + * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. + * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally. + * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCatalogItems(marketplaceId: string, query?: string, queryContextId?: string, sellerSKU?: string, uPC?: string, eAN?: string, iSBN?: string, jAN?: string, options?: any): AxiosPromise { + return localVarFp.listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CatalogApi - object-oriented interface + * @export + * @class CatalogApi + * @extends {BaseAPI} + */ +export class CatalogApi extends BaseAPI { + /** + * Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CatalogApi + */ + public getCatalogItem(marketplaceId: string, asin: string, options?: any) { + return CatalogApiFp(this.configuration).getCatalogItem(marketplaceId, asin, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item. + * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item. + * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CatalogApi + */ + public listCatalogCategories(marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: any) { + return CatalogApiFp(this.configuration).listCatalogCategories(marketplaceId, aSIN, sellerSKU, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned. + * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \'harry potter books\'. + * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. + * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {string} [uPC] A 12-digit bar code used for retail packaging. + * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. + * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally. + * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CatalogApi + */ + public listCatalogItems(marketplaceId: string, query?: string, queryContextId?: string, sellerSKU?: string, uPC?: string, eAN?: string, iSBN?: string, jAN?: string, options?: any) { + return CatalogApiFp(this.configuration).listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/catalog-items-api-model/base.ts b/src/api-models/catalog-items-api-model/base.ts new file mode 100644 index 00000000..371c31a4 --- /dev/null +++ b/src/api-models/catalog-items-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Catalog Items + * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/catalog-items-api-model/common.ts b/src/api-models/catalog-items-api-model/common.ts new file mode 100644 index 00000000..6f62d1b9 --- /dev/null +++ b/src/api-models/catalog-items-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Catalog Items + * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/catalog-items-api-model/configuration.ts b/src/api-models/catalog-items-api-model/configuration.ts new file mode 100644 index 00000000..e5c99749 --- /dev/null +++ b/src/api-models/catalog-items-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Catalog Items + * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/catalog-items-api-model/git_push.sh b/src/api-models/catalog-items-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/catalog-items-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/catalog-items-api-model/index.ts b/src/api-models/catalog-items-api-model/index.ts new file mode 100644 index 00000000..ec585c27 --- /dev/null +++ b/src/api-models/catalog-items-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Catalog Items + * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/fba-inbound-eligibility-api-model/.gitignore b/src/api-models/fba-inbound-eligibility-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/fba-inbound-eligibility-api-model/.npmignore b/src/api-models/fba-inbound-eligibility-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator-ignore b/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/FILES b/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/VERSION b/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/fba-inbound-eligibility-api-model/api.ts b/src/api-models/fba-inbound-eligibility-api-model/api.ts new file mode 100644 index 00000000..bed8ebcc --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/api.ts @@ -0,0 +1,281 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inbound Eligibilty + * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The response schema for the getItemEligibilityPreview operation. + * @export + * @interface GetItemEligibilityPreviewResponse + */ +export interface GetItemEligibilityPreviewResponse { + /** + * + * @type {ItemEligibilityPreview} + * @memberof GetItemEligibilityPreviewResponse + */ + payload?: ItemEligibilityPreview; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetItemEligibilityPreviewResponse + */ + errors?: Array; +} +/** + * The response object which contains the ASIN, marketplaceId if required, eligibility program, the eligibility status (boolean), and a list of ineligibility reason codes. + * @export + * @interface ItemEligibilityPreview + */ +export interface ItemEligibilityPreview { + /** + * The ASIN for which eligibility was determined. + * @type {string} + * @memberof ItemEligibilityPreview + */ + asin: string; + /** + * The marketplace for which eligibility was determined. + * @type {string} + * @memberof ItemEligibilityPreview + */ + marketplaceId?: string; + /** + * The program for which eligibility was determined. + * @type {string} + * @memberof ItemEligibilityPreview + */ + program: ItemEligibilityPreviewProgramEnum; + /** + * Indicates if the item is eligible for the program. + * @type {boolean} + * @memberof ItemEligibilityPreview + */ + isEligibleForProgram: boolean; + /** + * Potential Ineligibility Reason Codes. + * @type {Array} + * @memberof ItemEligibilityPreview + */ + ineligibilityReasonList?: Array; +} + +/** + * @export + * @enum {string} + */ +export enum ItemEligibilityPreviewProgramEnum { + Inbound = 'INBOUND', + Commingling = 'COMMINGLING' +} +/** + * @export + * @enum {string} + */ +export enum ItemEligibilityPreviewIneligibilityReasonListEnum { + FbaInb0004 = 'FBA_INB_0004', + FbaInb0006 = 'FBA_INB_0006', + FbaInb0007 = 'FBA_INB_0007', + FbaInb0008 = 'FBA_INB_0008', + FbaInb0009 = 'FBA_INB_0009', + FbaInb0010 = 'FBA_INB_0010', + FbaInb0011 = 'FBA_INB_0011', + FbaInb0012 = 'FBA_INB_0012', + FbaInb0013 = 'FBA_INB_0013', + FbaInb0014 = 'FBA_INB_0014', + FbaInb0015 = 'FBA_INB_0015', + FbaInb0016 = 'FBA_INB_0016', + FbaInb0017 = 'FBA_INB_0017', + FbaInb0018 = 'FBA_INB_0018', + FbaInb0019 = 'FBA_INB_0019', + FbaInb0034 = 'FBA_INB_0034', + FbaInb0035 = 'FBA_INB_0035', + FbaInb0036 = 'FBA_INB_0036', + FbaInb0037 = 'FBA_INB_0037', + FbaInb0038 = 'FBA_INB_0038', + FbaInb0050 = 'FBA_INB_0050', + FbaInb0051 = 'FBA_INB_0051', + FbaInb0053 = 'FBA_INB_0053', + FbaInb0055 = 'FBA_INB_0055', + FbaInb0056 = 'FBA_INB_0056', + FbaInb0059 = 'FBA_INB_0059', + FbaInb0065 = 'FBA_INB_0065', + FbaInb0066 = 'FBA_INB_0066', + FbaInb0067 = 'FBA_INB_0067', + FbaInb0068 = 'FBA_INB_0068', + FbaInb0095 = 'FBA_INB_0095', + FbaInb0097 = 'FBA_INB_0097', + FbaInb0098 = 'FBA_INB_0098', + FbaInb0099 = 'FBA_INB_0099', + FbaInb0100 = 'FBA_INB_0100', + FbaInb0103 = 'FBA_INB_0103', + FbaInb0104 = 'FBA_INB_0104', + UnknownInbErrorCode = 'UNKNOWN_INB_ERROR_CODE' +} + +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message?: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} + +/** + * FbaInboundApi - axios parameter creator + * @export + */ +export const FbaInboundApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The ASIN of the item for which you want an eligibility preview. + * @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. + * @param {Array} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getItemEligibilityPreview: async (asin: string, program: 'INBOUND' | 'COMMINGLING', marketplaceIds?: Array, options: any = {}): Promise => { + // verify required parameter 'asin' is not null or undefined + assertParamExists('getItemEligibilityPreview', 'asin', asin) + // verify required parameter 'program' is not null or undefined + assertParamExists('getItemEligibilityPreview', 'program', program) + const localVarPath = `/fba/inbound/v1/eligibility/itemPreview`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + if (asin !== undefined) { + localVarQueryParameter['asin'] = asin; + } + + if (program !== undefined) { + localVarQueryParameter['program'] = program; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FbaInboundApi - functional programming interface + * @export + */ +export const FbaInboundApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FbaInboundApiAxiosParamCreator(configuration) + return { + /** + * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The ASIN of the item for which you want an eligibility preview. + * @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. + * @param {Array} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getItemEligibilityPreview(asin: string, program: 'INBOUND' | 'COMMINGLING', marketplaceIds?: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FbaInboundApi - factory interface + * @export + */ +export const FbaInboundApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FbaInboundApiFp(configuration) + return { + /** + * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The ASIN of the item for which you want an eligibility preview. + * @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. + * @param {Array} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getItemEligibilityPreview(asin: string, program: 'INBOUND' | 'COMMINGLING', marketplaceIds?: Array, options?: any): AxiosPromise { + return localVarFp.getItemEligibilityPreview(asin, program, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FbaInboundApi - object-oriented interface + * @export + * @class FbaInboundApi + * @extends {BaseAPI} + */ +export class FbaInboundApi extends BaseAPI { + /** + * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The ASIN of the item for which you want an eligibility preview. + * @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. + * @param {Array} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getItemEligibilityPreview(asin: string, program: 'INBOUND' | 'COMMINGLING', marketplaceIds?: Array, options?: any) { + return FbaInboundApiFp(this.configuration).getItemEligibilityPreview(asin, program, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/fba-inbound-eligibility-api-model/base.ts b/src/api-models/fba-inbound-eligibility-api-model/base.ts new file mode 100644 index 00000000..f66bcae6 --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inbound Eligibilty + * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/fba-inbound-eligibility-api-model/common.ts b/src/api-models/fba-inbound-eligibility-api-model/common.ts new file mode 100644 index 00000000..c3c1a57f --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inbound Eligibilty + * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/fba-inbound-eligibility-api-model/configuration.ts b/src/api-models/fba-inbound-eligibility-api-model/configuration.ts new file mode 100644 index 00000000..80cca92d --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inbound Eligibilty + * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/fba-inbound-eligibility-api-model/git_push.sh b/src/api-models/fba-inbound-eligibility-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/fba-inbound-eligibility-api-model/index.ts b/src/api-models/fba-inbound-eligibility-api-model/index.ts new file mode 100644 index 00000000..89c80c8d --- /dev/null +++ b/src/api-models/fba-inbound-eligibility-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inbound Eligibilty + * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/fba-inventory-api-model/.gitignore b/src/api-models/fba-inventory-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/fba-inventory-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/fba-inventory-api-model/.npmignore b/src/api-models/fba-inventory-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/fba-inventory-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/fba-inventory-api-model/.openapi-generator-ignore b/src/api-models/fba-inventory-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/fba-inventory-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/fba-inventory-api-model/.openapi-generator/FILES b/src/api-models/fba-inventory-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/fba-inventory-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/fba-inventory-api-model/.openapi-generator/VERSION b/src/api-models/fba-inventory-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/fba-inventory-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/fba-inventory-api-model/api.ts b/src/api-models/fba-inventory-api-model/api.ts new file mode 100644 index 00000000..6baa0657 --- /dev/null +++ b/src/api-models/fba-inventory-api-model/api.ts @@ -0,0 +1,525 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inventory + * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The Response schema. + * @export + * @interface GetInventorySummariesResponse + */ +export interface GetInventorySummariesResponse { + /** + * + * @type {GetInventorySummariesResult} + * @memberof GetInventorySummariesResponse + */ + payload?: GetInventorySummariesResult; + /** + * + * @type {Pagination} + * @memberof GetInventorySummariesResponse + */ + pagination?: Pagination; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetInventorySummariesResponse + */ + errors?: Array; +} +/** + * The payload schema for the getInventorySummaries operation. + * @export + * @interface GetInventorySummariesResult + */ +export interface GetInventorySummariesResult { + /** + * + * @type {Granularity} + * @memberof GetInventorySummariesResult + */ + granularity: Granularity; + /** + * A list of inventory summaries. + * @type {Array} + * @memberof GetInventorySummariesResult + */ + inventorySummaries: Array; +} +/** + * Describes a granularity at which inventory data can be aggregated. For example, if you use Marketplace granularity, the fulfillable quantity will reflect inventory that could be fulfilled in the given marketplace. + * @export + * @interface Granularity + */ +export interface Granularity { + /** + * The granularity type for the inventory aggregation level. + * @type {string} + * @memberof Granularity + */ + granularityType?: GranularityGranularityTypeEnum; + /** + * The granularity ID for the specified granularity type. When granularityType is Marketplace, specify the marketplaceId. + * @type {string} + * @memberof Granularity + */ + granularityId?: string; +} + +/** + * @export + * @enum {string} + */ +export enum GranularityGranularityTypeEnum { + Marketplace = 'Marketplace' +} + +/** + * Summarized inventory details. This object will not appear if the details parameter in the request is false. + * @export + * @interface InventoryDetails + */ +export interface InventoryDetails { + /** + * The item quantity that can be picked, packed, and shipped. + * @type {number} + * @memberof InventoryDetails + */ + fulfillableQuantity?: number; + /** + * The number of units in an inbound shipment for which you have notified Amazon. + * @type {number} + * @memberof InventoryDetails + */ + inboundWorkingQuantity?: number; + /** + * The number of units in an inbound shipment that you have notified Amazon about and have provided a tracking number. + * @type {number} + * @memberof InventoryDetails + */ + inboundShippedQuantity?: number; + /** + * The number of units that have not yet been received at an Amazon fulfillment center for processing, but are part of an inbound shipment with some units that have already been received and processed. + * @type {number} + * @memberof InventoryDetails + */ + inboundReceivingQuantity?: number; + /** + * + * @type {ReservedQuantity} + * @memberof InventoryDetails + */ + reservedQuantity?: ReservedQuantity; + /** + * + * @type {ResearchingQuantity} + * @memberof InventoryDetails + */ + researchingQuantity?: ResearchingQuantity; + /** + * + * @type {UnfulfillableQuantity} + * @memberof InventoryDetails + */ + unfulfillableQuantity?: UnfulfillableQuantity; +} +/** + * Inventory summary for a specific item. + * @export + * @interface InventorySummary + */ +export interface InventorySummary { + /** + * The Amazon Standard Identification Number (ASIN) of an item. + * @type {string} + * @memberof InventorySummary + */ + asin?: string; + /** + * Amazon\'s fulfillment network SKU identifier. + * @type {string} + * @memberof InventorySummary + */ + fnSku?: string; + /** + * The seller SKU of the item. + * @type {string} + * @memberof InventorySummary + */ + sellerSku?: string; + /** + * The condition of the item as described by the seller (for example, New Item). + * @type {string} + * @memberof InventorySummary + */ + condition?: string; + /** + * + * @type {InventoryDetails} + * @memberof InventorySummary + */ + inventoryDetails?: InventoryDetails; + /** + * The date and time that any quantity was last updated. + * @type {string} + * @memberof InventorySummary + */ + lastUpdatedTime?: string; + /** + * The localized language product title of the item within the specific marketplace. + * @type {string} + * @memberof InventorySummary + */ + productName?: string; + /** + * The total number of units in an inbound shipment or in Amazon fulfillment centers. + * @type {number} + * @memberof InventorySummary + */ + totalQuantity?: number; +} +/** + * An error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message?: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The process of returning the results to a request in batches of a defined size called pages. This is done to exercise some control over result size and overall throughput. It\'s a form of traffic management. + * @export + * @interface Pagination + */ +export interface Pagination { + /** + * A generated string used to retrieve the next page of the result. If nextToken is returned, pass the value of nextToken to the next request. If nextToken is not returned, there are no more items to return. + * @type {string} + * @memberof Pagination + */ + nextToken?: string; +} +/** + * The number of misplaced or warehouse damaged units that are actively being confirmed at our fulfillment centers. + * @export + * @interface ResearchingQuantity + */ +export interface ResearchingQuantity { + /** + * The total number of units currently being researched in Amazon\'s fulfillment network. + * @type {number} + * @memberof ResearchingQuantity + */ + totalResearchingQuantity?: number; + /** + * A list of quantity details for items currently being researched. + * @type {Array} + * @memberof ResearchingQuantity + */ + researchingQuantityBreakdown?: Array; +} +/** + * The misplaced or warehouse damaged inventory that is actively being confirmed at our fulfillment centers. + * @export + * @interface ResearchingQuantityEntry + */ +export interface ResearchingQuantityEntry { + /** + * The duration of the research. + * @type {string} + * @memberof ResearchingQuantityEntry + */ + name: ResearchingQuantityEntryNameEnum; + /** + * The number of units. + * @type {number} + * @memberof ResearchingQuantityEntry + */ + quantity: number; +} + +/** + * @export + * @enum {string} + */ +export enum ResearchingQuantityEntryNameEnum { + ResearchingQuantityInShortTerm = 'researchingQuantityInShortTerm', + ResearchingQuantityInMidTerm = 'researchingQuantityInMidTerm', + ResearchingQuantityInLongTerm = 'researchingQuantityInLongTerm' +} + +/** + * The quantity of reserved inventory. + * @export + * @interface ReservedQuantity + */ +export interface ReservedQuantity { + /** + * The total number of units in Amazon\'s fulfillment network that are currently being picked, packed, and shipped; or are sidelined for measurement, sampling, or other internal processes. + * @type {number} + * @memberof ReservedQuantity + */ + totalReservedQuantity?: number; + /** + * The number of units reserved for customer orders. + * @type {number} + * @memberof ReservedQuantity + */ + pendingCustomerOrderQuantity?: number; + /** + * The number of units being transferred from one fulfillment center to another. + * @type {number} + * @memberof ReservedQuantity + */ + pendingTransshipmentQuantity?: number; + /** + * The number of units that have been sidelined at the fulfillment center for additional processing. + * @type {number} + * @memberof ReservedQuantity + */ + fcProcessingQuantity?: number; +} +/** + * The quantity of unfulfillable inventory. + * @export + * @interface UnfulfillableQuantity + */ +export interface UnfulfillableQuantity { + /** + * The total number of units in Amazon\'s fulfillment network in unsellable condition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + totalUnfulfillableQuantity?: number; + /** + * The number of units in customer damaged disposition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + customerDamagedQuantity?: number; + /** + * The number of units in warehouse damaged disposition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + warehouseDamagedQuantity?: number; + /** + * The number of units in distributor damaged disposition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + distributorDamagedQuantity?: number; + /** + * The number of units in carrier damaged disposition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + carrierDamagedQuantity?: number; + /** + * The number of units in defective disposition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + defectiveQuantity?: number; + /** + * The number of units in expired disposition. + * @type {number} + * @memberof UnfulfillableQuantity + */ + expiredQuantity?: number; +} + +/** + * FbaInventoryApi - axios parameter creator + * @export + */ +export const FbaInventoryApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level. + * @param {string} granularityId The granularity ID for the inventory aggregation level. + * @param {Array} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries. + * @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). + * @param {string} [startDateTime] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. + * @param {Array} [sellerSkus] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. + * @param {string} [nextToken] String token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventorySummaries: async (granularityType: 'Marketplace', granularityId: string, marketplaceIds: Array, details?: boolean, startDateTime?: string, sellerSkus?: Array, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'granularityType' is not null or undefined + assertParamExists('getInventorySummaries', 'granularityType', granularityType) + // verify required parameter 'granularityId' is not null or undefined + assertParamExists('getInventorySummaries', 'granularityId', granularityId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getInventorySummaries', 'marketplaceIds', marketplaceIds) + const localVarPath = `/fba/inventory/v1/summaries`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (details !== undefined) { + localVarQueryParameter['details'] = details; + } + + if (granularityType !== undefined) { + localVarQueryParameter['granularityType'] = granularityType; + } + + if (granularityId !== undefined) { + localVarQueryParameter['granularityId'] = granularityId; + } + + if (startDateTime !== undefined) { + localVarQueryParameter['startDateTime'] = (startDateTime as any instanceof Date) ? + (startDateTime as any).toISOString() : + startDateTime; + } + + if (sellerSkus) { + localVarQueryParameter['sellerSkus'] = sellerSkus.join(COLLECTION_FORMATS.csv); + } + + if (nextToken !== undefined) { + localVarQueryParameter['nextToken'] = nextToken; + } + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FbaInventoryApi - functional programming interface + * @export + */ +export const FbaInventoryApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FbaInventoryApiAxiosParamCreator(configuration) + return { + /** + * Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level. + * @param {string} granularityId The granularity ID for the inventory aggregation level. + * @param {Array} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries. + * @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). + * @param {string} [startDateTime] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. + * @param {Array} [sellerSkus] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. + * @param {string} [nextToken] String token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInventorySummaries(granularityType: 'Marketplace', granularityId: string, marketplaceIds: Array, details?: boolean, startDateTime?: string, sellerSkus?: Array, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FbaInventoryApi - factory interface + * @export + */ +export const FbaInventoryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FbaInventoryApiFp(configuration) + return { + /** + * Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level. + * @param {string} granularityId The granularity ID for the inventory aggregation level. + * @param {Array} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries. + * @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). + * @param {string} [startDateTime] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. + * @param {Array} [sellerSkus] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. + * @param {string} [nextToken] String token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventorySummaries(granularityType: 'Marketplace', granularityId: string, marketplaceIds: Array, details?: boolean, startDateTime?: string, sellerSkus?: Array, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, nextToken, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FbaInventoryApi - object-oriented interface + * @export + * @class FbaInventoryApi + * @extends {BaseAPI} + */ +export class FbaInventoryApi extends BaseAPI { + /** + * Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level. + * @param {string} granularityId The granularity ID for the inventory aggregation level. + * @param {Array} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries. + * @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). + * @param {string} [startDateTime] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. + * @param {Array} [sellerSkus] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. + * @param {string} [nextToken] String token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInventoryApi + */ + public getInventorySummaries(granularityType: 'Marketplace', granularityId: string, marketplaceIds: Array, details?: boolean, startDateTime?: string, sellerSkus?: Array, nextToken?: string, options?: any) { + return FbaInventoryApiFp(this.configuration).getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, nextToken, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/fba-inventory-api-model/base.ts b/src/api-models/fba-inventory-api-model/base.ts new file mode 100644 index 00000000..1c534f9c --- /dev/null +++ b/src/api-models/fba-inventory-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inventory + * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/fba-inventory-api-model/common.ts b/src/api-models/fba-inventory-api-model/common.ts new file mode 100644 index 00000000..3e904c34 --- /dev/null +++ b/src/api-models/fba-inventory-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inventory + * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/fba-inventory-api-model/configuration.ts b/src/api-models/fba-inventory-api-model/configuration.ts new file mode 100644 index 00000000..282e5468 --- /dev/null +++ b/src/api-models/fba-inventory-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inventory + * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/fba-inventory-api-model/git_push.sh b/src/api-models/fba-inventory-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/fba-inventory-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/fba-inventory-api-model/index.ts b/src/api-models/fba-inventory-api-model/index.ts new file mode 100644 index 00000000..e3ce8370 --- /dev/null +++ b/src/api-models/fba-inventory-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Inventory + * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/fba-small-and-light-api-model/.gitignore b/src/api-models/fba-small-and-light-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/fba-small-and-light-api-model/.npmignore b/src/api-models/fba-small-and-light-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/fba-small-and-light-api-model/.openapi-generator-ignore b/src/api-models/fba-small-and-light-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/fba-small-and-light-api-model/.openapi-generator/FILES b/src/api-models/fba-small-and-light-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/fba-small-and-light-api-model/.openapi-generator/VERSION b/src/api-models/fba-small-and-light-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/fba-small-and-light-api-model/api.ts b/src/api-models/fba-small-and-light-api-model/api.ts new file mode 100644 index 00000000..892aed88 --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/api.ts @@ -0,0 +1,665 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Small And Light + * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * A list of error responses returned when a request is unsuccessful. + * @export + * @interface ErrorList + */ +export interface ErrorList { + /** + * + * @type {Array} + * @memberof ErrorList + */ + errors?: Array; +} +/** + * Fee details for a specific fee. + * @export + * @interface FeeLineItem + */ +export interface FeeLineItem { + /** + * The type of fee charged to the seller. + * @type {string} + * @memberof FeeLineItem + */ + feeType: FeeLineItemFeeTypeEnum; + /** + * + * @type {MoneyType} + * @memberof FeeLineItem + */ + feeCharge: MoneyType; +} + +/** + * @export + * @enum {string} + */ +export enum FeeLineItemFeeTypeEnum { + FbaWeightBasedFee = 'FBAWeightBasedFee', + FbaPerOrderFulfillmentFee = 'FBAPerOrderFulfillmentFee', + FbaPerUnitFulfillmentFee = 'FBAPerUnitFulfillmentFee', + Commission = 'Commission' +} + +/** + * The fee estimate for a specific item. + * @export + * @interface FeePreview + */ +export interface FeePreview { + /** + * The Amazon Standard Identification Number (ASIN) value used to identify the item. + * @type {string} + * @memberof FeePreview + */ + asin?: string; + /** + * + * @type {MoneyType} + * @memberof FeePreview + */ + price?: MoneyType; + /** + * A list of the Small and Light fees for the item. + * @type {Array} + * @memberof FeePreview + */ + feeBreakdown?: Array; + /** + * + * @type {MoneyType} + * @memberof FeePreview + */ + totalFees?: MoneyType; + /** + * + * @type {ErrorList} + * @memberof FeePreview + */ + errors?: ErrorList; +} +/** + * An item to be sold. + * @export + * @interface Item + */ +export interface Item { + /** + * The Amazon Standard Identification Number (ASIN) value used to identify the item. + * @type {string} + * @memberof Item + */ + asin: string; + /** + * + * @type {MoneyType} + * @memberof Item + */ + price: MoneyType; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * + * @export + * @interface MoneyType + */ +export interface MoneyType { + /** + * The currency code in ISO 4217 format. + * @type {string} + * @memberof MoneyType + */ + currencyCode?: string; + /** + * The monetary value. + * @type {number} + * @memberof MoneyType + */ + amount?: number; +} +/** + * The Small and Light eligibility status of the item indicated by the specified seller SKU. + * @export + * @interface SmallAndLightEligibility + */ +export interface SmallAndLightEligibility { + /** + * A marketplace identifier. + * @type {string} + * @memberof SmallAndLightEligibility + */ + marketplaceId: string; + /** + * Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @type {string} + * @memberof SmallAndLightEligibility + */ + sellerSKU: string; + /** + * + * @type {SmallAndLightEligibilityStatus} + * @memberof SmallAndLightEligibility + */ + status: SmallAndLightEligibilityStatus; +} +/** + * The Small and Light eligibility status of the item. + * @export + * @enum {string} + */ +export enum SmallAndLightEligibilityStatus { + Eligible = 'ELIGIBLE', + NotEligible = 'NOT_ELIGIBLE' +} + +/** + * The Small and Light enrollment status of the item indicated by the specified seller SKU. + * @export + * @interface SmallAndLightEnrollment + */ +export interface SmallAndLightEnrollment { + /** + * A marketplace identifier. + * @type {string} + * @memberof SmallAndLightEnrollment + */ + marketplaceId: string; + /** + * Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @type {string} + * @memberof SmallAndLightEnrollment + */ + sellerSKU: string; + /** + * + * @type {SmallAndLightEnrollmentStatus} + * @memberof SmallAndLightEnrollment + */ + status: SmallAndLightEnrollmentStatus; +} +/** + * The Small and Light enrollment status of the item. + * @export + * @enum {string} + */ +export enum SmallAndLightEnrollmentStatus { + Enrolled = 'ENROLLED', + NotEnrolled = 'NOT_ENROLLED' +} + +/** + * Request schema for submitting items for which to retrieve fee estimates. + * @export + * @interface SmallAndLightFeePreviewRequest + */ +export interface SmallAndLightFeePreviewRequest { + /** + * A marketplace identifier. + * @type {string} + * @memberof SmallAndLightFeePreviewRequest + */ + marketplaceId: string; + /** + * A list of items for which to retrieve fee estimates (limit: 25). + * @type {Array} + * @memberof SmallAndLightFeePreviewRequest + */ + items: Array; +} +/** + * + * @export + * @interface SmallAndLightFeePreviews + */ +export interface SmallAndLightFeePreviews { + /** + * A list of fee estimates for the requested items. The order of the fee estimates will follow the same order as the items in the request, with duplicates removed. + * @type {Array} + * @memberof SmallAndLightFeePreviews + */ + data?: Array; +} + +/** + * SmallAndLightApi - axios parameter creator + * @export + */ +export const SmallAndLightApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSmallAndLightEnrollmentBySellerSKU: async (sellerSKU: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'sellerSKU' is not null or undefined + assertParamExists('deleteSmallAndLightEnrollmentBySellerSKU', 'sellerSKU', sellerSKU) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('deleteSmallAndLightEnrollmentBySellerSKU', 'marketplaceIds', marketplaceIds) + const localVarPath = `/fba/smallAndLight/v1/enrollments/{sellerSKU}` + .replace(`{${"sellerSKU"}}`, encodeURIComponent(String(sellerSKU))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmallAndLightEligibilityBySellerSKU: async (sellerSKU: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'sellerSKU' is not null or undefined + assertParamExists('getSmallAndLightEligibilityBySellerSKU', 'sellerSKU', sellerSKU) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getSmallAndLightEligibilityBySellerSKU', 'marketplaceIds', marketplaceIds) + const localVarPath = `/fba/smallAndLight/v1/eligibilities/{sellerSKU}` + .replace(`{${"sellerSKU"}}`, encodeURIComponent(String(sellerSKU))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmallAndLightEnrollmentBySellerSKU: async (sellerSKU: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'sellerSKU' is not null or undefined + assertParamExists('getSmallAndLightEnrollmentBySellerSKU', 'sellerSKU', sellerSKU) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getSmallAndLightEnrollmentBySellerSKU', 'marketplaceIds', marketplaceIds) + const localVarPath = `/fba/smallAndLight/v1/enrollments/{sellerSKU}` + .replace(`{${"sellerSKU"}}`, encodeURIComponent(String(sellerSKU))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 3 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {SmallAndLightFeePreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmallAndLightFeePreview: async (body: SmallAndLightFeePreviewRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getSmallAndLightFeePreview', 'body', body) + const localVarPath = `/fba/smallAndLight/v1/feePreviews`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to enroll the item. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + putSmallAndLightEnrollmentBySellerSKU: async (sellerSKU: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'sellerSKU' is not null or undefined + assertParamExists('putSmallAndLightEnrollmentBySellerSKU', 'sellerSKU', sellerSKU) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('putSmallAndLightEnrollmentBySellerSKU', 'marketplaceIds', marketplaceIds) + const localVarPath = `/fba/smallAndLight/v1/enrollments/{sellerSKU}` + .replace(`{${"sellerSKU"}}`, encodeURIComponent(String(sellerSKU))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SmallAndLightApi - functional programming interface + * @export + */ +export const SmallAndLightApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SmallAndLightApiAxiosParamCreator(configuration) + return { + /** + * Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSmallAndLightEligibilityBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSmallAndLightEligibilityBySellerSKU(sellerSKU, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 3 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {SmallAndLightFeePreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSmallAndLightFeePreview(body: SmallAndLightFeePreviewRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSmallAndLightFeePreview(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to enroll the item. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async putSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.putSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SmallAndLightApi - factory interface + * @export + */ +export const SmallAndLightApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SmallAndLightApiFp(configuration) + return { + /** + * Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.deleteSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmallAndLightEligibilityBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.getSmallAndLightEligibilityBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.getSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 3 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {SmallAndLightFeePreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmallAndLightFeePreview(body: SmallAndLightFeePreviewRequest, options?: any): AxiosPromise { + return localVarFp.getSmallAndLightFeePreview(body, options).then((request) => request(axios, basePath)); + }, + /** + * Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to enroll the item. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + putSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.putSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SmallAndLightApi - object-oriented interface + * @export + * @class SmallAndLightApi + * @extends {BaseAPI} + */ +export class SmallAndLightApi extends BaseAPI { + /** + * Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmallAndLightApi + */ + public deleteSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any) { + return SmallAndLightApiFp(this.configuration).deleteSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmallAndLightApi + */ + public getSmallAndLightEligibilityBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any) { + return SmallAndLightApiFp(this.configuration).getSmallAndLightEligibilityBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmallAndLightApi + */ + public getSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any) { + return SmallAndLightApiFp(this.configuration).getSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 3 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {SmallAndLightFeePreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmallAndLightApi + */ + public getSmallAndLightFeePreview(body: SmallAndLightFeePreviewRequest, options?: any) { + return SmallAndLightApiFp(this.configuration).getSmallAndLightFeePreview(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU The seller SKU that identifies the item. + * @param {Array} marketplaceIds The marketplace in which to enroll the item. Note: Accepts a single marketplace only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmallAndLightApi + */ + public putSmallAndLightEnrollmentBySellerSKU(sellerSKU: string, marketplaceIds: Array, options?: any) { + return SmallAndLightApiFp(this.configuration).putSmallAndLightEnrollmentBySellerSKU(sellerSKU, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/fba-small-and-light-api-model/base.ts b/src/api-models/fba-small-and-light-api-model/base.ts new file mode 100644 index 00000000..a886f0a1 --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Small And Light + * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/fba-small-and-light-api-model/common.ts b/src/api-models/fba-small-and-light-api-model/common.ts new file mode 100644 index 00000000..3957a53b --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Small And Light + * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/fba-small-and-light-api-model/configuration.ts b/src/api-models/fba-small-and-light-api-model/configuration.ts new file mode 100644 index 00000000..a19ea38a --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Small And Light + * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/fba-small-and-light-api-model/git_push.sh b/src/api-models/fba-small-and-light-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/fba-small-and-light-api-model/index.ts b/src/api-models/fba-small-and-light-api-model/index.ts new file mode 100644 index 00000000..06679577 --- /dev/null +++ b/src/api-models/fba-small-and-light-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for FBA Small And Light + * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/feeds-api-model/.gitignore b/src/api-models/feeds-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/feeds-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/feeds-api-model/.npmignore b/src/api-models/feeds-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/feeds-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/feeds-api-model/.openapi-generator-ignore b/src/api-models/feeds-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/feeds-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/feeds-api-model/.openapi-generator/FILES b/src/api-models/feeds-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/feeds-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/feeds-api-model/.openapi-generator/VERSION b/src/api-models/feeds-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/feeds-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/feeds-api-model/api.ts b/src/api-models/feeds-api-model/api.ts new file mode 100644 index 00000000..3fe45d5a --- /dev/null +++ b/src/api-models/feeds-api-model/api.ts @@ -0,0 +1,860 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Feeds + * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Response schema. + * @export + * @interface CancelFeedResponse + */ +export interface CancelFeedResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelFeedResponse + */ + errors?: Array; +} +/** + * The response for the createFeedDocument operation. + * @export + * @interface CreateFeedDocumentResponse + */ +export interface CreateFeedDocumentResponse { + /** + * + * @type {CreateFeedDocumentResult} + * @memberof CreateFeedDocumentResponse + */ + payload?: CreateFeedDocumentResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateFeedDocumentResponse + */ + errors?: Array; +} +/** + * Information required to encrypt and upload a feed document\'s contents. + * @export + * @interface CreateFeedDocumentResult + */ +export interface CreateFeedDocumentResult { + /** + * The identifier of the feed document. + * @type {string} + * @memberof CreateFeedDocumentResult + */ + feedDocumentId: string; + /** + * The presigned URL for uploading the feed contents. This URL expires after 5 minutes. + * @type {string} + * @memberof CreateFeedDocumentResult + */ + url: string; + /** + * + * @type {FeedDocumentEncryptionDetails} + * @memberof CreateFeedDocumentResult + */ + encryptionDetails: FeedDocumentEncryptionDetails; +} +/** + * + * @export + * @interface CreateFeedDocumentSpecification + */ +export interface CreateFeedDocumentSpecification { + /** + * The content type of the feed. + * @type {string} + * @memberof CreateFeedDocumentSpecification + */ + contentType: string; +} +/** + * Response schema. + * @export + * @interface CreateFeedResponse + */ +export interface CreateFeedResponse { + /** + * + * @type {CreateFeedResult} + * @memberof CreateFeedResponse + */ + payload?: CreateFeedResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateFeedResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface CreateFeedResult + */ +export interface CreateFeedResult { + /** + * The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof CreateFeedResult + */ + feedId: string; +} +/** + * + * @export + * @interface CreateFeedSpecification + */ +export interface CreateFeedSpecification { + /** + * The feed type. + * @type {string} + * @memberof CreateFeedSpecification + */ + feedType: string; + /** + * A list of identifiers for marketplaces that you want the feed to be applied to. + * @type {Array} + * @memberof CreateFeedSpecification + */ + marketplaceIds: Array; + /** + * The document identifier returned by the createFeedDocument operation. Encrypt and upload the feed document contents before calling the createFeed operation. + * @type {string} + * @memberof CreateFeedSpecification + */ + inputFeedDocumentId: string; + /** + * Additional options to control the feed. These vary by feed type. + * @type {{ [key: string]: string; }} + * @memberof CreateFeedSpecification + */ + feedOptions?: { [key: string]: string; }; +} +/** + * + * @export + * @interface Feed + */ +export interface Feed { + /** + * The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof Feed + */ + feedId: string; + /** + * The feed type. + * @type {string} + * @memberof Feed + */ + feedType: string; + /** + * A list of identifiers for the marketplaces that the feed is applied to. + * @type {Array} + * @memberof Feed + */ + marketplaceIds?: Array; + /** + * The date and time when the feed was created, in ISO 8601 date time format. + * @type {string} + * @memberof Feed + */ + createdTime: string; + /** + * The processing status of the feed. + * @type {string} + * @memberof Feed + */ + processingStatus: FeedProcessingStatusEnum; + /** + * The date and time when feed processing started, in ISO 8601 date time format. + * @type {string} + * @memberof Feed + */ + processingStartTime?: string; + /** + * The date and time when feed processing completed, in ISO 8601 date time format. + * @type {string} + * @memberof Feed + */ + processingEndTime?: string; + /** + * The identifier for the feed document. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof Feed + */ + resultFeedDocumentId?: string; +} + +/** + * @export + * @enum {string} + */ +export enum FeedProcessingStatusEnum { + Cancelled = 'CANCELLED', + Done = 'DONE', + Fatal = 'FATAL', + InProgress = 'IN_PROGRESS', + InQueue = 'IN_QUEUE' +} + +/** + * + * @export + * @interface FeedDocument + */ +export interface FeedDocument { + /** + * The identifier for the feed document. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof FeedDocument + */ + feedDocumentId: string; + /** + * A presigned URL for the feed document. This URL expires after 5 minutes. + * @type {string} + * @memberof FeedDocument + */ + url: string; + /** + * + * @type {FeedDocumentEncryptionDetails} + * @memberof FeedDocument + */ + encryptionDetails: FeedDocumentEncryptionDetails; + /** + * If present, the feed document contents are compressed using the indicated algorithm. + * @type {string} + * @memberof FeedDocument + */ + compressionAlgorithm?: FeedDocumentCompressionAlgorithmEnum; +} + +/** + * @export + * @enum {string} + */ +export enum FeedDocumentCompressionAlgorithmEnum { + Gzip = 'GZIP' +} + +/** + * Encryption details for required client-side encryption and decryption of document contents. + * @export + * @interface FeedDocumentEncryptionDetails + */ +export interface FeedDocumentEncryptionDetails { + /** + * The encryption standard required to encrypt or decrypt the document contents. + * @type {string} + * @memberof FeedDocumentEncryptionDetails + */ + standard: FeedDocumentEncryptionDetailsStandardEnum; + /** + * The vector to encrypt or decrypt the document contents using Cipher Block Chaining (CBC). + * @type {string} + * @memberof FeedDocumentEncryptionDetails + */ + initializationVector: string; + /** + * The encryption key used to encrypt or decrypt the document contents. + * @type {string} + * @memberof FeedDocumentEncryptionDetails + */ + key: string; +} + +/** + * @export + * @enum {string} + */ +export enum FeedDocumentEncryptionDetailsStandardEnum { + Aes = 'AES' +} + +/** + * Response schema. + * @export + * @interface GetFeedDocumentResponse + */ +export interface GetFeedDocumentResponse { + /** + * + * @type {FeedDocument} + * @memberof GetFeedDocumentResponse + */ + payload?: FeedDocument; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFeedDocumentResponse + */ + errors?: Array; +} +/** + * Response schema. + * @export + * @interface GetFeedResponse + */ +export interface GetFeedResponse { + /** + * + * @type {Feed} + * @memberof GetFeedResponse + */ + payload?: Feed; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFeedResponse + */ + errors?: Array; +} +/** + * Response schema. + * @export + * @interface GetFeedsResponse + */ +export interface GetFeedsResponse { + /** + * + * @type {Array} + * @memberof GetFeedsResponse + */ + payload?: Array; + /** + * Returned when the number of results exceeds pageSize. To get the next page of results, call the getFeeds operation with this token as the only parameter. + * @type {string} + * @memberof GetFeedsResponse + */ + nextToken?: string; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFeedsResponse + */ + errors?: Array; +} +/** + * An error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} + +/** + * FeedsApi - axios parameter creator + * @export + */ +export const FeedsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelFeed: async (feedId: string, options: any = {}): Promise => { + // verify required parameter 'feedId' is not null or undefined + assertParamExists('cancelFeed', 'feedId', feedId) + const localVarPath = `/feeds/2020-09-04/feeds/{feedId}` + .replace(`{${"feedId"}}`, encodeURIComponent(String(feedId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a feed. Encrypt and upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFeed: async (body: CreateFeedSpecification, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createFeed', 'body', body) + const localVarPath = `/feeds/2020-09-04/feeds`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a feed document for the feed type that you specify. This operation returns encryption details for encrypting the contents of the document, as well as a presigned URL for uploading the encrypted feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call to the createFeed operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedDocumentSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFeedDocument: async (body: CreateFeedDocumentSpecification, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createFeedDocument', 'body', body) + const localVarPath = `/feeds/2020-09-04/documents`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeed: async (feedId: string, options: any = {}): Promise => { + // verify required parameter 'feedId' is not null or undefined + assertParamExists('getFeed', 'feedId', feedId) + const localVarPath = `/feeds/2020-09-04/feeds/{feedId}` + .replace(`{${"feedId"}}`, encodeURIComponent(String(feedId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the information required for retrieving a feed document\'s contents. This includes a presigned URL for the feed document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedDocumentId The identifier of the feed document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeedDocument: async (feedDocumentId: string, options: any = {}): Promise => { + // verify required parameter 'feedDocumentId' is not null or undefined + assertParamExists('getFeedDocument', 'feedDocumentId', feedDocumentId) + const localVarPath = `/feeds/2020-09-04/documents/{feedDocumentId}` + .replace(`{${"feedDocumentId"}}`, encodeURIComponent(String(feedDocumentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of feeds to return in a single call. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds. + * @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeeds: async (feedTypes?: Array, marketplaceIds?: Array, pageSize?: number, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, createdSince?: string, createdUntil?: string, nextToken?: string, options: any = {}): Promise => { + const localVarPath = `/feeds/2020-09-04/feeds`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (feedTypes) { + localVarQueryParameter['feedTypes'] = feedTypes.join(COLLECTION_FORMATS.csv); + } + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + if (processingStatuses) { + localVarQueryParameter['processingStatuses'] = processingStatuses.join(COLLECTION_FORMATS.csv); + } + + if (createdSince !== undefined) { + localVarQueryParameter['createdSince'] = (createdSince as any instanceof Date) ? + (createdSince as any).toISOString() : + createdSince; + } + + if (createdUntil !== undefined) { + localVarQueryParameter['createdUntil'] = (createdUntil as any instanceof Date) ? + (createdUntil as any).toISOString() : + createdUntil; + } + + if (nextToken !== undefined) { + localVarQueryParameter['nextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FeedsApi - functional programming interface + * @export + */ +export const FeedsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FeedsApiAxiosParamCreator(configuration) + return { + /** + * Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelFeed(feedId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFeed(feedId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Creates a feed. Encrypt and upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createFeed(body: CreateFeedSpecification, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFeed(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Creates a feed document for the feed type that you specify. This operation returns encryption details for encrypting the contents of the document, as well as a presigned URL for uploading the encrypted feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call to the createFeed operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedDocumentSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createFeedDocument(body: CreateFeedDocumentSpecification, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedDocument(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFeed(feedId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFeed(feedId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the information required for retrieving a feed document\'s contents. This includes a presigned URL for the feed document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedDocumentId The identifier of the feed document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFeedDocument(feedDocumentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFeedDocument(feedDocumentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of feeds to return in a single call. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds. + * @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFeeds(feedTypes?: Array, marketplaceIds?: Array, pageSize?: number, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, createdSince?: string, createdUntil?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FeedsApi - factory interface + * @export + */ +export const FeedsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FeedsApiFp(configuration) + return { + /** + * Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelFeed(feedId: string, options?: any): AxiosPromise { + return localVarFp.cancelFeed(feedId, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a feed. Encrypt and upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFeed(body: CreateFeedSpecification, options?: any): AxiosPromise { + return localVarFp.createFeed(body, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a feed document for the feed type that you specify. This operation returns encryption details for encrypting the contents of the document, as well as a presigned URL for uploading the encrypted feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call to the createFeed operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedDocumentSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFeedDocument(body: CreateFeedDocumentSpecification, options?: any): AxiosPromise { + return localVarFp.createFeedDocument(body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeed(feedId: string, options?: any): AxiosPromise { + return localVarFp.getFeed(feedId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the information required for retrieving a feed document\'s contents. This includes a presigned URL for the feed document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedDocumentId The identifier of the feed document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeedDocument(feedDocumentId: string, options?: any): AxiosPromise { + return localVarFp.getFeedDocument(feedDocumentId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of feeds to return in a single call. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds. + * @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeeds(feedTypes?: Array, marketplaceIds?: Array, pageSize?: number, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, createdSince?: string, createdUntil?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FeedsApi - object-oriented interface + * @export + * @class FeedsApi + * @extends {BaseAPI} + */ +export class FeedsApi extends BaseAPI { + /** + * Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedsApi + */ + public cancelFeed(feedId: string, options?: any) { + return FeedsApiFp(this.configuration).cancelFeed(feedId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a feed. Encrypt and upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedsApi + */ + public createFeed(body: CreateFeedSpecification, options?: any) { + return FeedsApiFp(this.configuration).createFeed(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a feed document for the feed type that you specify. This operation returns encryption details for encrypting the contents of the document, as well as a presigned URL for uploading the encrypted feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call to the createFeed operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFeedDocumentSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedsApi + */ + public createFeedDocument(body: CreateFeedDocumentSpecification, options?: any) { + return FeedsApiFp(this.configuration).createFeedDocument(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedsApi + */ + public getFeed(feedId: string, options?: any) { + return FeedsApiFp(this.configuration).getFeed(feedId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the information required for retrieving a feed document\'s contents. This includes a presigned URL for the feed document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} feedDocumentId The identifier of the feed document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedsApi + */ + public getFeedDocument(feedDocumentId: string, options?: any) { + return FeedsApiFp(this.configuration).getFeedDocument(feedDocumentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of feeds to return in a single call. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds. + * @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedsApi + */ + public getFeeds(feedTypes?: Array, marketplaceIds?: Array, pageSize?: number, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, createdSince?: string, createdUntil?: string, nextToken?: string, options?: any) { + return FeedsApiFp(this.configuration).getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/feeds-api-model/base.ts b/src/api-models/feeds-api-model/base.ts new file mode 100644 index 00000000..9159ea35 --- /dev/null +++ b/src/api-models/feeds-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Feeds + * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/feeds-api-model/common.ts b/src/api-models/feeds-api-model/common.ts new file mode 100644 index 00000000..83c45855 --- /dev/null +++ b/src/api-models/feeds-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Feeds + * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/feeds-api-model/configuration.ts b/src/api-models/feeds-api-model/configuration.ts new file mode 100644 index 00000000..a5b2b39e --- /dev/null +++ b/src/api-models/feeds-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Feeds + * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/feeds-api-model/git_push.sh b/src/api-models/feeds-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/feeds-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/feeds-api-model/index.ts b/src/api-models/feeds-api-model/index.ts new file mode 100644 index 00000000..03d0e56f --- /dev/null +++ b/src/api-models/feeds-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Feeds + * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/finances-api-model/.gitignore b/src/api-models/finances-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/finances-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/finances-api-model/.npmignore b/src/api-models/finances-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/finances-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/finances-api-model/.openapi-generator-ignore b/src/api-models/finances-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/finances-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/finances-api-model/.openapi-generator/FILES b/src/api-models/finances-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/finances-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/finances-api-model/.openapi-generator/VERSION b/src/api-models/finances-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/finances-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/finances-api-model/api.ts b/src/api-models/finances-api-model/api.ts new file mode 100644 index 00000000..adda714e --- /dev/null +++ b/src/api-models/finances-api-model/api.ts @@ -0,0 +1,2082 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Finances + * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * An adjustment to the seller\'s account. + * @export + * @interface AdjustmentEvent + */ +export interface AdjustmentEvent { + /** + * The type of adjustment. Possible values: * FBAInventoryReimbursement - An FBA inventory reimbursement to a seller\'s account. This occurs if a seller\'s inventory is damaged. * ReserveEvent - A reserve event that is generated at the time of a settlement period closing. This occurs when some money from a seller\'s account is held back. * PostageBilling - The amount paid by a seller for shipping labels. * PostageRefund - The reimbursement of shipping labels purchased for orders that were canceled or refunded. * LostOrDamagedReimbursement - An Amazon Easy Ship reimbursement to a seller\'s account for a package that we lost or damaged. * CanceledButPickedUpReimbursement - An Amazon Easy Ship reimbursement to a seller\'s account. This occurs when a package is picked up and the order is subsequently canceled. This value is used only in the India marketplace. * ReimbursementClawback - An Amazon Easy Ship reimbursement clawback from a seller\'s account. This occurs when a prior reimbursement is reversed. This value is used only in the India marketplace. * SellerRewards - An award credited to a seller\'s account for their participation in an offer in the Seller Rewards program. Applies only to the India marketplace. + * @type {string} + * @memberof AdjustmentEvent + */ + AdjustmentType?: string; + /** + * + * @type {string} + * @memberof AdjustmentEvent + */ + PostedDate?: string; + /** + * + * @type {Currency} + * @memberof AdjustmentEvent + */ + AdjustmentAmount?: Currency; + /** + * A list of information about items in an adjustment to the seller\'s account. + * @type {Array} + * @memberof AdjustmentEvent + */ + AdjustmentItemList?: Array; +} +/** + * An item in an adjustment to the seller\'s account. + * @export + * @interface AdjustmentItem + */ +export interface AdjustmentItem { + /** + * Represents the number of units in the seller\'s inventory when the AdustmentType is FBAInventoryReimbursement. + * @type {string} + * @memberof AdjustmentItem + */ + Quantity?: string; + /** + * + * @type {Currency} + * @memberof AdjustmentItem + */ + PerUnitAmount?: Currency; + /** + * + * @type {Currency} + * @memberof AdjustmentItem + */ + TotalAmount?: Currency; + /** + * The seller SKU of the item. The seller SKU is qualified by the seller\'s seller ID, which is included with every call to the Selling Partner API. + * @type {string} + * @memberof AdjustmentItem + */ + SellerSKU?: string; + /** + * A unique identifier assigned to products stored in and fulfilled from a fulfillment center. + * @type {string} + * @memberof AdjustmentItem + */ + FnSKU?: string; + /** + * A short description of the item. + * @type {string} + * @memberof AdjustmentItem + */ + ProductDescription?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof AdjustmentItem + */ + ASIN?: string; +} +/** + * An expense related to an affordability promotion. + * @export + * @interface AffordabilityExpenseEvent + */ +export interface AffordabilityExpenseEvent { + /** + * An Amazon-defined identifier for an order. + * @type {string} + * @memberof AffordabilityExpenseEvent + */ + AmazonOrderId?: string; + /** + * + * @type {string} + * @memberof AffordabilityExpenseEvent + */ + PostedDate?: string; + /** + * An encrypted, Amazon-defined marketplace identifier. + * @type {string} + * @memberof AffordabilityExpenseEvent + */ + MarketplaceId?: string; + /** + * Indicates the type of transaction. Possible values: * Charge - For an affordability promotion expense. * Refund - For an affordability promotion expense reversal. + * @type {string} + * @memberof AffordabilityExpenseEvent + */ + TransactionType?: string; + /** + * + * @type {Currency} + * @memberof AffordabilityExpenseEvent + */ + BaseExpense?: Currency; + /** + * + * @type {Currency} + * @memberof AffordabilityExpenseEvent + */ + TaxTypeCGST: Currency; + /** + * + * @type {Currency} + * @memberof AffordabilityExpenseEvent + */ + TaxTypeSGST: Currency; + /** + * + * @type {Currency} + * @memberof AffordabilityExpenseEvent + */ + TaxTypeIGST: Currency; + /** + * + * @type {Currency} + * @memberof AffordabilityExpenseEvent + */ + TotalExpense?: Currency; +} +/** + * A charge on the seller\'s account. Possible values: * Principal - The selling price of the order item, equal to the selling price of the item multiplied by the quantity ordered. * Tax - The tax collected by the seller on the Principal. * MarketplaceFacilitatorTax-Principal - The tax withheld on the Principal. * MarketplaceFacilitatorTax-Shipping - The tax withheld on the ShippingCharge. * MarketplaceFacilitatorTax-Giftwrap - The tax withheld on the Giftwrap charge. * MarketplaceFacilitatorTax-Other - The tax withheld on other miscellaneous charges. * Discount - The promotional discount for an order item. * TaxDiscount - The tax amount deducted for promotional rebates. * CODItemCharge - The COD charge for an order item. * CODItemTaxCharge - The tax collected by the seller on a CODItemCharge. * CODOrderCharge - The COD charge for an order. * CODOrderTaxCharge - The tax collected by the seller on a CODOrderCharge. * CODShippingCharge - Shipping charges for a COD order. * CODShippingTaxCharge - The tax collected by the seller on a CODShippingCharge. * ShippingCharge - The shipping charge. * ShippingTax - The tax collected by the seller on a ShippingCharge. * Goodwill - The amount given to a buyer as a gesture of goodwill or to compensate for pain and suffering in the buying experience. * Giftwrap - The gift wrap charge. * GiftwrapTax - The tax collected by the seller on a Giftwrap charge. * RestockingFee - The charge applied to the buyer when returning a product in certain categories. * ReturnShipping - The amount given to the buyer to compensate for shipping the item back in the event we are at fault. * PointsFee - The value of Amazon Points deducted from the refund if the buyer does not have enough Amazon Points to cover the deduction. * GenericDeduction - A generic bad debt deduction. * FreeReplacementReturnShipping - The compensation for return shipping when a buyer receives the wrong item, requests a free replacement, and returns the incorrect item. * PaymentMethodFee - The fee collected for certain payment methods in certain marketplaces. * ExportCharge - The export duty that is charged when an item is shipped to an international destination as part of the Amazon Global program. * SAFE-TReimbursement - The SAFE-T claim amount for the item. * TCS-CGST - Tax Collected at Source (TCS) for Central Goods and Services Tax (CGST). * TCS-SGST - Tax Collected at Source for State Goods and Services Tax (SGST). * TCS-IGST - Tax Collected at Source for Integrated Goods and Services Tax (IGST). * TCS-UTGST - Tax Collected at Source for Union Territories Goods and Services Tax (UTGST). + * @export + * @interface ChargeComponent + */ +export interface ChargeComponent { + /** + * The type of charge. + * @type {string} + * @memberof ChargeComponent + */ + ChargeType?: string; + /** + * + * @type {Currency} + * @memberof ChargeComponent + */ + ChargeAmount?: Currency; +} +/** + * A payment instrument. + * @export + * @interface ChargeInstrument + */ +export interface ChargeInstrument { + /** + * A short description of the charge instrument. + * @type {string} + * @memberof ChargeInstrument + */ + Description?: string; + /** + * The account tail (trailing digits) of the charge instrument. + * @type {string} + * @memberof ChargeInstrument + */ + Tail?: string; + /** + * + * @type {Currency} + * @memberof ChargeInstrument + */ + Amount?: Currency; +} +/** + * An event related to coupon payments. + * @export + * @interface CouponPaymentEvent + */ +export interface CouponPaymentEvent { + /** + * + * @type {string} + * @memberof CouponPaymentEvent + */ + PostedDate?: string; + /** + * A coupon identifier. + * @type {string} + * @memberof CouponPaymentEvent + */ + CouponId?: string; + /** + * The description provided by the seller when they created the coupon. + * @type {string} + * @memberof CouponPaymentEvent + */ + SellerCouponDescription?: string; + /** + * The number of coupon clips or redemptions. + * @type {number} + * @memberof CouponPaymentEvent + */ + ClipOrRedemptionCount?: number; + /** + * A payment event identifier. + * @type {string} + * @memberof CouponPaymentEvent + */ + PaymentEventId?: string; + /** + * + * @type {FeeComponent} + * @memberof CouponPaymentEvent + */ + FeeComponent?: FeeComponent; + /** + * + * @type {ChargeComponent} + * @memberof CouponPaymentEvent + */ + ChargeComponent?: ChargeComponent; + /** + * + * @type {Currency} + * @memberof CouponPaymentEvent + */ + TotalAmount?: Currency; +} +/** + * A currency type and amount. + * @export + * @interface Currency + */ +export interface Currency { + /** + * The three-digit currency code in ISO 4217 format. + * @type {string} + * @memberof Currency + */ + CurrencyCode?: string; + /** + * + * @type {number} + * @memberof Currency + */ + CurrencyAmount?: number; +} +/** + * A debt payment or debt adjustment. + * @export + * @interface DebtRecoveryEvent + */ +export interface DebtRecoveryEvent { + /** + * The debt recovery type. Possible values: * DebtPayment * DebtPaymentFailure *DebtAdjustment + * @type {string} + * @memberof DebtRecoveryEvent + */ + DebtRecoveryType?: string; + /** + * + * @type {Currency} + * @memberof DebtRecoveryEvent + */ + RecoveryAmount?: Currency; + /** + * + * @type {Currency} + * @memberof DebtRecoveryEvent + */ + OverPaymentCredit?: Currency; + /** + * A list of debt recovery item information. + * @type {Array} + * @memberof DebtRecoveryEvent + */ + DebtRecoveryItemList?: Array; + /** + * A list of payment instruments. + * @type {Array} + * @memberof DebtRecoveryEvent + */ + ChargeInstrumentList?: Array; +} +/** + * An item of a debt payment or debt adjustment. + * @export + * @interface DebtRecoveryItem + */ +export interface DebtRecoveryItem { + /** + * + * @type {Currency} + * @memberof DebtRecoveryItem + */ + RecoveryAmount?: Currency; + /** + * + * @type {Currency} + * @memberof DebtRecoveryItem + */ + OriginalAmount?: Currency; + /** + * + * @type {string} + * @memberof DebtRecoveryItem + */ + GroupBeginDate?: string; + /** + * + * @type {string} + * @memberof DebtRecoveryItem + */ + GroupEndDate?: string; +} +/** + * A payment made directly to a seller. + * @export + * @interface DirectPayment + */ +export interface DirectPayment { + /** + * The type of payment. Possible values: * StoredValueCardRevenue - The amount that is deducted from the seller\'s account because the seller received money through a stored value card. * StoredValueCardRefund - The amount that Amazon returns to the seller if the order that is bought using a stored value card is refunded. * PrivateLabelCreditCardRevenue - The amount that is deducted from the seller\'s account because the seller received money through a private label credit card offered by Amazon. * PrivateLabelCreditCardRefund - The amount that Amazon returns to the seller if the order that is bought using a private label credit card offered by Amazon is refunded. * CollectOnDeliveryRevenue - The COD amount that the seller collected directly from the buyer. * CollectOnDeliveryRefund - The amount that Amazon refunds to the buyer if an order paid for by COD is refunded. + * @type {string} + * @memberof DirectPayment + */ + DirectPaymentType?: string; + /** + * + * @type {Currency} + * @memberof DirectPayment + */ + DirectPaymentAmount?: Currency; +} +/** + * A payment event for Fulfillment by Amazon (FBA) inventory liquidation. This event is used only in the US marketplace. + * @export + * @interface FBALiquidationEvent + */ +export interface FBALiquidationEvent { + /** + * + * @type {string} + * @memberof FBALiquidationEvent + */ + PostedDate?: string; + /** + * The identifier for the original removal order. + * @type {string} + * @memberof FBALiquidationEvent + */ + OriginalRemovalOrderId?: string; + /** + * + * @type {Currency} + * @memberof FBALiquidationEvent + */ + LiquidationProceedsAmount?: Currency; + /** + * + * @type {Currency} + * @memberof FBALiquidationEvent + */ + LiquidationFeeAmount?: Currency; +} +/** + * A fee associated with the event. + * @export + * @interface FeeComponent + */ +export interface FeeComponent { + /** + * The type of fee. For more information about Selling on Amazon fees, see [Selling on Amazon Fee Schedule](https://sellercentral.amazon.com/gp/help/200336920) on Seller Central. For more information about Fulfillment by Amazon fees, see [FBA features, services and fees](https://sellercentral.amazon.com/gp/help/201074400) on Seller Central. + * @type {string} + * @memberof FeeComponent + */ + FeeType?: string; + /** + * + * @type {Currency} + * @memberof FeeComponent + */ + FeeAmount?: Currency; +} +/** + * Information related to a financial event group. + * @export + * @interface FinancialEventGroup + */ +export interface FinancialEventGroup { + /** + * A unique identifier for the financial event group. + * @type {string} + * @memberof FinancialEventGroup + */ + FinancialEventGroupId?: string; + /** + * The processing status of the financial event group indicates whether the balance of the financial event group is settled. Possible values: * Open * Closed + * @type {string} + * @memberof FinancialEventGroup + */ + ProcessingStatus?: string; + /** + * The status of the fund transfer. + * @type {string} + * @memberof FinancialEventGroup + */ + FundTransferStatus?: string; + /** + * + * @type {Currency} + * @memberof FinancialEventGroup + */ + OriginalTotal?: Currency; + /** + * + * @type {Currency} + * @memberof FinancialEventGroup + */ + ConvertedTotal?: Currency; + /** + * + * @type {string} + * @memberof FinancialEventGroup + */ + FundTransferDate?: string; + /** + * The trace identifier used by sellers to look up transactions externally. + * @type {string} + * @memberof FinancialEventGroup + */ + TraceId?: string; + /** + * The account tail of the payment instrument. + * @type {string} + * @memberof FinancialEventGroup + */ + AccountTail?: string; + /** + * + * @type {Currency} + * @memberof FinancialEventGroup + */ + BeginningBalance?: Currency; + /** + * + * @type {string} + * @memberof FinancialEventGroup + */ + FinancialEventGroupStart?: string; + /** + * + * @type {string} + * @memberof FinancialEventGroup + */ + FinancialEventGroupEnd?: string; +} +/** + * Contains all information related to a financial event. + * @export + * @interface FinancialEvents + */ +export interface FinancialEvents { + /** + * A list of shipment event information. + * @type {Array} + * @memberof FinancialEvents + */ + ShipmentEventList?: Array; + /** + * A list of shipment event information. + * @type {Array} + * @memberof FinancialEvents + */ + RefundEventList?: Array; + /** + * A list of shipment event information. + * @type {Array} + * @memberof FinancialEvents + */ + GuaranteeClaimEventList?: Array; + /** + * A list of shipment event information. + * @type {Array} + * @memberof FinancialEvents + */ + ChargebackEventList?: Array; + /** + * A list of events related to the seller\'s Pay with Amazon account. + * @type {Array} + * @memberof FinancialEvents + */ + PayWithAmazonEventList?: Array; + /** + * A list of information about solution provider credits. + * @type {Array} + * @memberof FinancialEvents + */ + ServiceProviderCreditEventList?: Array; + /** + * A list of information about Retrocharge or RetrochargeReversal events. + * @type {Array} + * @memberof FinancialEvents + */ + RetrochargeEventList?: Array; + /** + * A list of rental transaction event information. + * @type {Array} + * @memberof FinancialEvents + */ + RentalTransactionEventList?: Array; + /** + * A list of sponsored products payment events. + * @type {Array} + * @memberof FinancialEvents + */ + ProductAdsPaymentEventList?: Array; + /** + * A list of information about service fee events. + * @type {Array} + * @memberof FinancialEvents + */ + ServiceFeeEventList?: Array; + /** + * A list of payment events for deal-related fees. + * @type {Array} + * @memberof FinancialEvents + */ + SellerDealPaymentEventList?: Array; + /** + * A list of debt recovery event information. + * @type {Array} + * @memberof FinancialEvents + */ + DebtRecoveryEventList?: Array; + /** + * A list of loan servicing events. + * @type {Array} + * @memberof FinancialEvents + */ + LoanServicingEventList?: Array; + /** + * A list of adjustment event information for the seller\'s account. + * @type {Array} + * @memberof FinancialEvents + */ + AdjustmentEventList?: Array; + /** + * A list of SAFETReimbursementEvents. + * @type {Array} + * @memberof FinancialEvents + */ + SAFETReimbursementEventList?: Array; + /** + * A list of information about fee events for the Early Reviewer Program. + * @type {Array} + * @memberof FinancialEvents + */ + SellerReviewEnrollmentPaymentEventList?: Array; + /** + * A list of FBA inventory liquidation payment events. + * @type {Array} + * @memberof FinancialEvents + */ + FBALiquidationEventList?: Array; + /** + * A list of coupon payment event information. + * @type {Array} + * @memberof FinancialEvents + */ + CouponPaymentEventList?: Array; + /** + * A list of fee events related to Amazon Imaging services. + * @type {Array} + * @memberof FinancialEvents + */ + ImagingServicesFeeEventList?: Array; + /** + * A list of network commingling transaction events. + * @type {Array} + * @memberof FinancialEvents + */ + NetworkComminglingTransactionEventList?: Array; + /** + * A list of expense information related to an affordability promotion. + * @type {Array} + * @memberof FinancialEvents + */ + AffordabilityExpenseEventList?: Array; + /** + * A list of expense information related to an affordability promotion. + * @type {Array} + * @memberof FinancialEvents + */ + AffordabilityExpenseReversalEventList?: Array; +} +/** + * A fee event related to Amazon Imaging services. + * @export + * @interface ImagingServicesFeeEvent + */ +export interface ImagingServicesFeeEvent { + /** + * The identifier for the imaging services request. + * @type {string} + * @memberof ImagingServicesFeeEvent + */ + ImagingRequestBillingItemID?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item for which the imaging service was requested. + * @type {string} + * @memberof ImagingServicesFeeEvent + */ + ASIN?: string; + /** + * + * @type {string} + * @memberof ImagingServicesFeeEvent + */ + PostedDate?: string; + /** + * A list of fee component information. + * @type {Array} + * @memberof ImagingServicesFeeEvent + */ + FeeList?: Array; +} +/** + * The payload for the listFinancialEventGroups operation. + * @export + * @interface ListFinancialEventGroupsPayload + */ +export interface ListFinancialEventGroupsPayload { + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof ListFinancialEventGroupsPayload + */ + NextToken?: string; + /** + * A list of financial event group information. + * @type {Array} + * @memberof ListFinancialEventGroupsPayload + */ + FinancialEventGroupList?: Array; +} +/** + * The response schema for the listFinancialEventGroups operation. + * @export + * @interface ListFinancialEventGroupsResponse + */ +export interface ListFinancialEventGroupsResponse { + /** + * + * @type {ListFinancialEventGroupsPayload} + * @memberof ListFinancialEventGroupsResponse + */ + payload?: ListFinancialEventGroupsPayload; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ListFinancialEventGroupsResponse + */ + errors?: Array; +} +/** + * The payload for the listFinancialEvents operation. + * @export + * @interface ListFinancialEventsPayload + */ +export interface ListFinancialEventsPayload { + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof ListFinancialEventsPayload + */ + NextToken?: string; + /** + * + * @type {FinancialEvents} + * @memberof ListFinancialEventsPayload + */ + FinancialEvents?: FinancialEvents; +} +/** + * The response schema for the listFinancialEvents operation. + * @export + * @interface ListFinancialEventsResponse + */ +export interface ListFinancialEventsResponse { + /** + * + * @type {ListFinancialEventsPayload} + * @memberof ListFinancialEventsResponse + */ + payload?: ListFinancialEventsPayload; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ListFinancialEventsResponse + */ + errors?: Array; +} +/** + * A loan advance, loan payment, or loan refund. + * @export + * @interface LoanServicingEvent + */ +export interface LoanServicingEvent { + /** + * + * @type {Currency} + * @memberof LoanServicingEvent + */ + LoanAmount?: Currency; + /** + * The type of event. Possible values: * LoanAdvance * LoanPayment * LoanRefund + * @type {string} + * @memberof LoanServicingEvent + */ + SourceBusinessEventType?: string; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * A network commingling transaction event. + * @export + * @interface NetworkComminglingTransactionEvent + */ +export interface NetworkComminglingTransactionEvent { + /** + * The type of network item swap. Possible values: * NetCo - A Fulfillment by Amazon inventory pooling transaction. Available only in the India marketplace. * ComminglingVAT - A commingling VAT transaction. Available only in the UK, Spain, France, Germany, and Italy marketplaces. + * @type {string} + * @memberof NetworkComminglingTransactionEvent + */ + TransactionType?: string; + /** + * + * @type {string} + * @memberof NetworkComminglingTransactionEvent + */ + PostedDate?: string; + /** + * The identifier for the network item swap. + * @type {string} + * @memberof NetworkComminglingTransactionEvent + */ + NetCoTransactionID?: string; + /** + * The reason for the network item swap. + * @type {string} + * @memberof NetworkComminglingTransactionEvent + */ + SwapReason?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the swapped item. + * @type {string} + * @memberof NetworkComminglingTransactionEvent + */ + ASIN?: string; + /** + * The marketplace in which the event took place. + * @type {string} + * @memberof NetworkComminglingTransactionEvent + */ + MarketplaceId?: string; + /** + * + * @type {Currency} + * @memberof NetworkComminglingTransactionEvent + */ + TaxExclusiveAmount?: Currency; + /** + * + * @type {Currency} + * @memberof NetworkComminglingTransactionEvent + */ + TaxAmount?: Currency; +} +/** + * An event related to the seller\'s Pay with Amazon account. + * @export + * @interface PayWithAmazonEvent + */ +export interface PayWithAmazonEvent { + /** + * An order identifier that is specified by the seller. + * @type {string} + * @memberof PayWithAmazonEvent + */ + SellerOrderId?: string; + /** + * + * @type {string} + * @memberof PayWithAmazonEvent + */ + TransactionPostedDate?: string; + /** + * The type of business object. + * @type {string} + * @memberof PayWithAmazonEvent + */ + BusinessObjectType?: string; + /** + * The sales channel for the transaction. + * @type {string} + * @memberof PayWithAmazonEvent + */ + SalesChannel?: string; + /** + * + * @type {ChargeComponent} + * @memberof PayWithAmazonEvent + */ + Charge?: ChargeComponent; + /** + * A list of fee component information. + * @type {Array} + * @memberof PayWithAmazonEvent + */ + FeeList?: Array; + /** + * The type of payment. Possible values: * Sales + * @type {string} + * @memberof PayWithAmazonEvent + */ + PaymentAmountType?: string; + /** + * A short description of this payment event. + * @type {string} + * @memberof PayWithAmazonEvent + */ + AmountDescription?: string; + /** + * The fulfillment channel. Possible values: * AFN - Amazon Fulfillment Network (Fulfillment by Amazon) * MFN - Merchant Fulfillment Network (self-fulfilled) + * @type {string} + * @memberof PayWithAmazonEvent + */ + FulfillmentChannel?: string; + /** + * The store name where the event occurred. + * @type {string} + * @memberof PayWithAmazonEvent + */ + StoreName?: string; +} +/** + * A Sponsored Products payment event. + * @export + * @interface ProductAdsPaymentEvent + */ +export interface ProductAdsPaymentEvent { + /** + * + * @type {string} + * @memberof ProductAdsPaymentEvent + */ + postedDate?: string; + /** + * Indicates if the transaction is for a charge or a refund. Possible values: * charge - Charge * refund - Refund + * @type {string} + * @memberof ProductAdsPaymentEvent + */ + transactionType?: string; + /** + * Identifier for the invoice that the transaction appears in. + * @type {string} + * @memberof ProductAdsPaymentEvent + */ + invoiceId?: string; + /** + * + * @type {Currency} + * @memberof ProductAdsPaymentEvent + */ + baseValue?: Currency; + /** + * + * @type {Currency} + * @memberof ProductAdsPaymentEvent + */ + taxValue?: Currency; + /** + * + * @type {Currency} + * @memberof ProductAdsPaymentEvent + */ + transactionValue?: Currency; +} +/** + * A promotion applied to an item. + * @export + * @interface Promotion + */ +export interface Promotion { + /** + * The type of promotion. + * @type {string} + * @memberof Promotion + */ + PromotionType?: string; + /** + * The seller-specified identifier for the promotion. + * @type {string} + * @memberof Promotion + */ + PromotionId?: string; + /** + * + * @type {Currency} + * @memberof Promotion + */ + PromotionAmount?: Currency; +} +/** + * A removal shipment event for a removal order. + * @export + * @interface RemovalShipmentEvent + */ +export interface RemovalShipmentEvent { + /** + * + * @type {string} + * @memberof RemovalShipmentEvent + */ + PostedDate?: string; + /** + * The identifier for the removal shipment order. + * @type {string} + * @memberof RemovalShipmentEvent + */ + OrderId?: string; + /** + * The type of removal order. Possible values: * WHOLESALE_LIQUIDATION + * @type {string} + * @memberof RemovalShipmentEvent + */ + TransactionType?: string; + /** + * A list of information about removal shipment items. + * @type {Array} + * @memberof RemovalShipmentEvent + */ + RemovalShipmentItemList?: Array; +} +/** + * Item-level information for a removal shipment. + * @export + * @interface RemovalShipmentItem + */ +export interface RemovalShipmentItem { + /** + * An identifier for an item in a removal shipment. + * @type {string} + * @memberof RemovalShipmentItem + */ + RemovalShipmentItemId?: string; + /** + * The tax collection model applied to the item. Possible values: * MarketplaceFacilitator - Tax is withheld and remitted to the taxing authority by Amazon on behalf of the seller. * Standard - Tax is paid to the seller and not remitted to the taxing authority by Amazon. + * @type {string} + * @memberof RemovalShipmentItem + */ + TaxCollectionModel?: string; + /** + * The Amazon fulfillment network SKU for the item. + * @type {string} + * @memberof RemovalShipmentItem + */ + FulfillmentNetworkSKU?: string; + /** + * The quantity of the item. + * @type {number} + * @memberof RemovalShipmentItem + */ + Quantity?: number; + /** + * + * @type {Currency} + * @memberof RemovalShipmentItem + */ + Revenue?: Currency; + /** + * + * @type {Currency} + * @memberof RemovalShipmentItem + */ + FeeAmount?: Currency; + /** + * + * @type {Currency} + * @memberof RemovalShipmentItem + */ + TaxAmount?: Currency; + /** + * + * @type {Currency} + * @memberof RemovalShipmentItem + */ + TaxWithheld?: Currency; +} +/** + * An event related to a rental transaction. + * @export + * @interface RentalTransactionEvent + */ +export interface RentalTransactionEvent { + /** + * An Amazon-defined identifier for an order. + * @type {string} + * @memberof RentalTransactionEvent + */ + AmazonOrderId?: string; + /** + * The type of rental event. Possible values: * RentalCustomerPayment-Buyout - Transaction type that represents when the customer wants to buy out a rented item. * RentalCustomerPayment-Extension - Transaction type that represents when the customer wants to extend the rental period. * RentalCustomerRefund-Buyout - Transaction type that represents when the customer requests a refund for the buyout of the rented item. * RentalCustomerRefund-Extension - Transaction type that represents when the customer requests a refund over the extension on the rented item. * RentalHandlingFee - Transaction type that represents the fee that Amazon charges sellers who rent through Amazon. * RentalChargeFailureReimbursement - Transaction type that represents when Amazon sends money to the seller to compensate for a failed charge. * RentalLostItemReimbursement - Transaction type that represents when Amazon sends money to the seller to compensate for a lost item. + * @type {string} + * @memberof RentalTransactionEvent + */ + RentalEventType?: string; + /** + * The number of days that the buyer extended an already rented item. This value is only returned for RentalCustomerPayment-Extension and RentalCustomerRefund-Extension events. + * @type {number} + * @memberof RentalTransactionEvent + */ + ExtensionLength?: number; + /** + * + * @type {string} + * @memberof RentalTransactionEvent + */ + PostedDate?: string; + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof RentalTransactionEvent + */ + RentalChargeList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof RentalTransactionEvent + */ + RentalFeeList?: Array; + /** + * The name of the marketplace. + * @type {string} + * @memberof RentalTransactionEvent + */ + MarketplaceName?: string; + /** + * + * @type {Currency} + * @memberof RentalTransactionEvent + */ + RentalInitialValue?: Currency; + /** + * + * @type {Currency} + * @memberof RentalTransactionEvent + */ + RentalReimbursement?: Currency; + /** + * A list of information about taxes withheld. + * @type {Array} + * @memberof RentalTransactionEvent + */ + RentalTaxWithheldList?: Array; +} +/** + * A retrocharge or retrocharge reversal. + * @export + * @interface RetrochargeEvent + */ +export interface RetrochargeEvent { + /** + * The type of event. Possible values: * Retrocharge * RetrochargeReversal + * @type {string} + * @memberof RetrochargeEvent + */ + RetrochargeEventType?: string; + /** + * An Amazon-defined identifier for an order. + * @type {string} + * @memberof RetrochargeEvent + */ + AmazonOrderId?: string; + /** + * + * @type {string} + * @memberof RetrochargeEvent + */ + PostedDate?: string; + /** + * + * @type {Currency} + * @memberof RetrochargeEvent + */ + BaseTax?: Currency; + /** + * + * @type {Currency} + * @memberof RetrochargeEvent + */ + ShippingTax?: Currency; + /** + * The name of the marketplace where the retrocharge event occurred. + * @type {string} + * @memberof RetrochargeEvent + */ + MarketplaceName?: string; + /** + * A list of information about taxes withheld. + * @type {Array} + * @memberof RetrochargeEvent + */ + RetrochargeTaxWithheldList?: Array; +} +/** + * A SAFE-T claim reimbursement on the seller\'s account. + * @export + * @interface SAFETReimbursementEvent + */ +export interface SAFETReimbursementEvent { + /** + * + * @type {string} + * @memberof SAFETReimbursementEvent + */ + PostedDate?: string; + /** + * A SAFE-T claim identifier. + * @type {string} + * @memberof SAFETReimbursementEvent + */ + SAFETClaimId?: string; + /** + * + * @type {Currency} + * @memberof SAFETReimbursementEvent + */ + ReimbursedAmount?: Currency; + /** + * Indicates why the seller was reimbursed. + * @type {string} + * @memberof SAFETReimbursementEvent + */ + ReasonCode?: string; + /** + * A list of SAFETReimbursementItems. + * @type {Array} + * @memberof SAFETReimbursementEvent + */ + SAFETReimbursementItemList?: Array; +} +/** + * An item from a SAFE-T claim reimbursement. + * @export + * @interface SAFETReimbursementItem + */ +export interface SAFETReimbursementItem { + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof SAFETReimbursementItem + */ + itemChargeList?: Array; + /** + * The description of the item as shown on the product detail page on the retail website. + * @type {string} + * @memberof SAFETReimbursementItem + */ + productDescription?: string; + /** + * The number of units of the item being reimbursed. + * @type {string} + * @memberof SAFETReimbursementItem + */ + quantity?: string; +} +/** + * An event linked to the payment of a fee related to the specified deal. + * @export + * @interface SellerDealPaymentEvent + */ +export interface SellerDealPaymentEvent { + /** + * + * @type {string} + * @memberof SellerDealPaymentEvent + */ + postedDate?: string; + /** + * The unique identifier of the deal. + * @type {string} + * @memberof SellerDealPaymentEvent + */ + dealId?: string; + /** + * The internal description of the deal. + * @type {string} + * @memberof SellerDealPaymentEvent + */ + dealDescription?: string; + /** + * The type of event: SellerDealComplete. + * @type {string} + * @memberof SellerDealPaymentEvent + */ + eventType?: string; + /** + * The type of fee: RunLightningDealFee. + * @type {string} + * @memberof SellerDealPaymentEvent + */ + feeType?: string; + /** + * + * @type {Currency} + * @memberof SellerDealPaymentEvent + */ + feeAmount?: Currency; + /** + * + * @type {Currency} + * @memberof SellerDealPaymentEvent + */ + taxAmount?: Currency; + /** + * + * @type {Currency} + * @memberof SellerDealPaymentEvent + */ + totalAmount?: Currency; +} +/** + * A fee payment event for the Early Reviewer Program. + * @export + * @interface SellerReviewEnrollmentPaymentEvent + */ +export interface SellerReviewEnrollmentPaymentEvent { + /** + * + * @type {string} + * @memberof SellerReviewEnrollmentPaymentEvent + */ + PostedDate?: string; + /** + * An enrollment identifier. + * @type {string} + * @memberof SellerReviewEnrollmentPaymentEvent + */ + EnrollmentId?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item that was enrolled in the Early Reviewer Program. + * @type {string} + * @memberof SellerReviewEnrollmentPaymentEvent + */ + ParentASIN?: string; + /** + * + * @type {FeeComponent} + * @memberof SellerReviewEnrollmentPaymentEvent + */ + FeeComponent?: FeeComponent; + /** + * + * @type {ChargeComponent} + * @memberof SellerReviewEnrollmentPaymentEvent + */ + ChargeComponent?: ChargeComponent; + /** + * + * @type {Currency} + * @memberof SellerReviewEnrollmentPaymentEvent + */ + TotalAmount?: Currency; +} +/** + * A service fee on the seller\'s account. + * @export + * @interface ServiceFeeEvent + */ +export interface ServiceFeeEvent { + /** + * An Amazon-defined identifier for an order. + * @type {string} + * @memberof ServiceFeeEvent + */ + AmazonOrderId?: string; + /** + * A short description of the service fee reason. + * @type {string} + * @memberof ServiceFeeEvent + */ + FeeReason?: string; + /** + * A list of fee component information. + * @type {Array} + * @memberof ServiceFeeEvent + */ + FeeList?: Array; + /** + * The seller SKU of the item. The seller SKU is qualified by the seller\'s seller ID, which is included with every call to the Selling Partner API. + * @type {string} + * @memberof ServiceFeeEvent + */ + SellerSKU?: string; + /** + * A unique identifier assigned by Amazon to products stored in and fulfilled from an Amazon fulfillment center. + * @type {string} + * @memberof ServiceFeeEvent + */ + FnSKU?: string; + /** + * A short description of the service fee event. + * @type {string} + * @memberof ServiceFeeEvent + */ + FeeDescription?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ServiceFeeEvent + */ + ASIN?: string; +} +/** + * A shipment, refund, guarantee claim, or chargeback. + * @export + * @interface ShipmentEvent + */ +export interface ShipmentEvent { + /** + * An Amazon-defined identifier for an order. + * @type {string} + * @memberof ShipmentEvent + */ + AmazonOrderId?: string; + /** + * A seller-defined identifier for an order. + * @type {string} + * @memberof ShipmentEvent + */ + SellerOrderId?: string; + /** + * The name of the marketplace where the event occurred. + * @type {string} + * @memberof ShipmentEvent + */ + MarketplaceName?: string; + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof ShipmentEvent + */ + OrderChargeList?: Array; + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof ShipmentEvent + */ + OrderChargeAdjustmentList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof ShipmentEvent + */ + ShipmentFeeList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof ShipmentEvent + */ + ShipmentFeeAdjustmentList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof ShipmentEvent + */ + OrderFeeList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof ShipmentEvent + */ + OrderFeeAdjustmentList?: Array; + /** + * A list of direct payment information. + * @type {Array} + * @memberof ShipmentEvent + */ + DirectPaymentList?: Array; + /** + * + * @type {string} + * @memberof ShipmentEvent + */ + PostedDate?: string; + /** + * A list of shipment items. + * @type {Array} + * @memberof ShipmentEvent + */ + ShipmentItemList?: Array; + /** + * A list of shipment items. + * @type {Array} + * @memberof ShipmentEvent + */ + ShipmentItemAdjustmentList?: Array; +} +/** + * An item of a shipment, refund, guarantee claim, or chargeback. + * @export + * @interface ShipmentItem + */ +export interface ShipmentItem { + /** + * The seller SKU of the item. The seller SKU is qualified by the seller\'s seller ID, which is included with every call to the Selling Partner API. + * @type {string} + * @memberof ShipmentItem + */ + SellerSKU?: string; + /** + * An Amazon-defined order item identifier. + * @type {string} + * @memberof ShipmentItem + */ + OrderItemId?: string; + /** + * An Amazon-defined order adjustment identifier defined for refunds, guarantee claims, and chargeback events. + * @type {string} + * @memberof ShipmentItem + */ + OrderAdjustmentItemId?: string; + /** + * The number of items shipped. + * @type {number} + * @memberof ShipmentItem + */ + QuantityShipped?: number; + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof ShipmentItem + */ + ItemChargeList?: Array; + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof ShipmentItem + */ + ItemChargeAdjustmentList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof ShipmentItem + */ + ItemFeeList?: Array; + /** + * A list of fee component information. + * @type {Array} + * @memberof ShipmentItem + */ + ItemFeeAdjustmentList?: Array; + /** + * A list of information about taxes withheld. + * @type {Array} + * @memberof ShipmentItem + */ + ItemTaxWithheldList?: Array; + /** + * A list of promotions. + * @type {Array} + * @memberof ShipmentItem + */ + PromotionList?: Array; + /** + * A list of promotions. + * @type {Array} + * @memberof ShipmentItem + */ + PromotionAdjustmentList?: Array; + /** + * + * @type {Currency} + * @memberof ShipmentItem + */ + CostOfPointsGranted?: Currency; + /** + * + * @type {Currency} + * @memberof ShipmentItem + */ + CostOfPointsReturned?: Currency; +} +/** + * A credit given to a solution provider. + * @export + * @interface SolutionProviderCreditEvent + */ +export interface SolutionProviderCreditEvent { + /** + * The transaction type. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + ProviderTransactionType?: string; + /** + * A seller-defined identifier for an order. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + SellerOrderId?: string; + /** + * The identifier of the marketplace where the order was placed. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + MarketplaceId?: string; + /** + * The two-letter country code of the country associated with the marketplace where the order was placed. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + MarketplaceCountryCode?: string; + /** + * The Amazon-defined identifier of the seller. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + SellerId?: string; + /** + * The store name where the payment event occurred. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + SellerStoreName?: string; + /** + * The Amazon-defined identifier of the solution provider. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + ProviderId?: string; + /** + * The store name where the payment event occurred. + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + ProviderStoreName?: string; + /** + * + * @type {Currency} + * @memberof SolutionProviderCreditEvent + */ + TransactionAmount?: Currency; + /** + * + * @type {string} + * @memberof SolutionProviderCreditEvent + */ + TransactionCreationDate?: string; +} +/** + * A tax deduction at source (TDS) claim reimbursement event on the seller\'s account. + * @export + * @interface TDSReimbursementEvent + */ +export interface TDSReimbursementEvent { + /** + * + * @type {string} + * @memberof TDSReimbursementEvent + */ + PostedDate?: string; + /** + * A tax deduction at source (TDS) claim identifier. + * @type {string} + * @memberof TDSReimbursementEvent + */ + TdsOrderId?: string; + /** + * + * @type {Currency} + * @memberof TDSReimbursementEvent + */ + ReimbursedAmount?: Currency; +} +/** + * Information about the taxes withheld. + * @export + * @interface TaxWithheldComponent + */ +export interface TaxWithheldComponent { + /** + * The tax collection model applied to the item. Possible values: * MarketplaceFacilitator - Tax is withheld and remitted to the taxing authority by Amazon on behalf of the seller. * Standard - Tax is paid to the seller and not remitted to the taxing authority by Amazon. + * @type {string} + * @memberof TaxWithheldComponent + */ + TaxCollectionModel?: string; + /** + * A list of charge information on the seller\'s account. + * @type {Array} + * @memberof TaxWithheldComponent + */ + TaxesWithheld?: Array; +} +/** + * An event related to a trial shipment. + * @export + * @interface TrialShipmentEvent + */ +export interface TrialShipmentEvent { + /** + * An Amazon-defined identifier for an order. + * @type {string} + * @memberof TrialShipmentEvent + */ + AmazonOrderId?: string; + /** + * The identifier of the financial event group. + * @type {string} + * @memberof TrialShipmentEvent + */ + FinancialEventGroupId?: string; + /** + * + * @type {string} + * @memberof TrialShipmentEvent + */ + PostedDate?: string; + /** + * The seller SKU of the item. The seller SKU is qualified by the seller\'s seller ID, which is included with every call to the Selling Partner API. + * @type {string} + * @memberof TrialShipmentEvent + */ + SKU?: string; + /** + * A list of fee component information. + * @type {Array} + * @memberof TrialShipmentEvent + */ + FeeList?: Array; +} + +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. + * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEventGroups: async (maxResultsPerPage?: number, financialEventGroupStartedBefore?: string, financialEventGroupStartedAfter?: string, nextToken?: string, options: any = {}): Promise => { + const localVarPath = `/finances/v0/financialEventGroups`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (maxResultsPerPage !== undefined) { + localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage; + } + + if (financialEventGroupStartedBefore !== undefined) { + localVarQueryParameter['FinancialEventGroupStartedBefore'] = (financialEventGroupStartedBefore as any instanceof Date) ? + (financialEventGroupStartedBefore as any).toISOString() : + financialEventGroupStartedBefore; + } + + if (financialEventGroupStartedAfter !== undefined) { + localVarQueryParameter['FinancialEventGroupStartedAfter'] = (financialEventGroupStartedAfter as any instanceof Date) ? + (financialEventGroupStartedAfter as any).toISOString() : + financialEventGroupStartedAfter; + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. + * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEvents: async (maxResultsPerPage?: number, postedAfter?: string, postedBefore?: string, nextToken?: string, options: any = {}): Promise => { + const localVarPath = `/finances/v0/financialEvents`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (maxResultsPerPage !== undefined) { + localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage; + } + + if (postedAfter !== undefined) { + localVarQueryParameter['PostedAfter'] = (postedAfter as any instanceof Date) ? + (postedAfter as any).toISOString() : + postedAfter; + } + + if (postedBefore !== undefined) { + localVarQueryParameter['PostedBefore'] = (postedBefore as any instanceof Date) ? + (postedBefore as any).toISOString() : + postedBefore; + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} eventGroupId The identifier of the financial event group to which the events belong. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEventsByGroupId: async (eventGroupId: string, maxResultsPerPage?: number, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'eventGroupId' is not null or undefined + assertParamExists('listFinancialEventsByGroupId', 'eventGroupId', eventGroupId) + const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents` + .replace(`{${"eventGroupId"}}`, encodeURIComponent(String(eventGroupId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (maxResultsPerPage !== undefined) { + localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage; + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEventsByOrderId: async (orderId: string, maxResultsPerPage?: number, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('listFinancialEventsByOrderId', 'orderId', orderId) + const localVarPath = `/finances/v0/orders/{orderId}/financialEvents` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (maxResultsPerPage !== undefined) { + localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage; + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. + * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFinancialEventGroups(maxResultsPerPage?: number, financialEventGroupStartedBefore?: string, financialEventGroupStartedAfter?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. + * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFinancialEvents(maxResultsPerPage?: number, postedAfter?: string, postedBefore?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} eventGroupId The identifier of the financial event group to which the events belong. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFinancialEventsByGroupId(eventGroupId: string, maxResultsPerPage?: number, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFinancialEventsByOrderId(orderId: string, maxResultsPerPage?: number, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. + * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEventGroups(maxResultsPerPage?: number, financialEventGroupStartedBefore?: string, financialEventGroupStartedAfter?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. + * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEvents(maxResultsPerPage?: number, postedAfter?: string, postedBefore?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} eventGroupId The identifier of the financial event group to which the events belong. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEventsByGroupId(eventGroupId: string, maxResultsPerPage?: number, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFinancialEventsByOrderId(orderId: string, maxResultsPerPage?: number, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [financialEventGroupStartedBefore] A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. + * @param {string} [financialEventGroupStartedAfter] A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public listFinancialEventGroups(maxResultsPerPage?: number, financialEventGroupStartedBefore?: string, financialEventGroupStartedAfter?: string, nextToken?: string, options?: any) { + return DefaultApiFp(this.configuration).listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [postedAfter] A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. + * @param {string} [postedBefore] A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public listFinancialEvents(maxResultsPerPage?: number, postedAfter?: string, postedBefore?: string, nextToken?: string, options?: any) { + return DefaultApiFp(this.configuration).listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} eventGroupId The identifier of the financial event group to which the events belong. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public listFinancialEventsByGroupId(eventGroupId: string, maxResultsPerPage?: number, nextToken?: string, options?: any) { + return DefaultApiFp(this.configuration).listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {number} [maxResultsPerPage] The maximum number of results to return per page. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public listFinancialEventsByOrderId(orderId: string, maxResultsPerPage?: number, nextToken?: string, options?: any) { + return DefaultApiFp(this.configuration).listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/finances-api-model/base.ts b/src/api-models/finances-api-model/base.ts new file mode 100644 index 00000000..4173b9b3 --- /dev/null +++ b/src/api-models/finances-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Finances + * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/finances-api-model/common.ts b/src/api-models/finances-api-model/common.ts new file mode 100644 index 00000000..1e25ded8 --- /dev/null +++ b/src/api-models/finances-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Finances + * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/finances-api-model/configuration.ts b/src/api-models/finances-api-model/configuration.ts new file mode 100644 index 00000000..17d6af5e --- /dev/null +++ b/src/api-models/finances-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Finances + * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/finances-api-model/git_push.sh b/src/api-models/finances-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/finances-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/finances-api-model/index.ts b/src/api-models/finances-api-model/index.ts new file mode 100644 index 00000000..e5d66b84 --- /dev/null +++ b/src/api-models/finances-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Finances + * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/fulfillment-inbound-api-model/.gitignore b/src/api-models/fulfillment-inbound-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/fulfillment-inbound-api-model/.npmignore b/src/api-models/fulfillment-inbound-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/fulfillment-inbound-api-model/.openapi-generator-ignore b/src/api-models/fulfillment-inbound-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/fulfillment-inbound-api-model/.openapi-generator/FILES b/src/api-models/fulfillment-inbound-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/fulfillment-inbound-api-model/.openapi-generator/VERSION b/src/api-models/fulfillment-inbound-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/fulfillment-inbound-api-model/api.ts b/src/api-models/fulfillment-inbound-api-model/api.ts new file mode 100644 index 00000000..faf26459 --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/api.ts @@ -0,0 +1,3505 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Fulfillment Inbound + * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Reasons why a given ASIN is not recommended for shipment to Amazon\'s fulfillment network. + * @export + * @interface ASINInboundGuidance + */ +export interface ASINInboundGuidance { + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ASINInboundGuidance + */ + ASIN: string; + /** + * + * @type {InboundGuidance} + * @memberof ASINInboundGuidance + */ + InboundGuidance: InboundGuidance; + /** + * A list of inbound guidance reason information. + * @type {Array} + * @memberof ASINInboundGuidance + */ + GuidanceReasonList?: Array; +} +/** + * Item preparation instructions to help with item sourcing decisions. + * @export + * @interface ASINPrepInstructions + */ +export interface ASINPrepInstructions { + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ASINPrepInstructions + */ + ASIN?: string; + /** + * + * @type {BarcodeInstruction} + * @memberof ASINPrepInstructions + */ + BarcodeInstruction?: BarcodeInstruction; + /** + * + * @type {PrepGuidance} + * @memberof ASINPrepInstructions + */ + PrepGuidance?: PrepGuidance; + /** + * A list of preparation instructions to help with item sourcing decisions. + * @type {Array} + * @memberof ASINPrepInstructions + */ + PrepInstructionList?: Array; +} +/** + * + * @export + * @interface Address + */ +export interface Address { + /** + * Name of the individual or business. + * @type {string} + * @memberof Address + */ + Name: string; + /** + * The street address information. + * @type {string} + * @memberof Address + */ + AddressLine1: string; + /** + * Additional street address information, if required. + * @type {string} + * @memberof Address + */ + AddressLine2?: string; + /** + * The district or county. + * @type {string} + * @memberof Address + */ + DistrictOrCounty?: string; + /** + * The city. + * @type {string} + * @memberof Address + */ + City: string; + /** + * The state or province code. If state or province codes are used in your marketplace, it is recommended that you include one with your request. This helps Amazon to select the most appropriate Amazon fulfillment center for your inbound shipment plan. + * @type {string} + * @memberof Address + */ + StateOrProvinceCode: string; + /** + * The country code in two-character ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Address + */ + CountryCode: string; + /** + * The postal code. If postal codes are used in your marketplace, we recommended that you include one with your request. This helps Amazon select the most appropriate Amazon fulfillment center for the inbound shipment plan. + * @type {string} + * @memberof Address + */ + PostalCode: string; +} +/** + * The fees for Amazon to prep goods for shipment. + * @export + * @interface AmazonPrepFeesDetails + */ +export interface AmazonPrepFeesDetails { + /** + * + * @type {PrepInstruction} + * @memberof AmazonPrepFeesDetails + */ + PrepInstruction?: PrepInstruction; + /** + * + * @type {Amount} + * @memberof AmazonPrepFeesDetails + */ + FeePerUnit?: Amount; +} +/** + * The monetary value. + * @export + * @interface Amount + */ +export interface Amount { + /** + * + * @type {CurrencyCode} + * @memberof Amount + */ + CurrencyCode: CurrencyCode; + /** + * + * @type {number} + * @memberof Amount + */ + Value: number; +} +/** + * Labeling requirements for the item. For more information about FBA labeling requirements, see the Seller Central Help for your marketplace. + * @export + * @enum {string} + */ +export enum BarcodeInstruction { + RequiresFnskuLabel = 'RequiresFNSKULabel', + CanUseOriginalBarcode = 'CanUseOriginalBarcode', + MustProvideSellerSku = 'MustProvideSellerSKU' +} + +/** + * + * @export + * @interface BillOfLadingDownloadURL + */ +export interface BillOfLadingDownloadURL { + /** + * URL to download the bill of lading for the package. Note: The URL will only be valid for 15 seconds + * @type {string} + * @memberof BillOfLadingDownloadURL + */ + DownloadURL?: string; +} +/** + * The manual processing fee per unit and total fee for a shipment. + * @export + * @interface BoxContentsFeeDetails + */ +export interface BoxContentsFeeDetails { + /** + * The item quantity. + * @type {number} + * @memberof BoxContentsFeeDetails + */ + TotalUnits?: number; + /** + * + * @type {Amount} + * @memberof BoxContentsFeeDetails + */ + FeePerUnit?: Amount; + /** + * + * @type {Amount} + * @memberof BoxContentsFeeDetails + */ + TotalFee?: Amount; +} +/** + * Where the seller provided box contents information for a shipment. + * @export + * @enum {string} + */ +export enum BoxContentsSource { + None = 'NONE', + Feed = 'FEED', + _2DBarcode = '2D_BARCODE', + Interactive = 'INTERACTIVE' +} + +/** + * + * @export + * @interface CommonTransportResult + */ +export interface CommonTransportResult { + /** + * + * @type {TransportResult} + * @memberof CommonTransportResult + */ + TransportResult?: TransportResult; +} +/** + * The condition of the item. + * @export + * @enum {string} + */ +export enum Condition { + NewItem = 'NewItem', + NewWithWarranty = 'NewWithWarranty', + NewOem = 'NewOEM', + NewOpenBox = 'NewOpenBox', + UsedLikeNew = 'UsedLikeNew', + UsedVeryGood = 'UsedVeryGood', + UsedGood = 'UsedGood', + UsedAcceptable = 'UsedAcceptable', + UsedPoor = 'UsedPoor', + UsedRefurbished = 'UsedRefurbished', + CollectibleLikeNew = 'CollectibleLikeNew', + CollectibleVeryGood = 'CollectibleVeryGood', + CollectibleGood = 'CollectibleGood', + CollectibleAcceptable = 'CollectibleAcceptable', + CollectiblePoor = 'CollectiblePoor', + RefurbishedWithWarranty = 'RefurbishedWithWarranty', + Refurbished = 'Refurbished', + Club = 'Club' +} + +/** + * The response schema for the confirmPreorder operation. + * @export + * @interface ConfirmPreorderResponse + */ +export interface ConfirmPreorderResponse { + /** + * + * @type {ConfirmPreorderResult} + * @memberof ConfirmPreorderResponse + */ + payload?: ConfirmPreorderResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ConfirmPreorderResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface ConfirmPreorderResult + */ +export interface ConfirmPreorderResult { + /** + * + * @type {string} + * @memberof ConfirmPreorderResult + */ + ConfirmedNeedByDate?: string; + /** + * + * @type {string} + * @memberof ConfirmPreorderResult + */ + ConfirmedFulfillableDate?: string; +} +/** + * The response schema for the confirmTransport operation. + * @export + * @interface ConfirmTransportResponse + */ +export interface ConfirmTransportResponse { + /** + * + * @type {CommonTransportResult} + * @memberof ConfirmTransportResponse + */ + payload?: CommonTransportResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ConfirmTransportResponse + */ + errors?: Array; +} +/** + * Contact information for the person in the seller\'s organization who is responsible for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. + * @export + * @interface Contact + */ +export interface Contact { + /** + * The name of the contact person. + * @type {string} + * @memberof Contact + */ + Name: string; + /** + * The phone number of the contact person. + * @type {string} + * @memberof Contact + */ + Phone: string; + /** + * The email address of the contact person. + * @type {string} + * @memberof Contact + */ + Email: string; + /** + * The fax number of the contact person. + * @type {string} + * @memberof Contact + */ + Fax?: string; +} +/** + * The request schema for the createInboundShipmentPlan operation. + * @export + * @interface CreateInboundShipmentPlanRequest + */ +export interface CreateInboundShipmentPlanRequest { + /** + * + * @type {Address} + * @memberof CreateInboundShipmentPlanRequest + */ + ShipFromAddress: Address; + /** + * + * @type {LabelPrepPreference} + * @memberof CreateInboundShipmentPlanRequest + */ + LabelPrepPreference: LabelPrepPreference; + /** + * The two-character country code for the country where the inbound shipment is to be sent. Note: Not required. Specifying both ShipToCountryCode and ShipToCountrySubdivisionCode returns an error. Values: ShipToCountryCode values for North America: * CA – Canada * MX - Mexico * US - United States ShipToCountryCode values for MCI sellers in Europe: * DE – Germany * ES – Spain * FR – France * GB – United Kingdom * IT – Italy Default: The country code for the seller\'s home marketplace. + * @type {string} + * @memberof CreateInboundShipmentPlanRequest + */ + ShipToCountryCode?: string; + /** + * The two-character country code, followed by a dash and then up to three characters that represent the subdivision of the country where the inbound shipment is to be sent. For example, \"IN-MH\". In full ISO 3166-2 format. Note: Not required. Specifying both ShipToCountryCode and ShipToCountrySubdivisionCode returns an error. + * @type {string} + * @memberof CreateInboundShipmentPlanRequest + */ + ShipToCountrySubdivisionCode?: string; + /** + * + * @type {Array} + * @memberof CreateInboundShipmentPlanRequest + */ + InboundShipmentPlanRequestItems: Array; +} +/** + * The response schema for the createInboundShipmentPlan operation. + * @export + * @interface CreateInboundShipmentPlanResponse + */ +export interface CreateInboundShipmentPlanResponse { + /** + * + * @type {CreateInboundShipmentPlanResult} + * @memberof CreateInboundShipmentPlanResponse + */ + payload?: CreateInboundShipmentPlanResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateInboundShipmentPlanResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface CreateInboundShipmentPlanResult + */ +export interface CreateInboundShipmentPlanResult { + /** + * A list of inbound shipment plan information + * @type {Array} + * @memberof CreateInboundShipmentPlanResult + */ + InboundShipmentPlans?: Array; +} +/** + * The currency code. + * @export + * @enum {string} + */ +export enum CurrencyCode { + Usd = 'USD', + Gbp = 'GBP' +} + +/** + * The dimension values and unit of measurement. + * @export + * @interface Dimensions + */ +export interface Dimensions { + /** + * + * @type {number} + * @memberof Dimensions + */ + Length: number; + /** + * + * @type {number} + * @memberof Dimensions + */ + Width: number; + /** + * + * @type {number} + * @memberof Dimensions + */ + Height: number; + /** + * + * @type {UnitOfMeasurement} + * @memberof Dimensions + */ + Unit: UnitOfMeasurement; +} +/** + * The reason that the ASIN is invalid. + * @export + * @enum {string} + */ +export enum ErrorReason { + DoesNotExist = 'DoesNotExist', + InvalidAsin = 'InvalidASIN' +} + +/** + * The response schema for the estimateTransport operation. + * @export + * @interface EstimateTransportResponse + */ +export interface EstimateTransportResponse { + /** + * + * @type {CommonTransportResult} + * @memberof EstimateTransportResponse + */ + payload?: CommonTransportResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof EstimateTransportResponse + */ + errors?: Array; +} +/** + * The response schema for the getBillOfLading operation. + * @export + * @interface GetBillOfLadingResponse + */ +export interface GetBillOfLadingResponse { + /** + * + * @type {BillOfLadingDownloadURL} + * @memberof GetBillOfLadingResponse + */ + payload?: BillOfLadingDownloadURL; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetBillOfLadingResponse + */ + errors?: Array; +} +/** + * The response schema for the getInboundGuidance operation. + * @export + * @interface GetInboundGuidanceResponse + */ +export interface GetInboundGuidanceResponse { + /** + * + * @type {GetInboundGuidanceResult} + * @memberof GetInboundGuidanceResponse + */ + payload?: GetInboundGuidanceResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetInboundGuidanceResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetInboundGuidanceResult + */ +export interface GetInboundGuidanceResult { + /** + * A list of SKU inbound guidance information. + * @type {Array} + * @memberof GetInboundGuidanceResult + */ + SKUInboundGuidanceList?: Array; + /** + * A list of invalid SKU values and the reason they are invalid. + * @type {Array} + * @memberof GetInboundGuidanceResult + */ + InvalidSKUList?: Array; + /** + * A list of ASINs and their associated inbound guidance. + * @type {Array} + * @memberof GetInboundGuidanceResult + */ + ASINInboundGuidanceList?: Array; + /** + * A list of invalid ASIN values and the reasons they are invalid. + * @type {Array} + * @memberof GetInboundGuidanceResult + */ + InvalidASINList?: Array; +} +/** + * The response schema for the getLabels operation. + * @export + * @interface GetLabelsResponse + */ +export interface GetLabelsResponse { + /** + * + * @type {LabelDownloadURL} + * @memberof GetLabelsResponse + */ + payload?: LabelDownloadURL; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetLabelsResponse + */ + errors?: Array; +} +/** + * The response schema for the getPreorderInfo operation. + * @export + * @interface GetPreorderInfoResponse + */ +export interface GetPreorderInfoResponse { + /** + * + * @type {GetPreorderInfoResult} + * @memberof GetPreorderInfoResponse + */ + payload?: GetPreorderInfoResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetPreorderInfoResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetPreorderInfoResult + */ +export interface GetPreorderInfoResult { + /** + * Indicates whether the shipment contains items that have been enabled for pre-order. For more information about enabling items for pre-order, see the Seller Central Help. + * @type {boolean} + * @memberof GetPreorderInfoResult + */ + ShipmentContainsPreorderableItems?: boolean; + /** + * Indicates whether this shipment has been confirmed for pre-order. + * @type {boolean} + * @memberof GetPreorderInfoResult + */ + ShipmentConfirmedForPreorder?: boolean; + /** + * + * @type {string} + * @memberof GetPreorderInfoResult + */ + NeedByDate?: string; + /** + * + * @type {string} + * @memberof GetPreorderInfoResult + */ + ConfirmedFulfillableDate?: string; +} +/** + * The response schema for the getPrepInstructions operation. + * @export + * @interface GetPrepInstructionsResponse + */ +export interface GetPrepInstructionsResponse { + /** + * + * @type {GetPrepInstructionsResult} + * @memberof GetPrepInstructionsResponse + */ + payload?: GetPrepInstructionsResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetPrepInstructionsResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetPrepInstructionsResult + */ +export interface GetPrepInstructionsResult { + /** + * A list of SKU labeling requirements and item preparation instructions. + * @type {Array} + * @memberof GetPrepInstructionsResult + */ + SKUPrepInstructionsList?: Array; + /** + * A list of invalid SKU values and the reason they are invalid. + * @type {Array} + * @memberof GetPrepInstructionsResult + */ + InvalidSKUList?: Array; + /** + * A list of item preparation instructions. + * @type {Array} + * @memberof GetPrepInstructionsResult + */ + ASINPrepInstructionsList?: Array; + /** + * A list of invalid ASIN values and the reasons they are invalid. + * @type {Array} + * @memberof GetPrepInstructionsResult + */ + InvalidASINList?: Array; +} +/** + * The response schema for the getShipmentItems operation. + * @export + * @interface GetShipmentItemsResponse + */ +export interface GetShipmentItemsResponse { + /** + * + * @type {GetShipmentItemsResult} + * @memberof GetShipmentItemsResponse + */ + payload?: GetShipmentItemsResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetShipmentItemsResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetShipmentItemsResult + */ +export interface GetShipmentItemsResult { + /** + * A list of inbound shipment item information. + * @type {Array} + * @memberof GetShipmentItemsResult + */ + ItemData?: Array; + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof GetShipmentItemsResult + */ + NextToken?: string; +} +/** + * The response schema for the getShipments operation. + * @export + * @interface GetShipmentsResponse + */ +export interface GetShipmentsResponse { + /** + * + * @type {GetShipmentsResult} + * @memberof GetShipmentsResponse + */ + payload?: GetShipmentsResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetShipmentsResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetShipmentsResult + */ +export interface GetShipmentsResult { + /** + * A list of inbound shipment information. + * @type {Array} + * @memberof GetShipmentsResult + */ + ShipmentData?: Array; + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof GetShipmentsResult + */ + NextToken?: string; +} +/** + * The response schema for the getTransportDetails operation. + * @export + * @interface GetTransportDetailsResponse + */ +export interface GetTransportDetailsResponse { + /** + * + * @type {GetTransportDetailsResult} + * @memberof GetTransportDetailsResponse + */ + payload?: GetTransportDetailsResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetTransportDetailsResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetTransportDetailsResult + */ +export interface GetTransportDetailsResult { + /** + * + * @type {TransportContent} + * @memberof GetTransportDetailsResult + */ + TransportContent?: TransportContent; +} +/** + * A reason for the current inbound guidance for an item. + * @export + * @enum {string} + */ +export enum GuidanceReason { + SlowMovingAsin = 'SlowMovingASIN', + NoApplicableGuidance = 'NoApplicableGuidance' +} + +/** + * Specific inbound guidance for an item. + * @export + * @enum {string} + */ +export enum InboundGuidance { + InboundNotRecommended = 'InboundNotRecommended', + InboundOk = 'InboundOK' +} + +/** + * Inbound shipment information used to create and update inbound shipments. + * @export + * @interface InboundShipmentHeader + */ +export interface InboundShipmentHeader { + /** + * The name for the shipment. Use a naming convention that helps distinguish between shipments over time, such as the date the shipment was created. + * @type {string} + * @memberof InboundShipmentHeader + */ + ShipmentName: string; + /** + * + * @type {Address} + * @memberof InboundShipmentHeader + */ + ShipFromAddress: Address; + /** + * The identifier for the fulfillment center to which the shipment will be shipped. Get this value from the InboundShipmentPlan object in the response returned by the createInboundShipmentPlan operation. + * @type {string} + * @memberof InboundShipmentHeader + */ + DestinationFulfillmentCenterId: string; + /** + * Indicates whether or not an inbound shipment contains case-packed boxes. Note: A shipment must contain either all case-packed boxes or all individually packed boxes. Possible values: true - All boxes in the shipment must be case packed. false - All boxes in the shipment must be individually packed. Note: If AreCasesRequired = true for an inbound shipment, then the value of QuantityInCase must be greater than zero for every item in the shipment. Otherwise the service returns an error. + * @type {boolean} + * @memberof InboundShipmentHeader + */ + AreCasesRequired?: boolean; + /** + * + * @type {ShipmentStatus} + * @memberof InboundShipmentHeader + */ + ShipmentStatus: ShipmentStatus; + /** + * + * @type {LabelPrepPreference} + * @memberof InboundShipmentHeader + */ + LabelPrepPreference: LabelPrepPreference; + /** + * + * @type {IntendedBoxContentsSource} + * @memberof InboundShipmentHeader + */ + IntendedBoxContentsSource?: IntendedBoxContentsSource; +} +/** + * Information about the seller\'s inbound shipments. Returned by the listInboundShipments operation. + * @export + * @interface InboundShipmentInfo + */ +export interface InboundShipmentInfo { + /** + * The shipment identifier submitted in the request. + * @type {string} + * @memberof InboundShipmentInfo + */ + ShipmentId?: string; + /** + * The name for the inbound shipment. + * @type {string} + * @memberof InboundShipmentInfo + */ + ShipmentName?: string; + /** + * + * @type {Address} + * @memberof InboundShipmentInfo + */ + ShipFromAddress: Address; + /** + * An Amazon fulfillment center identifier created by Amazon. + * @type {string} + * @memberof InboundShipmentInfo + */ + DestinationFulfillmentCenterId?: string; + /** + * + * @type {ShipmentStatus} + * @memberof InboundShipmentInfo + */ + ShipmentStatus?: ShipmentStatus; + /** + * + * @type {LabelPrepType} + * @memberof InboundShipmentInfo + */ + LabelPrepType?: LabelPrepType; + /** + * Indicates whether or not an inbound shipment contains case-packed boxes. When AreCasesRequired = true for an inbound shipment, all items in the inbound shipment must be case packed. + * @type {boolean} + * @memberof InboundShipmentInfo + */ + AreCasesRequired: boolean; + /** + * + * @type {string} + * @memberof InboundShipmentInfo + */ + ConfirmedNeedByDate?: string; + /** + * + * @type {BoxContentsSource} + * @memberof InboundShipmentInfo + */ + BoxContentsSource?: BoxContentsSource; + /** + * + * @type {BoxContentsFeeDetails} + * @memberof InboundShipmentInfo + */ + EstimatedBoxContentsFee?: BoxContentsFeeDetails; +} +/** + * Item information for an inbound shipment. Submitted with a call to the createInboundShipment or updateInboundShipment operation. + * @export + * @interface InboundShipmentItem + */ +export interface InboundShipmentItem { + /** + * A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @type {string} + * @memberof InboundShipmentItem + */ + ShipmentId?: string; + /** + * The seller SKU of the item. + * @type {string} + * @memberof InboundShipmentItem + */ + SellerSKU: string; + /** + * Amazon\'s fulfillment network SKU of the item. + * @type {string} + * @memberof InboundShipmentItem + */ + FulfillmentNetworkSKU?: string; + /** + * The item quantity. + * @type {number} + * @memberof InboundShipmentItem + */ + QuantityShipped: number; + /** + * The item quantity. + * @type {number} + * @memberof InboundShipmentItem + */ + QuantityReceived?: number; + /** + * The item quantity. + * @type {number} + * @memberof InboundShipmentItem + */ + QuantityInCase?: number; + /** + * + * @type {string} + * @memberof InboundShipmentItem + */ + ReleaseDate?: string; + /** + * A list of preparation instructions and who is responsible for that preparation. + * @type {Array} + * @memberof InboundShipmentItem + */ + PrepDetailsList?: Array; +} +/** + * Inbound shipment information used to create an inbound shipment. Returned by the createInboundShipmentPlan operation. + * @export + * @interface InboundShipmentPlan + */ +export interface InboundShipmentPlan { + /** + * A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @type {string} + * @memberof InboundShipmentPlan + */ + ShipmentId: string; + /** + * An Amazon fulfillment center identifier created by Amazon. + * @type {string} + * @memberof InboundShipmentPlan + */ + DestinationFulfillmentCenterId: string; + /** + * + * @type {Address} + * @memberof InboundShipmentPlan + */ + ShipToAddress: Address; + /** + * + * @type {LabelPrepType} + * @memberof InboundShipmentPlan + */ + LabelPrepType: LabelPrepType; + /** + * A list of inbound shipment plan item information. + * @type {Array} + * @memberof InboundShipmentPlan + */ + Items: Array; + /** + * + * @type {BoxContentsFeeDetails} + * @memberof InboundShipmentPlan + */ + EstimatedBoxContentsFee?: BoxContentsFeeDetails; +} +/** + * Item information used to create an inbound shipment. Returned by the createInboundShipmentPlan operation. + * @export + * @interface InboundShipmentPlanItem + */ +export interface InboundShipmentPlanItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof InboundShipmentPlanItem + */ + SellerSKU: string; + /** + * Amazon\'s fulfillment network SKU of the item. + * @type {string} + * @memberof InboundShipmentPlanItem + */ + FulfillmentNetworkSKU: string; + /** + * The item quantity. + * @type {number} + * @memberof InboundShipmentPlanItem + */ + Quantity: number; + /** + * A list of preparation instructions and who is responsible for that preparation. + * @type {Array} + * @memberof InboundShipmentPlanItem + */ + PrepDetailsList?: Array; +} +/** + * Item information for creating an inbound shipment plan. Submitted with a call to the createInboundShipmentPlan operation. + * @export + * @interface InboundShipmentPlanRequestItem + */ +export interface InboundShipmentPlanRequestItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof InboundShipmentPlanRequestItem + */ + SellerSKU: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof InboundShipmentPlanRequestItem + */ + ASIN: string; + /** + * + * @type {Condition} + * @memberof InboundShipmentPlanRequestItem + */ + Condition: Condition; + /** + * The item quantity. + * @type {number} + * @memberof InboundShipmentPlanRequestItem + */ + Quantity: number; + /** + * The item quantity. + * @type {number} + * @memberof InboundShipmentPlanRequestItem + */ + QuantityInCase?: number; + /** + * A list of preparation instructions and who is responsible for that preparation. + * @type {Array} + * @memberof InboundShipmentPlanRequestItem + */ + PrepDetailsList?: Array; +} +/** + * The request schema for an inbound shipment. + * @export + * @interface InboundShipmentRequest + */ +export interface InboundShipmentRequest { + /** + * + * @type {InboundShipmentHeader} + * @memberof InboundShipmentRequest + */ + InboundShipmentHeader: InboundShipmentHeader; + /** + * A list of inbound shipment item information. + * @type {Array} + * @memberof InboundShipmentRequest + */ + InboundShipmentItems: Array; + /** + * A marketplace identifier. Specifies the marketplace where the product would be stored. + * @type {string} + * @memberof InboundShipmentRequest + */ + MarketplaceId: string; +} +/** + * The response schema for this operation. + * @export + * @interface InboundShipmentResponse + */ +export interface InboundShipmentResponse { + /** + * + * @type {InboundShipmentResult} + * @memberof InboundShipmentResponse + */ + payload?: InboundShipmentResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof InboundShipmentResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface InboundShipmentResult + */ +export interface InboundShipmentResult { + /** + * The shipment identifier submitted in the request. + * @type {string} + * @memberof InboundShipmentResult + */ + ShipmentId: string; +} +/** + * How the seller intends to provide box contents information for a shipment. + * @export + * @enum {string} + */ +export enum IntendedBoxContentsSource { + None = 'NONE', + Feed = 'FEED', + _2DBarcode = '2D_BARCODE' +} + +/** + * + * @export + * @interface InvalidASIN + */ +export interface InvalidASIN { + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof InvalidASIN + */ + ASIN?: string; + /** + * + * @type {ErrorReason} + * @memberof InvalidASIN + */ + ErrorReason?: ErrorReason; +} +/** + * + * @export + * @interface InvalidSKU + */ +export interface InvalidSKU { + /** + * The seller SKU of the item. + * @type {string} + * @memberof InvalidSKU + */ + SellerSKU?: string; + /** + * + * @type {ErrorReason} + * @memberof InvalidSKU + */ + ErrorReason?: ErrorReason; +} +/** + * + * @export + * @interface LabelDownloadURL + */ +export interface LabelDownloadURL { + /** + * URL to download the label for the package. Note: The URL will only be valid for 15 seconds + * @type {string} + * @memberof LabelDownloadURL + */ + DownloadURL?: string; +} +/** + * The preference for label preparation for an inbound shipment. + * @export + * @enum {string} + */ +export enum LabelPrepPreference { + SellerLabel = 'SELLER_LABEL', + AmazonLabelOnly = 'AMAZON_LABEL_ONLY', + AmazonLabelPreferred = 'AMAZON_LABEL_PREFERRED' +} + +/** + * The type of label preparation that is required for the inbound shipment. + * @export + * @enum {string} + */ +export enum LabelPrepType { + NoLabel = 'NO_LABEL', + SellerLabel = 'SELLER_LABEL', + AmazonLabel = 'AMAZON_LABEL' +} + +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occured. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * Information that you provide to Amazon about a Less Than Truckload/Full Truckload (LTL/FTL) shipment by a carrier that has not partnered with Amazon. + * @export + * @interface NonPartneredLtlDataInput + */ +export interface NonPartneredLtlDataInput { + /** + * The carrier that you are using for the inbound shipment. + * @type {string} + * @memberof NonPartneredLtlDataInput + */ + CarrierName: string; + /** + * The PRO number (\"progressive number\" or \"progressive ID\") assigned to the shipment by the carrier. + * @type {string} + * @memberof NonPartneredLtlDataInput + */ + ProNumber: string; +} +/** + * Information returned by Amazon about a Less Than Truckload/Full Truckload (LTL/FTL) shipment shipped by a carrier that has not partnered with Amazon. + * @export + * @interface NonPartneredLtlDataOutput + */ +export interface NonPartneredLtlDataOutput { + /** + * The carrier that you are using for the inbound shipment. + * @type {string} + * @memberof NonPartneredLtlDataOutput + */ + CarrierName: string; + /** + * The PRO number (\"progressive number\" or \"progressive ID\") assigned to the shipment by the carrier. + * @type {string} + * @memberof NonPartneredLtlDataOutput + */ + ProNumber: string; +} +/** + * Information that you provide to Amazon about a Small Parcel shipment shipped by a carrier that has not partnered with Amazon. + * @export + * @interface NonPartneredSmallParcelDataInput + */ +export interface NonPartneredSmallParcelDataInput { + /** + * The carrier that you are using for the inbound shipment. + * @type {string} + * @memberof NonPartneredSmallParcelDataInput + */ + CarrierName: string; + /** + * A list of package tracking information. + * @type {Array} + * @memberof NonPartneredSmallParcelDataInput + */ + PackageList: Array; +} +/** + * Information returned by Amazon about a Small Parcel shipment by a carrier that has not partnered with Amazon. + * @export + * @interface NonPartneredSmallParcelDataOutput + */ +export interface NonPartneredSmallParcelDataOutput { + /** + * A list of packages, including carrier, tracking number, and status information for each package. + * @type {Array} + * @memberof NonPartneredSmallParcelDataOutput + */ + PackageList: Array; +} +/** + * The tracking number of the package, provided by the carrier. + * @export + * @interface NonPartneredSmallParcelPackageInput + */ +export interface NonPartneredSmallParcelPackageInput { + /** + * The tracking number of the package, provided by the carrier. + * @type {string} + * @memberof NonPartneredSmallParcelPackageInput + */ + TrackingId: string; +} +/** + * Carrier, tracking number, and status information for the package. + * @export + * @interface NonPartneredSmallParcelPackageOutput + */ +export interface NonPartneredSmallParcelPackageOutput { + /** + * The carrier that you are using for the inbound shipment. + * @type {string} + * @memberof NonPartneredSmallParcelPackageOutput + */ + CarrierName: string; + /** + * The tracking number of the package, provided by the carrier. + * @type {string} + * @memberof NonPartneredSmallParcelPackageOutput + */ + TrackingId: string; + /** + * + * @type {PackageStatus} + * @memberof NonPartneredSmallParcelPackageOutput + */ + PackageStatus: PackageStatus; +} +/** + * The shipment status of the package. + * @export + * @enum {string} + */ +export enum PackageStatus { + Shipped = 'SHIPPED', + InTransit = 'IN_TRANSIT', + Delivered = 'DELIVERED', + CheckedIn = 'CHECKED_IN', + Receiving = 'RECEIVING', + Closed = 'CLOSED', + Deleted = 'DELETED' +} + +/** + * Pallet information. + * @export + * @interface Pallet + */ +export interface Pallet { + /** + * + * @type {Dimensions} + * @memberof Pallet + */ + Dimensions: Dimensions; + /** + * + * @type {Weight} + * @memberof Pallet + */ + Weight?: Weight; + /** + * Indicates whether pallets will be stacked when carrier arrives for pick-up. + * @type {boolean} + * @memberof Pallet + */ + IsStacked: boolean; +} +/** + * The estimated shipping cost for a shipment using an Amazon-partnered carrier. + * @export + * @interface PartneredEstimate + */ +export interface PartneredEstimate { + /** + * + * @type {Amount} + * @memberof PartneredEstimate + */ + Amount: Amount; + /** + * + * @type {string} + * @memberof PartneredEstimate + */ + ConfirmDeadline?: string; + /** + * + * @type {string} + * @memberof PartneredEstimate + */ + VoidDeadline?: string; +} +/** + * Information that is required by an Amazon-partnered carrier to ship a Less Than Truckload/Full Truckload (LTL/FTL) inbound shipment. + * @export + * @interface PartneredLtlDataInput + */ +export interface PartneredLtlDataInput { + /** + * + * @type {Contact} + * @memberof PartneredLtlDataInput + */ + Contact?: Contact; + /** + * + * @type {number} + * @memberof PartneredLtlDataInput + */ + BoxCount?: number; + /** + * + * @type {SellerFreightClass} + * @memberof PartneredLtlDataInput + */ + SellerFreightClass?: SellerFreightClass; + /** + * + * @type {string} + * @memberof PartneredLtlDataInput + */ + FreightReadyDate?: string; + /** + * A list of pallet information. + * @type {Array} + * @memberof PartneredLtlDataInput + */ + PalletList?: Array; + /** + * + * @type {Weight} + * @memberof PartneredLtlDataInput + */ + TotalWeight?: Weight; + /** + * + * @type {Amount} + * @memberof PartneredLtlDataInput + */ + SellerDeclaredValue?: Amount; +} +/** + * Information returned by Amazon about a Less Than Truckload/Full Truckload (LTL/FTL) shipment by an Amazon-partnered carrier. + * @export + * @interface PartneredLtlDataOutput + */ +export interface PartneredLtlDataOutput { + /** + * + * @type {Contact} + * @memberof PartneredLtlDataOutput + */ + Contact: Contact; + /** + * + * @type {number} + * @memberof PartneredLtlDataOutput + */ + BoxCount: number; + /** + * + * @type {SellerFreightClass} + * @memberof PartneredLtlDataOutput + */ + SellerFreightClass?: SellerFreightClass; + /** + * + * @type {string} + * @memberof PartneredLtlDataOutput + */ + FreightReadyDate: string; + /** + * A list of pallet information. + * @type {Array} + * @memberof PartneredLtlDataOutput + */ + PalletList: Array; + /** + * + * @type {Weight} + * @memberof PartneredLtlDataOutput + */ + TotalWeight: Weight; + /** + * + * @type {Amount} + * @memberof PartneredLtlDataOutput + */ + SellerDeclaredValue?: Amount; + /** + * + * @type {Amount} + * @memberof PartneredLtlDataOutput + */ + AmazonCalculatedValue?: Amount; + /** + * + * @type {string} + * @memberof PartneredLtlDataOutput + */ + PreviewPickupDate: string; + /** + * + * @type {string} + * @memberof PartneredLtlDataOutput + */ + PreviewDeliveryDate: string; + /** + * + * @type {SellerFreightClass} + * @memberof PartneredLtlDataOutput + */ + PreviewFreightClass: SellerFreightClass; + /** + * A unique identifier created by Amazon that identifies this Amazon-partnered, Less Than Truckload/Full Truckload (LTL/FTL) shipment. + * @type {string} + * @memberof PartneredLtlDataOutput + */ + AmazonReferenceId: string; + /** + * Indicates whether the bill of lading for the shipment is available. + * @type {boolean} + * @memberof PartneredLtlDataOutput + */ + IsBillOfLadingAvailable: boolean; + /** + * + * @type {PartneredEstimate} + * @memberof PartneredLtlDataOutput + */ + PartneredEstimate?: PartneredEstimate; + /** + * The carrier for the inbound shipment. + * @type {string} + * @memberof PartneredLtlDataOutput + */ + CarrierName: string; +} +/** + * Information that is required by an Amazon-partnered carrier to ship a Small Parcel inbound shipment. + * @export + * @interface PartneredSmallParcelDataInput + */ +export interface PartneredSmallParcelDataInput { + /** + * A list of dimensions and weight information for packages. + * @type {Array} + * @memberof PartneredSmallParcelDataInput + */ + PackageList?: Array; + /** + * The Amazon-partnered carrier to use for the inbound shipment. + * @type {string} + * @memberof PartneredSmallParcelDataInput + */ + CarrierName?: string; +} +/** + * Information returned by Amazon about a Small Parcel shipment by an Amazon-partnered carrier. + * @export + * @interface PartneredSmallParcelDataOutput + */ +export interface PartneredSmallParcelDataOutput { + /** + * A list of packages, including shipping information from the Amazon-partnered carrier. + * @type {Array} + * @memberof PartneredSmallParcelDataOutput + */ + PackageList: Array; + /** + * + * @type {PartneredEstimate} + * @memberof PartneredSmallParcelDataOutput + */ + PartneredEstimate?: PartneredEstimate; +} +/** + * Dimension and weight information for the package. + * @export + * @interface PartneredSmallParcelPackageInput + */ +export interface PartneredSmallParcelPackageInput { + /** + * + * @type {Dimensions} + * @memberof PartneredSmallParcelPackageInput + */ + Dimensions: Dimensions; + /** + * + * @type {Weight} + * @memberof PartneredSmallParcelPackageInput + */ + Weight: Weight; +} +/** + * Dimension, weight, and shipping information for the package. + * @export + * @interface PartneredSmallParcelPackageOutput + */ +export interface PartneredSmallParcelPackageOutput { + /** + * + * @type {Dimensions} + * @memberof PartneredSmallParcelPackageOutput + */ + Dimensions: Dimensions; + /** + * + * @type {Weight} + * @memberof PartneredSmallParcelPackageOutput + */ + Weight: Weight; + /** + * The carrier specified with a previous call to putTransportDetails. + * @type {string} + * @memberof PartneredSmallParcelPackageOutput + */ + CarrierName: string; + /** + * The tracking number of the package, provided by the carrier. + * @type {string} + * @memberof PartneredSmallParcelPackageOutput + */ + TrackingId: string; + /** + * + * @type {PackageStatus} + * @memberof PartneredSmallParcelPackageOutput + */ + PackageStatus: PackageStatus; +} +/** + * Preparation instructions and who is responsible for the preparation. + * @export + * @interface PrepDetails + */ +export interface PrepDetails { + /** + * + * @type {PrepInstruction} + * @memberof PrepDetails + */ + PrepInstruction: PrepInstruction; + /** + * + * @type {PrepOwner} + * @memberof PrepDetails + */ + PrepOwner: PrepOwner; +} +/** + * Item preparation instructions. + * @export + * @enum {string} + */ +export enum PrepGuidance { + ConsultHelpDocuments = 'ConsultHelpDocuments', + NoAdditionalPrepRequired = 'NoAdditionalPrepRequired', + SeePrepInstructionsList = 'SeePrepInstructionsList' +} + +/** + * Preparation instructions for shipping an item to Amazon\'s fulfillment network. For more information about preparing items for shipment to Amazon\'s fulfillment network, see the Seller Central Help for your marketplace. + * @export + * @enum {string} + */ +export enum PrepInstruction { + Polybagging = 'Polybagging', + BubbleWrapping = 'BubbleWrapping', + Taping = 'Taping', + BlackShrinkWrapping = 'BlackShrinkWrapping', + Labeling = 'Labeling', + HangGarment = 'HangGarment' +} + +/** + * Indicates who will prepare the item. + * @export + * @enum {string} + */ +export enum PrepOwner { + Amazon = 'AMAZON', + Seller = 'SELLER' +} + +/** + * The request schema for a putTransportDetails operation. + * @export + * @interface PutTransportDetailsRequest + */ +export interface PutTransportDetailsRequest { + /** + * Indicates whether a putTransportDetails request is for an Amazon-partnered carrier. + * @type {boolean} + * @memberof PutTransportDetailsRequest + */ + IsPartnered: boolean; + /** + * + * @type {ShipmentType} + * @memberof PutTransportDetailsRequest + */ + ShipmentType: ShipmentType; + /** + * + * @type {TransportDetailInput} + * @memberof PutTransportDetailsRequest + */ + TransportDetails: TransportDetailInput; +} +/** + * Workflow status for a shipment with an Amazon-partnered carrier. + * @export + * @interface PutTransportDetailsResponse + */ +export interface PutTransportDetailsResponse { + /** + * + * @type {CommonTransportResult} + * @memberof PutTransportDetailsResponse + */ + payload?: CommonTransportResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof PutTransportDetailsResponse + */ + errors?: Array; +} +/** + * Reasons why a given seller SKU is not recommended for shipment to Amazon\'s fulfillment network. + * @export + * @interface SKUInboundGuidance + */ +export interface SKUInboundGuidance { + /** + * The seller SKU of the item. + * @type {string} + * @memberof SKUInboundGuidance + */ + SellerSKU: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof SKUInboundGuidance + */ + ASIN: string; + /** + * + * @type {InboundGuidance} + * @memberof SKUInboundGuidance + */ + InboundGuidance: InboundGuidance; + /** + * A list of inbound guidance reason information. + * @type {Array} + * @memberof SKUInboundGuidance + */ + GuidanceReasonList?: Array; +} +/** + * Labeling requirements and item preparation instructions to help you prepare items for shipment to Amazon\'s fulfillment network. + * @export + * @interface SKUPrepInstructions + */ +export interface SKUPrepInstructions { + /** + * The seller SKU of the item. + * @type {string} + * @memberof SKUPrepInstructions + */ + SellerSKU?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof SKUPrepInstructions + */ + ASIN?: string; + /** + * + * @type {BarcodeInstruction} + * @memberof SKUPrepInstructions + */ + BarcodeInstruction?: BarcodeInstruction; + /** + * + * @type {PrepGuidance} + * @memberof SKUPrepInstructions + */ + PrepGuidance?: PrepGuidance; + /** + * A list of preparation instructions to help with item sourcing decisions. + * @type {Array} + * @memberof SKUPrepInstructions + */ + PrepInstructionList?: Array; + /** + * A list of preparation instructions and fees for Amazon to prep goods for shipment. + * @type {Array} + * @memberof SKUPrepInstructions + */ + AmazonPrepFeesDetailsList?: Array; +} +/** + * The freight class of the shipment. For information about determining the freight class, contact the carrier. + * @export + * @enum {string} + */ +export enum SellerFreightClass { + _50 = '50', + _55 = '55', + _60 = '60', + _65 = '65', + _70 = '70', + _775 = '77.5', + _85 = '85', + _925 = '92.5', + _100 = '100', + _110 = '110', + _125 = '125', + _150 = '150', + _175 = '175', + _200 = '200', + _250 = '250', + _300 = '300', + _400 = '400', + _500 = '500' +} + +/** + * Indicates the status of the inbound shipment. When used with the createInboundShipment operation, WORKING is the only valid value. When used with the updateInboundShipment operation, possible values are WORKING, SHIPPED or CANCELLED. + * @export + * @enum {string} + */ +export enum ShipmentStatus { + Working = 'WORKING', + Shipped = 'SHIPPED', + Receiving = 'RECEIVING', + Cancelled = 'CANCELLED', + Deleted = 'DELETED', + Closed = 'CLOSED', + Error = 'ERROR', + InTransit = 'IN_TRANSIT', + Delivered = 'DELIVERED', + CheckedIn = 'CHECKED_IN' +} + +/** + * Specifies the carrier shipment type in a putTransportDetails request. + * @export + * @enum {string} + */ +export enum ShipmentType { + Sp = 'SP', + Ltl = 'LTL' +} + +/** + * Inbound shipment information, including carrier details, shipment status, and the workflow status for a request for shipment with an Amazon-partnered carrier. + * @export + * @interface TransportContent + */ +export interface TransportContent { + /** + * + * @type {TransportHeader} + * @memberof TransportContent + */ + TransportHeader: TransportHeader; + /** + * + * @type {TransportDetailOutput} + * @memberof TransportContent + */ + TransportDetails: TransportDetailOutput; + /** + * + * @type {TransportResult} + * @memberof TransportContent + */ + TransportResult: TransportResult; +} +/** + * Information required to create an Amazon-partnered carrier shipping estimate, or to alert the Amazon fulfillment center to the arrival of an inbound shipment by a non-Amazon-partnered carrier. + * @export + * @interface TransportDetailInput + */ +export interface TransportDetailInput { + /** + * + * @type {PartneredSmallParcelDataInput} + * @memberof TransportDetailInput + */ + PartneredSmallParcelData?: PartneredSmallParcelDataInput; + /** + * + * @type {NonPartneredSmallParcelDataInput} + * @memberof TransportDetailInput + */ + NonPartneredSmallParcelData?: NonPartneredSmallParcelDataInput; + /** + * + * @type {PartneredLtlDataInput} + * @memberof TransportDetailInput + */ + PartneredLtlData?: PartneredLtlDataInput; + /** + * + * @type {NonPartneredLtlDataInput} + * @memberof TransportDetailInput + */ + NonPartneredLtlData?: NonPartneredLtlDataInput; +} +/** + * Inbound shipment information, including carrier details and shipment status. + * @export + * @interface TransportDetailOutput + */ +export interface TransportDetailOutput { + /** + * + * @type {PartneredSmallParcelDataOutput} + * @memberof TransportDetailOutput + */ + PartneredSmallParcelData?: PartneredSmallParcelDataOutput; + /** + * + * @type {NonPartneredSmallParcelDataOutput} + * @memberof TransportDetailOutput + */ + NonPartneredSmallParcelData?: NonPartneredSmallParcelDataOutput; + /** + * + * @type {PartneredLtlDataOutput} + * @memberof TransportDetailOutput + */ + PartneredLtlData?: PartneredLtlDataOutput; + /** + * + * @type {NonPartneredLtlDataOutput} + * @memberof TransportDetailOutput + */ + NonPartneredLtlData?: NonPartneredLtlDataOutput; +} +/** + * The shipping identifier, information about whether the shipment is by an Amazon-partnered carrier, and information about whether the shipment is Small Parcel or Less Than Truckload/Full Truckload (LTL/FTL). + * @export + * @interface TransportHeader + */ +export interface TransportHeader { + /** + * The Amazon seller identifier. + * @type {string} + * @memberof TransportHeader + */ + SellerId: string; + /** + * A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @type {string} + * @memberof TransportHeader + */ + ShipmentId: string; + /** + * Indicates whether a putTransportDetails request is for a partnered carrier. Possible values: * true – Request is for an Amazon-partnered carrier. * false – Request is for a non-Amazon-partnered carrier. + * @type {boolean} + * @memberof TransportHeader + */ + IsPartnered: boolean; + /** + * + * @type {ShipmentType} + * @memberof TransportHeader + */ + ShipmentType: ShipmentType; +} +/** + * The workflow status for a shipment with an Amazon-partnered carrier. + * @export + * @interface TransportResult + */ +export interface TransportResult { + /** + * + * @type {TransportStatus} + * @memberof TransportResult + */ + TransportStatus: TransportStatus; + /** + * An error code that identifies the type of error that occured. + * @type {string} + * @memberof TransportResult + */ + ErrorCode?: string; + /** + * A message that describes the error condition. + * @type {string} + * @memberof TransportResult + */ + ErrorDescription?: string; +} +/** + * Indicates the status of the Amazon-partnered carrier shipment. + * @export + * @enum {string} + */ +export enum TransportStatus { + Working = 'WORKING', + Estimating = 'ESTIMATING', + Estimated = 'ESTIMATED', + ErrorOnEstimating = 'ERROR_ON_ESTIMATING', + Confirming = 'CONFIRMING', + Confirmed = 'CONFIRMED', + ErrorOnConfirming = 'ERROR_ON_CONFIRMING', + Voiding = 'VOIDING', + Voided = 'VOIDED', + ErrorInVoiding = 'ERROR_IN_VOIDING', + Error = 'ERROR' +} + +/** + * Indicates the unit of measurement. + * @export + * @enum {string} + */ +export enum UnitOfMeasurement { + Inches = 'inches', + Centimeters = 'centimeters' +} + +/** + * Indicates the unit of weight. + * @export + * @enum {string} + */ +export enum UnitOfWeight { + Pounds = 'pounds', + Kilograms = 'kilograms' +} + +/** + * The response schema for the voidTransport operation. + * @export + * @interface VoidTransportResponse + */ +export interface VoidTransportResponse { + /** + * + * @type {CommonTransportResult} + * @memberof VoidTransportResponse + */ + payload?: CommonTransportResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof VoidTransportResponse + */ + errors?: Array; +} +/** + * The weight of the package. + * @export + * @interface Weight + */ +export interface Weight { + /** + * + * @type {number} + * @memberof Weight + */ + Value: number; + /** + * + * @type {UnitOfWeight} + * @memberof Weight + */ + Unit: UnitOfWeight; +} + +/** + * FbaInboundApi - axios parameter creator + * @export + */ +export const FbaInboundApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns information needed to confirm a shipment for pre-order. Call this operation after calling the getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmPreorder: async (shipmentId: string, needByDate: string, marketplaceId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('confirmPreorder', 'shipmentId', shipmentId) + // verify required parameter 'needByDate' is not null or undefined + assertParamExists('confirmPreorder', 'needByDate', needByDate) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('confirmPreorder', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (needByDate !== undefined) { + localVarQueryParameter['NeedByDate'] = (needByDate as any instanceof Date) ? + (needByDate as any).toISOString().substr(0,10) : + needByDate; + } + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees to allow Amazon to charge their account for the shipping cost, and requests that the Amazon-partnered carrier ship the inbound shipment. Prior to calling the confirmTransport operation, you should call the getTransportDetails operation to get the Amazon-partnered shipping estimate. Important: After confirming the transportation request, if the seller decides that they do not want the Amazon-partnered carrier to ship the inbound shipment, you can call the voidTransport operation to cancel the transportation request. Note that for a Small Parcel shipment, the seller has 24 hours after confirming a transportation request to void the transportation request. For a Less Than Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request to void it. After the grace period has expired the seller\'s account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmTransport: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('confirmTransport', 'shipmentId', shipmentId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport/confirm` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a new inbound shipment based on the specified shipmentId that was returned by the createInboundShipmentPlan operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createInboundShipment: async (shipmentId: string, body: InboundShipmentRequest, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('createInboundShipment', 'shipmentId', shipmentId) + // verify required parameter 'body' is not null or undefined + assertParamExists('createInboundShipment', 'body', body) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns one or more inbound shipment plans, which provide the information you need to create one or more inbound shipments for a set of items that you specify. Multiple inbound shipment plans might be required so that items can be optimally placed in Amazon\'s fulfillment network—for example, positioning inventory closer to the customer. Alternatively, two inbound shipment plans might be created with the same Amazon fulfillment center destination if the two shipment plans require different processing—for example, items that require labels must be shipped separately from stickerless, commingled inventory. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateInboundShipmentPlanRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createInboundShipmentPlan: async (body: CreateInboundShipmentPlanRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createInboundShipmentPlan', 'body', body) + const localVarPath = `/fba/inbound/v0/plans`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Initiates the process of estimating the shipping cost for an inbound shipment by an Amazon-partnered carrier. Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide Amazon with the transportation information for the inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + estimateTransport: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('estimateTransport', 'shipmentId', shipmentId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport/estimate` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than Truckload/Full Truckload (LTL/FTL) inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBillOfLading: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getBillOfLading', 'shipmentId', shipmentId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/billOfLading` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information that lets a seller know if Amazon recommends sending an item to a given marketplace. In some cases, Amazon provides guidance for why a given SellerSKU or ASIN is not recommended for shipment to Amazon\'s fulfillment network. Sellers may still ship items that are not recommended, at their discretion. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: SellerSKU is qualified by the SellerId, which is included with every Selling Partner API operation that you submit. If you specify a SellerSKU that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: If you specify a ASIN that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInboundGuidance: async (marketplaceId: string, sellerSKUList?: Array, aSINList?: Array, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getInboundGuidance', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/inbound/v0/itemsGuidance`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (sellerSKUList) { + localVarQueryParameter['SellerSKUList'] = sellerSKUList.join(COLLECTION_FORMATS.csv); + } + + if (aSINList) { + localVarQueryParameter['ASINList'] = aSINList.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation'} pageType The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error. + * @param {'BARCODE_2D' | 'UNIQUE' | 'PALLET'} labelType The type of labels requested. + * @param {number} [numberOfPackages] The number of packages in the shipment. + * @param {Array} [packageLabelsToPrint] A list of identifiers that specify packages for which you want package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code. + * @param {number} [numberOfPallets] The number of pallets in the shipment. This returns four identical labels for each pallet. + * @param {number} [pageSize] The page size for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. Max value:1000. + * @param {number} [pageStartIndex] The page start index for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLabels: async (shipmentId: string, pageType: 'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation', labelType: 'BARCODE_2D' | 'UNIQUE' | 'PALLET', numberOfPackages?: number, packageLabelsToPrint?: Array, numberOfPallets?: number, pageSize?: number, pageStartIndex?: number, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getLabels', 'shipmentId', shipmentId) + // verify required parameter 'pageType' is not null or undefined + assertParamExists('getLabels', 'pageType', pageType) + // verify required parameter 'labelType' is not null or undefined + assertParamExists('getLabels', 'labelType', labelType) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/labels` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (pageType !== undefined) { + localVarQueryParameter['PageType'] = pageType; + } + + if (labelType !== undefined) { + localVarQueryParameter['LabelType'] = labelType; + } + + if (numberOfPackages !== undefined) { + localVarQueryParameter['NumberOfPackages'] = numberOfPackages; + } + + if (packageLabelsToPrint) { + localVarQueryParameter['PackageLabelsToPrint'] = packageLabelsToPrint.join(COLLECTION_FORMATS.csv); + } + + if (numberOfPallets !== undefined) { + localVarQueryParameter['NumberOfPallets'] = numberOfPallets; + } + + if (pageSize !== undefined) { + localVarQueryParameter['PageSize'] = pageSize; + } + + if (pageStartIndex !== undefined) { + localVarQueryParameter['PageStartIndex'] = pageStartIndex; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPreorderInfo: async (shipmentId: string, marketplaceId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getPreorderInfo', 'shipmentId', shipmentId) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getPreorderInfo', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/preorder` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon\'s fulfillment network. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipToCountryCode The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon\'s fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note: Include seller SKUs that you have used to list items on Amazon\'s retail website. If you include a seller SKU that you have never used to list an item on Amazon\'s retail website, the seller SKU is returned in the InvalidSKUList property in the response. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want item preparation instructions to help with item sourcing decisions. Note: ASINs must be included in the product catalog for at least one of the marketplaces that the seller participates in. Any ASIN that is not included in the product catalog for at least one of the marketplaces that the seller participates in is returned in the InvalidASINList property in the response. You can find out which marketplaces a seller participates in by calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPrepInstructions: async (shipToCountryCode: string, sellerSKUList?: Array, aSINList?: Array, options: any = {}): Promise => { + // verify required parameter 'shipToCountryCode' is not null or undefined + assertParamExists('getPrepInstructions', 'shipToCountryCode', shipToCountryCode) + const localVarPath = `/fba/inbound/v0/prepInstructions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (shipToCountryCode !== undefined) { + localVarQueryParameter['ShipToCountryCode'] = shipToCountryCode; + } + + if (sellerSKUList) { + localVarQueryParameter['SellerSKUList'] = sellerSKUList.join(COLLECTION_FORMATS.csv); + } + + if (aSINList) { + localVarQueryParameter['ASINList'] = aSINList.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipment items that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipment items that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipmentItems: async (queryType: 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'queryType' is not null or undefined + assertParamExists('getShipmentItems', 'queryType', queryType) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getShipmentItems', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/inbound/v0/shipmentItems`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (lastUpdatedAfter !== undefined) { + localVarQueryParameter['LastUpdatedAfter'] = (lastUpdatedAfter as any instanceof Date) ? + (lastUpdatedAfter as any).toISOString() : + lastUpdatedAfter; + } + + if (lastUpdatedBefore !== undefined) { + localVarQueryParameter['LastUpdatedBefore'] = (lastUpdatedBefore as any instanceof Date) ? + (lastUpdatedBefore as any).toISOString() : + lastUpdatedBefore; + } + + if (queryType !== undefined) { + localVarQueryParameter['QueryType'] = queryType; + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of items in a specified inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier used for selecting items in a specific inbound shipment. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipmentItemsByShipmentId: async (shipmentId: string, marketplaceId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getShipmentItemsByShipmentId', 'shipmentId', shipmentId) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getShipmentItemsByShipmentId', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/items` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of inbound shipments based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>} [shipmentStatusList] A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify. + * @param {Array} [shipmentIdList] A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipments that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipments that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipments: async (queryType: 'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, shipmentStatusList?: Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>, shipmentIdList?: Array, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'queryType' is not null or undefined + assertParamExists('getShipments', 'queryType', queryType) + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getShipments', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/inbound/v0/shipments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (shipmentStatusList) { + localVarQueryParameter['ShipmentStatusList'] = shipmentStatusList.join(COLLECTION_FORMATS.csv); + } + + if (shipmentIdList) { + localVarQueryParameter['ShipmentIdList'] = shipmentIdList.join(COLLECTION_FORMATS.csv); + } + + if (lastUpdatedAfter !== undefined) { + localVarQueryParameter['LastUpdatedAfter'] = (lastUpdatedAfter as any instanceof Date) ? + (lastUpdatedAfter as any).toISOString() : + lastUpdatedAfter; + } + + if (lastUpdatedBefore !== undefined) { + localVarQueryParameter['LastUpdatedBefore'] = (lastUpdatedBefore as any instanceof Date) ? + (lastUpdatedBefore as any).toISOString() : + lastUpdatedBefore; + } + + if (queryType !== undefined) { + localVarQueryParameter['QueryType'] = queryType; + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns current transportation information about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTransportDetails: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getTransportDetails', 'shipmentId', shipmentId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends transportation information to Amazon about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {PutTransportDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + putTransportDetails: async (shipmentId: string, body: PutTransportDetailsRequest, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('putTransportDetails', 'shipmentId', shipmentId) + // verify required parameter 'body' is not null or undefined + assertParamExists('putTransportDetails', 'body', body) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds, updates, or removes items from the inbound shipment identified by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateInboundShipment: async (shipmentId: string, body: InboundShipmentRequest, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('updateInboundShipment', 'shipmentId', shipmentId) + // verify required parameter 'body' is not null or undefined + assertParamExists('updateInboundShipment', 'body', body) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Cancels a previously-confirmed request to ship an inbound shipment using an Amazon-partnered carrier. To be successful, you must call this operation before the VoidDeadline date that is returned by the getTransportDetails operation. Important: The VoidDeadline date is 24 hours after you confirm a Small Parcel shipment transportation request or one hour after you confirm a Less Than Truckload/Full Truckload (LTL/FTL) shipment transportation request. After the void deadline passes, your account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + voidTransport: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('voidTransport', 'shipmentId', shipmentId) + const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport/void` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FbaInboundApi - functional programming interface + * @export + */ +export const FbaInboundApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FbaInboundApiAxiosParamCreator(configuration) + return { + /** + * Returns information needed to confirm a shipment for pre-order. Call this operation after calling the getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmPreorder(shipmentId: string, needByDate: string, marketplaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmPreorder(shipmentId, needByDate, marketplaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees to allow Amazon to charge their account for the shipping cost, and requests that the Amazon-partnered carrier ship the inbound shipment. Prior to calling the confirmTransport operation, you should call the getTransportDetails operation to get the Amazon-partnered shipping estimate. Important: After confirming the transportation request, if the seller decides that they do not want the Amazon-partnered carrier to ship the inbound shipment, you can call the voidTransport operation to cancel the transportation request. Note that for a Small Parcel shipment, the seller has 24 hours after confirming a transportation request to void the transportation request. For a Less Than Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request to void it. After the grace period has expired the seller\'s account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmTransport(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmTransport(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a new inbound shipment based on the specified shipmentId that was returned by the createInboundShipmentPlan operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createInboundShipment(shipmentId: string, body: InboundShipmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createInboundShipment(shipmentId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns one or more inbound shipment plans, which provide the information you need to create one or more inbound shipments for a set of items that you specify. Multiple inbound shipment plans might be required so that items can be optimally placed in Amazon\'s fulfillment network—for example, positioning inventory closer to the customer. Alternatively, two inbound shipment plans might be created with the same Amazon fulfillment center destination if the two shipment plans require different processing—for example, items that require labels must be shipped separately from stickerless, commingled inventory. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateInboundShipmentPlanRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createInboundShipmentPlan(body: CreateInboundShipmentPlanRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createInboundShipmentPlan(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Initiates the process of estimating the shipping cost for an inbound shipment by an Amazon-partnered carrier. Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide Amazon with the transportation information for the inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async estimateTransport(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.estimateTransport(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than Truckload/Full Truckload (LTL/FTL) inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBillOfLading(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBillOfLading(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns information that lets a seller know if Amazon recommends sending an item to a given marketplace. In some cases, Amazon provides guidance for why a given SellerSKU or ASIN is not recommended for shipment to Amazon\'s fulfillment network. Sellers may still ship items that are not recommended, at their discretion. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: SellerSKU is qualified by the SellerId, which is included with every Selling Partner API operation that you submit. If you specify a SellerSKU that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: If you specify a ASIN that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInboundGuidance(marketplaceId: string, sellerSKUList?: Array, aSINList?: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInboundGuidance(marketplaceId, sellerSKUList, aSINList, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation'} pageType The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error. + * @param {'BARCODE_2D' | 'UNIQUE' | 'PALLET'} labelType The type of labels requested. + * @param {number} [numberOfPackages] The number of packages in the shipment. + * @param {Array} [packageLabelsToPrint] A list of identifiers that specify packages for which you want package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code. + * @param {number} [numberOfPallets] The number of pallets in the shipment. This returns four identical labels for each pallet. + * @param {number} [pageSize] The page size for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. Max value:1000. + * @param {number} [pageStartIndex] The page start index for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLabels(shipmentId: string, pageType: 'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation', labelType: 'BARCODE_2D' | 'UNIQUE' | 'PALLET', numberOfPackages?: number, packageLabelsToPrint?: Array, numberOfPallets?: number, pageSize?: number, pageStartIndex?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLabels(shipmentId, pageType, labelType, numberOfPackages, packageLabelsToPrint, numberOfPallets, pageSize, pageStartIndex, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPreorderInfo(shipmentId: string, marketplaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPreorderInfo(shipmentId, marketplaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon\'s fulfillment network. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipToCountryCode The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon\'s fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note: Include seller SKUs that you have used to list items on Amazon\'s retail website. If you include a seller SKU that you have never used to list an item on Amazon\'s retail website, the seller SKU is returned in the InvalidSKUList property in the response. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want item preparation instructions to help with item sourcing decisions. Note: ASINs must be included in the product catalog for at least one of the marketplaces that the seller participates in. Any ASIN that is not included in the product catalog for at least one of the marketplaces that the seller participates in is returned in the InvalidASINList property in the response. You can find out which marketplaces a seller participates in by calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPrepInstructions(shipToCountryCode: string, sellerSKUList?: Array, aSINList?: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPrepInstructions(shipToCountryCode, sellerSKUList, aSINList, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipment items that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipment items that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getShipmentItems(queryType: 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getShipmentItems(queryType, marketplaceId, lastUpdatedAfter, lastUpdatedBefore, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of items in a specified inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier used for selecting items in a specific inbound shipment. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getShipmentItemsByShipmentId(shipmentId: string, marketplaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getShipmentItemsByShipmentId(shipmentId, marketplaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of inbound shipments based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>} [shipmentStatusList] A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify. + * @param {Array} [shipmentIdList] A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipments that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipments that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getShipments(queryType: 'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, shipmentStatusList?: Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>, shipmentIdList?: Array, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getShipments(queryType, marketplaceId, shipmentStatusList, shipmentIdList, lastUpdatedAfter, lastUpdatedBefore, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns current transportation information about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTransportDetails(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTransportDetails(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends transportation information to Amazon about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {PutTransportDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async putTransportDetails(shipmentId: string, body: PutTransportDetailsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.putTransportDetails(shipmentId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds, updates, or removes items from the inbound shipment identified by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateInboundShipment(shipmentId: string, body: InboundShipmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateInboundShipment(shipmentId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Cancels a previously-confirmed request to ship an inbound shipment using an Amazon-partnered carrier. To be successful, you must call this operation before the VoidDeadline date that is returned by the getTransportDetails operation. Important: The VoidDeadline date is 24 hours after you confirm a Small Parcel shipment transportation request or one hour after you confirm a Less Than Truckload/Full Truckload (LTL/FTL) shipment transportation request. After the void deadline passes, your account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async voidTransport(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.voidTransport(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FbaInboundApi - factory interface + * @export + */ +export const FbaInboundApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FbaInboundApiFp(configuration) + return { + /** + * Returns information needed to confirm a shipment for pre-order. Call this operation after calling the getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmPreorder(shipmentId: string, needByDate: string, marketplaceId: string, options?: any): AxiosPromise { + return localVarFp.confirmPreorder(shipmentId, needByDate, marketplaceId, options).then((request) => request(axios, basePath)); + }, + /** + * Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees to allow Amazon to charge their account for the shipping cost, and requests that the Amazon-partnered carrier ship the inbound shipment. Prior to calling the confirmTransport operation, you should call the getTransportDetails operation to get the Amazon-partnered shipping estimate. Important: After confirming the transportation request, if the seller decides that they do not want the Amazon-partnered carrier to ship the inbound shipment, you can call the voidTransport operation to cancel the transportation request. Note that for a Small Parcel shipment, the seller has 24 hours after confirming a transportation request to void the transportation request. For a Less Than Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request to void it. After the grace period has expired the seller\'s account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmTransport(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.confirmTransport(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a new inbound shipment based on the specified shipmentId that was returned by the createInboundShipmentPlan operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createInboundShipment(shipmentId: string, body: InboundShipmentRequest, options?: any): AxiosPromise { + return localVarFp.createInboundShipment(shipmentId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns one or more inbound shipment plans, which provide the information you need to create one or more inbound shipments for a set of items that you specify. Multiple inbound shipment plans might be required so that items can be optimally placed in Amazon\'s fulfillment network—for example, positioning inventory closer to the customer. Alternatively, two inbound shipment plans might be created with the same Amazon fulfillment center destination if the two shipment plans require different processing—for example, items that require labels must be shipped separately from stickerless, commingled inventory. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateInboundShipmentPlanRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createInboundShipmentPlan(body: CreateInboundShipmentPlanRequest, options?: any): AxiosPromise { + return localVarFp.createInboundShipmentPlan(body, options).then((request) => request(axios, basePath)); + }, + /** + * Initiates the process of estimating the shipping cost for an inbound shipment by an Amazon-partnered carrier. Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide Amazon with the transportation information for the inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + estimateTransport(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.estimateTransport(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than Truckload/Full Truckload (LTL/FTL) inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBillOfLading(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.getBillOfLading(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns information that lets a seller know if Amazon recommends sending an item to a given marketplace. In some cases, Amazon provides guidance for why a given SellerSKU or ASIN is not recommended for shipment to Amazon\'s fulfillment network. Sellers may still ship items that are not recommended, at their discretion. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: SellerSKU is qualified by the SellerId, which is included with every Selling Partner API operation that you submit. If you specify a SellerSKU that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: If you specify a ASIN that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInboundGuidance(marketplaceId: string, sellerSKUList?: Array, aSINList?: Array, options?: any): AxiosPromise { + return localVarFp.getInboundGuidance(marketplaceId, sellerSKUList, aSINList, options).then((request) => request(axios, basePath)); + }, + /** + * Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation'} pageType The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error. + * @param {'BARCODE_2D' | 'UNIQUE' | 'PALLET'} labelType The type of labels requested. + * @param {number} [numberOfPackages] The number of packages in the shipment. + * @param {Array} [packageLabelsToPrint] A list of identifiers that specify packages for which you want package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code. + * @param {number} [numberOfPallets] The number of pallets in the shipment. This returns four identical labels for each pallet. + * @param {number} [pageSize] The page size for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. Max value:1000. + * @param {number} [pageStartIndex] The page start index for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLabels(shipmentId: string, pageType: 'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation', labelType: 'BARCODE_2D' | 'UNIQUE' | 'PALLET', numberOfPackages?: number, packageLabelsToPrint?: Array, numberOfPallets?: number, pageSize?: number, pageStartIndex?: number, options?: any): AxiosPromise { + return localVarFp.getLabels(shipmentId, pageType, labelType, numberOfPackages, packageLabelsToPrint, numberOfPallets, pageSize, pageStartIndex, options).then((request) => request(axios, basePath)); + }, + /** + * Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPreorderInfo(shipmentId: string, marketplaceId: string, options?: any): AxiosPromise { + return localVarFp.getPreorderInfo(shipmentId, marketplaceId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon\'s fulfillment network. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipToCountryCode The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon\'s fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note: Include seller SKUs that you have used to list items on Amazon\'s retail website. If you include a seller SKU that you have never used to list an item on Amazon\'s retail website, the seller SKU is returned in the InvalidSKUList property in the response. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want item preparation instructions to help with item sourcing decisions. Note: ASINs must be included in the product catalog for at least one of the marketplaces that the seller participates in. Any ASIN that is not included in the product catalog for at least one of the marketplaces that the seller participates in is returned in the InvalidASINList property in the response. You can find out which marketplaces a seller participates in by calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPrepInstructions(shipToCountryCode: string, sellerSKUList?: Array, aSINList?: Array, options?: any): AxiosPromise { + return localVarFp.getPrepInstructions(shipToCountryCode, sellerSKUList, aSINList, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipment items that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipment items that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipmentItems(queryType: 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getShipmentItems(queryType, marketplaceId, lastUpdatedAfter, lastUpdatedBefore, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of items in a specified inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier used for selecting items in a specific inbound shipment. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipmentItemsByShipmentId(shipmentId: string, marketplaceId: string, options?: any): AxiosPromise { + return localVarFp.getShipmentItemsByShipmentId(shipmentId, marketplaceId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of inbound shipments based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>} [shipmentStatusList] A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify. + * @param {Array} [shipmentIdList] A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipments that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipments that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipments(queryType: 'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, shipmentStatusList?: Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>, shipmentIdList?: Array, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getShipments(queryType, marketplaceId, shipmentStatusList, shipmentIdList, lastUpdatedAfter, lastUpdatedBefore, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns current transportation information about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTransportDetails(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.getTransportDetails(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Sends transportation information to Amazon about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {PutTransportDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + putTransportDetails(shipmentId: string, body: PutTransportDetailsRequest, options?: any): AxiosPromise { + return localVarFp.putTransportDetails(shipmentId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Adds, updates, or removes items from the inbound shipment identified by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateInboundShipment(shipmentId: string, body: InboundShipmentRequest, options?: any): AxiosPromise { + return localVarFp.updateInboundShipment(shipmentId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Cancels a previously-confirmed request to ship an inbound shipment using an Amazon-partnered carrier. To be successful, you must call this operation before the VoidDeadline date that is returned by the getTransportDetails operation. Important: The VoidDeadline date is 24 hours after you confirm a Small Parcel shipment transportation request or one hour after you confirm a Less Than Truckload/Full Truckload (LTL/FTL) shipment transportation request. After the void deadline passes, your account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + voidTransport(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.voidTransport(shipmentId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FbaInboundApi - object-oriented interface + * @export + * @class FbaInboundApi + * @extends {BaseAPI} + */ +export class FbaInboundApi extends BaseAPI { + /** + * Returns information needed to confirm a shipment for pre-order. Call this operation after calling the getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public confirmPreorder(shipmentId: string, needByDate: string, marketplaceId: string, options?: any) { + return FbaInboundApiFp(this.configuration).confirmPreorder(shipmentId, needByDate, marketplaceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees to allow Amazon to charge their account for the shipping cost, and requests that the Amazon-partnered carrier ship the inbound shipment. Prior to calling the confirmTransport operation, you should call the getTransportDetails operation to get the Amazon-partnered shipping estimate. Important: After confirming the transportation request, if the seller decides that they do not want the Amazon-partnered carrier to ship the inbound shipment, you can call the voidTransport operation to cancel the transportation request. Note that for a Small Parcel shipment, the seller has 24 hours after confirming a transportation request to void the transportation request. For a Less Than Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request to void it. After the grace period has expired the seller\'s account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public confirmTransport(shipmentId: string, options?: any) { + return FbaInboundApiFp(this.configuration).confirmTransport(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a new inbound shipment based on the specified shipmentId that was returned by the createInboundShipmentPlan operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public createInboundShipment(shipmentId: string, body: InboundShipmentRequest, options?: any) { + return FbaInboundApiFp(this.configuration).createInboundShipment(shipmentId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns one or more inbound shipment plans, which provide the information you need to create one or more inbound shipments for a set of items that you specify. Multiple inbound shipment plans might be required so that items can be optimally placed in Amazon\'s fulfillment network—for example, positioning inventory closer to the customer. Alternatively, two inbound shipment plans might be created with the same Amazon fulfillment center destination if the two shipment plans require different processing—for example, items that require labels must be shipped separately from stickerless, commingled inventory. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateInboundShipmentPlanRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public createInboundShipmentPlan(body: CreateInboundShipmentPlanRequest, options?: any) { + return FbaInboundApiFp(this.configuration).createInboundShipmentPlan(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Initiates the process of estimating the shipping cost for an inbound shipment by an Amazon-partnered carrier. Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide Amazon with the transportation information for the inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public estimateTransport(shipmentId: string, options?: any) { + return FbaInboundApiFp(this.configuration).estimateTransport(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than Truckload/Full Truckload (LTL/FTL) inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getBillOfLading(shipmentId: string, options?: any) { + return FbaInboundApiFp(this.configuration).getBillOfLading(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information that lets a seller know if Amazon recommends sending an item to a given marketplace. In some cases, Amazon provides guidance for why a given SellerSKU or ASIN is not recommended for shipment to Amazon\'s fulfillment network. Sellers may still ship items that are not recommended, at their discretion. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: SellerSKU is qualified by the SellerId, which is included with every Selling Partner API operation that you submit. If you specify a SellerSKU that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want inbound guidance for shipment to Amazon\'s fulfillment network. Note: If you specify a ASIN that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getInboundGuidance(marketplaceId: string, sellerSKUList?: Array, aSINList?: Array, options?: any) { + return FbaInboundApiFp(this.configuration).getInboundGuidance(marketplaceId, sellerSKUList, aSINList, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation'} pageType The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error. + * @param {'BARCODE_2D' | 'UNIQUE' | 'PALLET'} labelType The type of labels requested. + * @param {number} [numberOfPackages] The number of packages in the shipment. + * @param {Array} [packageLabelsToPrint] A list of identifiers that specify packages for which you want package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code. + * @param {number} [numberOfPallets] The number of pallets in the shipment. This returns four identical labels for each pallet. + * @param {number} [pageSize] The page size for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. Max value:1000. + * @param {number} [pageStartIndex] The page start index for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getLabels(shipmentId: string, pageType: 'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation', labelType: 'BARCODE_2D' | 'UNIQUE' | 'PALLET', numberOfPackages?: number, packageLabelsToPrint?: Array, numberOfPallets?: number, pageSize?: number, pageStartIndex?: number, options?: any) { + return FbaInboundApiFp(this.configuration).getLabels(shipmentId, pageType, labelType, numberOfPackages, packageLabelsToPrint, numberOfPallets, pageSize, pageStartIndex, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getPreorderInfo(shipmentId: string, marketplaceId: string, options?: any) { + return FbaInboundApiFp(this.configuration).getPreorderInfo(shipmentId, marketplaceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon\'s fulfillment network. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipToCountryCode The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country. + * @param {Array} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon\'s fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note: Include seller SKUs that you have used to list items on Amazon\'s retail website. If you include a seller SKU that you have never used to list an item on Amazon\'s retail website, the seller SKU is returned in the InvalidSKUList property in the response. + * @param {Array} [aSINList] A list of ASIN values. Used to identify items for which you want item preparation instructions to help with item sourcing decisions. Note: ASINs must be included in the product catalog for at least one of the marketplaces that the seller participates in. Any ASIN that is not included in the product catalog for at least one of the marketplaces that the seller participates in is returned in the InvalidASINList property in the response. You can find out which marketplaces a seller participates in by calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getPrepInstructions(shipToCountryCode: string, sellerSKUList?: Array, aSINList?: Array, options?: any) { + return FbaInboundApiFp(this.configuration).getPrepInstructions(shipToCountryCode, sellerSKUList, aSINList, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipment items that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipment items that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getShipmentItems(queryType: 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options?: any) { + return FbaInboundApiFp(this.configuration).getShipmentItems(queryType, marketplaceId, lastUpdatedAfter, lastUpdatedBefore, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of items in a specified inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier used for selecting items in a specific inbound shipment. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getShipmentItemsByShipmentId(shipmentId: string, marketplaceId: string, options?: any) { + return FbaInboundApiFp(this.configuration).getShipmentItemsByShipmentId(shipmentId, marketplaceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of inbound shipments based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored. + * @param {Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>} [shipmentStatusList] A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify. + * @param {Array} [shipmentIdList] A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned. + * @param {string} [lastUpdatedAfter] A date used for selecting inbound shipments that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [lastUpdatedBefore] A date used for selecting inbound shipments that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getShipments(queryType: 'SHIPMENT' | 'DATE_RANGE' | 'NEXT_TOKEN', marketplaceId: string, shipmentStatusList?: Array<'WORKING' | 'SHIPPED' | 'RECEIVING' | 'CANCELLED' | 'DELETED' | 'CLOSED' | 'ERROR' | 'IN_TRANSIT' | 'DELIVERED' | 'CHECKED_IN'>, shipmentIdList?: Array, lastUpdatedAfter?: string, lastUpdatedBefore?: string, nextToken?: string, options?: any) { + return FbaInboundApiFp(this.configuration).getShipments(queryType, marketplaceId, shipmentStatusList, shipmentIdList, lastUpdatedAfter, lastUpdatedBefore, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns current transportation information about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public getTransportDetails(shipmentId: string, options?: any) { + return FbaInboundApiFp(this.configuration).getTransportDetails(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends transportation information to Amazon about an inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {PutTransportDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public putTransportDetails(shipmentId: string, body: PutTransportDetailsRequest, options?: any) { + return FbaInboundApiFp(this.configuration).putTransportDetails(shipmentId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds, updates, or removes items from the inbound shipment identified by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {InboundShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public updateInboundShipment(shipmentId: string, body: InboundShipmentRequest, options?: any) { + return FbaInboundApiFp(this.configuration).updateInboundShipment(shipmentId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Cancels a previously-confirmed request to ship an inbound shipment using an Amazon-partnered carrier. To be successful, you must call this operation before the VoidDeadline date that is returned by the getTransportDetails operation. Important: The VoidDeadline date is 24 hours after you confirm a Small Parcel shipment transportation request or one hour after you confirm a Less Than Truckload/Full Truckload (LTL/FTL) shipment transportation request. After the void deadline passes, your account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaInboundApi + */ + public voidTransport(shipmentId: string, options?: any) { + return FbaInboundApiFp(this.configuration).voidTransport(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/fulfillment-inbound-api-model/base.ts b/src/api-models/fulfillment-inbound-api-model/base.ts new file mode 100644 index 00000000..c2683160 --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Fulfillment Inbound + * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/fulfillment-inbound-api-model/common.ts b/src/api-models/fulfillment-inbound-api-model/common.ts new file mode 100644 index 00000000..48ecd915 --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Fulfillment Inbound + * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/fulfillment-inbound-api-model/configuration.ts b/src/api-models/fulfillment-inbound-api-model/configuration.ts new file mode 100644 index 00000000..aef6e67e --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Fulfillment Inbound + * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/fulfillment-inbound-api-model/git_push.sh b/src/api-models/fulfillment-inbound-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/fulfillment-inbound-api-model/index.ts b/src/api-models/fulfillment-inbound-api-model/index.ts new file mode 100644 index 00000000..eb87b16b --- /dev/null +++ b/src/api-models/fulfillment-inbound-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Fulfillment Inbound + * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon\'s fulfillment network. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/fulfillment-outbound-api-model/.gitignore b/src/api-models/fulfillment-outbound-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/fulfillment-outbound-api-model/.npmignore b/src/api-models/fulfillment-outbound-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/fulfillment-outbound-api-model/.openapi-generator-ignore b/src/api-models/fulfillment-outbound-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/fulfillment-outbound-api-model/.openapi-generator/FILES b/src/api-models/fulfillment-outbound-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/fulfillment-outbound-api-model/.openapi-generator/VERSION b/src/api-models/fulfillment-outbound-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/fulfillment-outbound-api-model/api.ts b/src/api-models/fulfillment-outbound-api-model/api.ts new file mode 100644 index 00000000..acbb70dd --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/api.ts @@ -0,0 +1,3115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner APIs for Fulfillment Outbound + * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon\'s fulfillment network. You can get information on both potential and existing fulfillment orders. + * + * The version of the OpenAPI document: 2020-07-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Additional location information. + * @export + * @enum {string} + */ +export enum AdditionalLocationInfo { + AsInstructed = 'AS_INSTRUCTED', + Carport = 'CARPORT', + CustomerPickup = 'CUSTOMER_PICKUP', + Deck = 'DECK', + DoorPerson = 'DOOR_PERSON', + FrontDesk = 'FRONT_DESK', + FrontDoor = 'FRONT_DOOR', + Garage = 'GARAGE', + Guard = 'GUARD', + MailRoom = 'MAIL_ROOM', + MailSlot = 'MAIL_SLOT', + Mailbox = 'MAILBOX', + McBoy = 'MC_BOY', + McGirl = 'MC_GIRL', + McMan = 'MC_MAN', + McWoman = 'MC_WOMAN', + Neighbor = 'NEIGHBOR', + Office = 'OFFICE', + Outbuilding = 'OUTBUILDING', + Patio = 'PATIO', + Porch = 'PORCH', + RearDoor = 'REAR_DOOR', + Receptionist = 'RECEPTIONIST', + Receiver = 'RECEIVER', + SecureLocation = 'SECURE_LOCATION', + SideDoor = 'SIDE_DOOR' +} + +/** + * A physical address. + * @export + * @interface Address + */ +export interface Address { + /** + * The name of the person, business or institution at the address. + * @type {string} + * @memberof Address + */ + name: string; + /** + * The first line of the address. + * @type {string} + * @memberof Address + */ + addressLine1: string; + /** + * Additional address information, if required. + * @type {string} + * @memberof Address + */ + addressLine2?: string; + /** + * Additional address information, if required. + * @type {string} + * @memberof Address + */ + addressLine3?: string; + /** + * The city where the person, business, or institution is located. + * @type {string} + * @memberof Address + */ + city?: string; + /** + * The district or county where the person, business, or institution is located. + * @type {string} + * @memberof Address + */ + districtOrCounty: string; + /** + * The state or region where the person, business or institution is located. + * @type {string} + * @memberof Address + */ + stateOrRegion?: string; + /** + * The postal code of the address. + * @type {string} + * @memberof Address + */ + postalCode?: string; + /** + * The two digit country code. In ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Address + */ + countryCode: string; + /** + * The phone number of the person, business, or institution located at the address. + * @type {string} + * @memberof Address + */ + phone?: string; +} +/** + * The COD (Cash On Delivery) charges that you associate with a COD fulfillment order. + * @export + * @interface CODSettings + */ +export interface CODSettings { + /** + * When true, this fulfillment order requires a COD (Cash On Delivery) payment. + * @type {boolean} + * @memberof CODSettings + */ + isCodRequired: boolean; + /** + * + * @type {Money} + * @memberof CODSettings + */ + codCharge?: Money; + /** + * + * @type {Money} + * @memberof CODSettings + */ + codChargeTax?: Money; + /** + * + * @type {Money} + * @memberof CODSettings + */ + shippingCharge?: Money; + /** + * + * @type {Money} + * @memberof CODSettings + */ + shippingChargeTax?: Money; +} +/** + * The response schema for the cancelFulfillmentOrder operation. + * @export + * @interface CancelFulfillmentOrderResponse + */ +export interface CancelFulfillmentOrderResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelFulfillmentOrderResponse + */ + errors?: Array; +} +/** + * Item information for creating a fulfillment order. + * @export + * @interface CreateFulfillmentOrderItem + */ +export interface CreateFulfillmentOrderItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof CreateFulfillmentOrderItem + */ + sellerSku: string; + /** + * A fulfillment order item identifier that the seller creates to track fulfillment order items. Used to disambiguate multiple fulfillment items that have the same SellerSKU. For example, the seller might assign different SellerFulfillmentOrderItemId values to two items in a fulfillment order that share the same SellerSKU but have different GiftMessage values. + * @type {string} + * @memberof CreateFulfillmentOrderItem + */ + sellerFulfillmentOrderItemId: string; + /** + * The item quantity. + * @type {number} + * @memberof CreateFulfillmentOrderItem + */ + quantity: number; + /** + * A message to the gift recipient, if applicable. + * @type {string} + * @memberof CreateFulfillmentOrderItem + */ + giftMessage?: string; + /** + * Item-specific text that displays in recipient-facing materials such as the outbound shipment packing slip. + * @type {string} + * @memberof CreateFulfillmentOrderItem + */ + displayableComment?: string; + /** + * Amazon\'s fulfillment network SKU of the item. + * @type {string} + * @memberof CreateFulfillmentOrderItem + */ + fulfillmentNetworkSku?: string; + /** + * + * @type {Money} + * @memberof CreateFulfillmentOrderItem + */ + perUnitDeclaredValue?: Money; + /** + * + * @type {Money} + * @memberof CreateFulfillmentOrderItem + */ + perUnitPrice?: Money; + /** + * + * @type {Money} + * @memberof CreateFulfillmentOrderItem + */ + perUnitTax?: Money; +} +/** + * The request body schema for the createFulfillmentOrder operation. + * @export + * @interface CreateFulfillmentOrderRequest + */ +export interface CreateFulfillmentOrderRequest { + /** + * The marketplace the fulfillment order is placed against. + * @type {string} + * @memberof CreateFulfillmentOrderRequest + */ + marketplaceId?: string; + /** + * A fulfillment order identifier that the seller creates to track their fulfillment order. The SellerFulfillmentOrderId must be unique for each fulfillment order that a seller creates. If the seller\'s system already creates unique order identifiers, then these might be good values for them to use. + * @type {string} + * @memberof CreateFulfillmentOrderRequest + */ + sellerFulfillmentOrderId: string; + /** + * A fulfillment order identifier that the seller creates. This value displays as the order identifier in recipient-facing materials such as the outbound shipment packing slip. The value of DisplayableOrderId should match the order identifier that the seller provides to the recipient. The seller can use the SellerFulfillmentOrderId for this value or they can specify an alternate value if they want the recipient to reference an alternate order identifier. The value must be an alpha-numeric or ISO 8859-1 compliant string from one to 40 characters in length. Cannot contain two spaces in a row. Leading and trailing white space is removed. + * @type {string} + * @memberof CreateFulfillmentOrderRequest + */ + displayableOrderId: string; + /** + * + * @type {string} + * @memberof CreateFulfillmentOrderRequest + */ + displayableOrderDate: string; + /** + * Order-specific text that appears in recipient-facing materials such as the outbound shipment packing slip. + * @type {string} + * @memberof CreateFulfillmentOrderRequest + */ + displayableOrderComment: string; + /** + * + * @type {ShippingSpeedCategory} + * @memberof CreateFulfillmentOrderRequest + */ + shippingSpeedCategory: ShippingSpeedCategory; + /** + * + * @type {DeliveryWindow} + * @memberof CreateFulfillmentOrderRequest + */ + deliveryWindow?: DeliveryWindow; + /** + * + * @type {Address} + * @memberof CreateFulfillmentOrderRequest + */ + destinationAddress: Address; + /** + * + * @type {FulfillmentAction} + * @memberof CreateFulfillmentOrderRequest + */ + fulfillmentAction?: FulfillmentAction; + /** + * + * @type {FulfillmentPolicy} + * @memberof CreateFulfillmentOrderRequest + */ + fulfillmentPolicy?: FulfillmentPolicy; + /** + * + * @type {CODSettings} + * @memberof CreateFulfillmentOrderRequest + */ + codSettings?: CODSettings; + /** + * The two-character country code for the country from which the fulfillment order ships. Must be in ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof CreateFulfillmentOrderRequest + */ + shipFromCountryCode?: string; + /** + * A list of email addresses that the seller provides that are used by Amazon to send ship-complete notifications to recipients on behalf of the seller. + * @type {Array} + * @memberof CreateFulfillmentOrderRequest + */ + notificationEmails?: Array; + /** + * A list of features and their fulfillment policies to apply to the order. + * @type {Array} + * @memberof CreateFulfillmentOrderRequest + */ + featureConstraints?: Array; + /** + * An array of item information for creating a fulfillment order. + * @type {Array} + * @memberof CreateFulfillmentOrderRequest + */ + items: Array; +} +/** + * The response schema for the createFulfillmentOrder operation. + * @export + * @interface CreateFulfillmentOrderResponse + */ +export interface CreateFulfillmentOrderResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateFulfillmentOrderResponse + */ + errors?: Array; +} +/** + * The createFulfillmentReturn operation creates a fulfillment return for items that were fulfilled using the createFulfillmentOrder operation. For calls to createFulfillmentReturn, you must include ReturnReasonCode values returned by a previous call to the listReturnReasonCodes operation. + * @export + * @interface CreateFulfillmentReturnRequest + */ +export interface CreateFulfillmentReturnRequest { + /** + * An array of items to be returned. + * @type {Array} + * @memberof CreateFulfillmentReturnRequest + */ + items: Array; +} +/** + * The response schema for the createFulfillmentReturn operation. + * @export + * @interface CreateFulfillmentReturnResponse + */ +export interface CreateFulfillmentReturnResponse { + /** + * + * @type {CreateFulfillmentReturnResult} + * @memberof CreateFulfillmentReturnResponse + */ + payload?: CreateFulfillmentReturnResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateFulfillmentReturnResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface CreateFulfillmentReturnResult + */ +export interface CreateFulfillmentReturnResult { + /** + * An array of items that Amazon accepted for return. Returns empty if no items were accepted for return. + * @type {Array} + * @memberof CreateFulfillmentReturnResult + */ + returnItems?: Array; + /** + * An array of invalid return item information. + * @type {Array} + * @memberof CreateFulfillmentReturnResult + */ + invalidReturnItems?: Array; + /** + * An array of return authorization information. + * @type {Array} + * @memberof CreateFulfillmentReturnResult + */ + returnAuthorizations?: Array; +} +/** + * An item that Amazon accepted for return. + * @export + * @interface CreateReturnItem + */ +export interface CreateReturnItem { + /** + * An identifier assigned by the seller to the return item. + * @type {string} + * @memberof CreateReturnItem + */ + sellerReturnItemId: string; + /** + * The identifier assigned to the item by the seller when the fulfillment order was created. + * @type {string} + * @memberof CreateReturnItem + */ + sellerFulfillmentOrderItemId: string; + /** + * The identifier for the shipment that is associated with the return item. + * @type {string} + * @memberof CreateReturnItem + */ + amazonShipmentId: string; + /** + * The return reason code assigned to the return item by the seller. + * @type {string} + * @memberof CreateReturnItem + */ + returnReasonCode: string; + /** + * An optional comment about the return item. + * @type {string} + * @memberof CreateReturnItem + */ + returnComment?: string; +} +/** + * The current delivery status of the package. + * @export + * @enum {string} + */ +export enum CurrentStatus { + InTransit = 'IN_TRANSIT', + Delivered = 'DELIVERED', + Returning = 'RETURNING', + Returned = 'RETURNED', + Undeliverable = 'UNDELIVERABLE', + Delayed = 'DELAYED', + AvailableForPickup = 'AVAILABLE_FOR_PICKUP', + CustomerAction = 'CUSTOMER_ACTION' +} + +/** + * The time range within which a Scheduled Delivery fulfillment order should be delivered. + * @export + * @interface DeliveryWindow + */ +export interface DeliveryWindow { + /** + * + * @type {string} + * @memberof DeliveryWindow + */ + startDate: string; + /** + * + * @type {string} + * @memberof DeliveryWindow + */ + endDate: string; +} +/** + * The event code for the delivery event. + * @export + * @enum {string} + */ +export enum EventCode { + _101 = 'EVENT_101', + _102 = 'EVENT_102', + _201 = 'EVENT_201', + _202 = 'EVENT_202', + _203 = 'EVENT_203', + _204 = 'EVENT_204', + _205 = 'EVENT_205', + _206 = 'EVENT_206', + _301 = 'EVENT_301', + _302 = 'EVENT_302', + _304 = 'EVENT_304', + _306 = 'EVENT_306', + _307 = 'EVENT_307', + _308 = 'EVENT_308', + _309 = 'EVENT_309', + _401 = 'EVENT_401', + _402 = 'EVENT_402', + _403 = 'EVENT_403', + _404 = 'EVENT_404', + _405 = 'EVENT_405', + _406 = 'EVENT_406', + _407 = 'EVENT_407', + _408 = 'EVENT_408', + _409 = 'EVENT_409', + _411 = 'EVENT_411', + _412 = 'EVENT_412', + _413 = 'EVENT_413', + _414 = 'EVENT_414', + _415 = 'EVENT_415', + _416 = 'EVENT_416', + _417 = 'EVENT_417', + _418 = 'EVENT_418', + _419 = 'EVENT_419' +} + +/** + * A Multi-Channel Fulfillment feature. + * @export + * @interface Feature + */ +export interface Feature { + /** + * The feature name. + * @type {string} + * @memberof Feature + */ + featureName: string; + /** + * The feature description. + * @type {string} + * @memberof Feature + */ + featureDescription: string; + /** + * When true, indicates that the seller is eligible to use the feature. + * @type {boolean} + * @memberof Feature + */ + sellerEligible?: boolean; +} +/** + * Settings to apply to an order that includes the specified fulfillment feature. + * @export + * @interface FeatureSettings + */ +export interface FeatureSettings { + /** + * The name of the feature. + * @type {string} + * @memberof FeatureSettings + */ + featureName?: string; + /** + * Specifies the policy to use when fulfilling an order. + * @type {string} + * @memberof FeatureSettings + */ + featureFulfillmentPolicy?: FeatureSettingsFeatureFulfillmentPolicyEnum; +} + +/** + * @export + * @enum {string} + */ +export enum FeatureSettingsFeatureFulfillmentPolicyEnum { + Required = 'Required', + NotRequired = 'NotRequired' +} + +/** + * Information about an SKU, including the count available, identifiers, and a list of overlapping SKUs that share the same inventory pool. + * @export + * @interface FeatureSku + */ +export interface FeatureSku { + /** + * Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @type {string} + * @memberof FeatureSku + */ + sellerSku?: string; + /** + * The unique SKU used by Amazon\'s fulfillment network. + * @type {string} + * @memberof FeatureSku + */ + fnSku?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof FeatureSku + */ + asin?: string; + /** + * The number of SKUs available for this service. + * @type {number} + * @memberof FeatureSku + */ + skuCount?: number; + /** + * Other seller SKUs that are shared across the same inventory. + * @type {Array} + * @memberof FeatureSku + */ + overlappingSkus?: Array; +} +/** + * Fee type and cost. + * @export + * @interface Fee + */ +export interface Fee { + /** + * The type of fee. + * @type {string} + * @memberof Fee + */ + name: FeeNameEnum; + /** + * + * @type {Money} + * @memberof Fee + */ + amount: Money; +} + +/** + * @export + * @enum {string} + */ +export enum FeeNameEnum { + FbaPerUnitFulfillmentFee = 'FBAPerUnitFulfillmentFee', + FbaPerOrderFulfillmentFee = 'FBAPerOrderFulfillmentFee', + FbaTransportationFee = 'FBATransportationFee', + FbaFulfillmentCodFee = 'FBAFulfillmentCODFee' +} + +/** + * Specifies whether the fulfillment order should ship now or have an order hold put on it. + * @export + * @enum {string} + */ +export enum FulfillmentAction { + Ship = 'Ship', + Hold = 'Hold' +} + +/** + * General information about a fulfillment order, including its status. + * @export + * @interface FulfillmentOrder + */ +export interface FulfillmentOrder { + /** + * The fulfillment order identifier submitted with the createFulfillmentOrder operation. + * @type {string} + * @memberof FulfillmentOrder + */ + sellerFulfillmentOrderId: string; + /** + * The identifier for the marketplace the fulfillment order is placed against. + * @type {string} + * @memberof FulfillmentOrder + */ + marketplaceId: string; + /** + * A fulfillment order identifier submitted with the createFulfillmentOrder operation. Displays as the order identifier in recipient-facing materials such as the packing slip. + * @type {string} + * @memberof FulfillmentOrder + */ + displayableOrderId: string; + /** + * + * @type {string} + * @memberof FulfillmentOrder + */ + displayableOrderDate: string; + /** + * A text block submitted with the createFulfillmentOrder operation. Displays in recipient-facing materials such as the packing slip. + * @type {string} + * @memberof FulfillmentOrder + */ + displayableOrderComment: string; + /** + * + * @type {ShippingSpeedCategory} + * @memberof FulfillmentOrder + */ + shippingSpeedCategory: ShippingSpeedCategory; + /** + * + * @type {DeliveryWindow} + * @memberof FulfillmentOrder + */ + deliveryWindow?: DeliveryWindow; + /** + * + * @type {Address} + * @memberof FulfillmentOrder + */ + destinationAddress: Address; + /** + * + * @type {FulfillmentAction} + * @memberof FulfillmentOrder + */ + fulfillmentAction?: FulfillmentAction; + /** + * + * @type {FulfillmentPolicy} + * @memberof FulfillmentOrder + */ + fulfillmentPolicy?: FulfillmentPolicy; + /** + * + * @type {CODSettings} + * @memberof FulfillmentOrder + */ + codSettings?: CODSettings; + /** + * + * @type {string} + * @memberof FulfillmentOrder + */ + receivedDate: string; + /** + * + * @type {FulfillmentOrderStatus} + * @memberof FulfillmentOrder + */ + fulfillmentOrderStatus: FulfillmentOrderStatus; + /** + * + * @type {string} + * @memberof FulfillmentOrder + */ + statusUpdatedDate: string; + /** + * A list of email addresses that the seller provides that are used by Amazon to send ship-complete notifications to recipients on behalf of the seller. + * @type {Array} + * @memberof FulfillmentOrder + */ + notificationEmails?: Array; + /** + * A list of features and their fulfillment policies to apply to the order. + * @type {Array} + * @memberof FulfillmentOrder + */ + featureConstraints?: Array; +} +/** + * Item information for a fulfillment order. + * @export + * @interface FulfillmentOrderItem + */ +export interface FulfillmentOrderItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof FulfillmentOrderItem + */ + sellerSku: string; + /** + * A fulfillment order item identifier submitted with a call to the createFulfillmentOrder operation. + * @type {string} + * @memberof FulfillmentOrderItem + */ + sellerFulfillmentOrderItemId: string; + /** + * The item quantity. + * @type {number} + * @memberof FulfillmentOrderItem + */ + quantity: number; + /** + * A message to the gift recipient, if applicable. + * @type {string} + * @memberof FulfillmentOrderItem + */ + giftMessage?: string; + /** + * Item-specific text that displays in recipient-facing materials such as the outbound shipment packing slip. + * @type {string} + * @memberof FulfillmentOrderItem + */ + displayableComment?: string; + /** + * Amazon\'s fulfillment network SKU of the item. + * @type {string} + * @memberof FulfillmentOrderItem + */ + fulfillmentNetworkSku?: string; + /** + * Indicates whether the item is sellable or unsellable. + * @type {string} + * @memberof FulfillmentOrderItem + */ + orderItemDisposition?: string; + /** + * The item quantity. + * @type {number} + * @memberof FulfillmentOrderItem + */ + cancelledQuantity: number; + /** + * The item quantity. + * @type {number} + * @memberof FulfillmentOrderItem + */ + unfulfillableQuantity: number; + /** + * + * @type {string} + * @memberof FulfillmentOrderItem + */ + estimatedShipDate?: string; + /** + * + * @type {string} + * @memberof FulfillmentOrderItem + */ + estimatedArrivalDate?: string; + /** + * + * @type {Money} + * @memberof FulfillmentOrderItem + */ + perUnitPrice?: Money; + /** + * + * @type {Money} + * @memberof FulfillmentOrderItem + */ + perUnitTax?: Money; + /** + * + * @type {Money} + * @memberof FulfillmentOrderItem + */ + perUnitDeclaredValue?: Money; +} +/** + * The current status of the fulfillment order. + * @export + * @enum {string} + */ +export enum FulfillmentOrderStatus { + New = 'New', + Received = 'Received', + Planning = 'Planning', + Processing = 'Processing', + Cancelled = 'Cancelled', + Complete = 'Complete', + CompletePartialled = 'CompletePartialled', + Unfulfillable = 'Unfulfillable', + Invalid = 'Invalid' +} + +/** + * The FulfillmentPolicy value specified when you submitted the createFulfillmentOrder operation. + * @export + * @enum {string} + */ +export enum FulfillmentPolicy { + FillOrKill = 'FillOrKill', + FillAll = 'FillAll', + FillAllAvailable = 'FillAllAvailable' +} + +/** + * Information about a fulfillment order preview, including delivery and fee information based on shipping method. + * @export + * @interface FulfillmentPreview + */ +export interface FulfillmentPreview { + /** + * + * @type {ShippingSpeedCategory} + * @memberof FulfillmentPreview + */ + shippingSpeedCategory: ShippingSpeedCategory; + /** + * + * @type {ScheduledDeliveryInfo} + * @memberof FulfillmentPreview + */ + scheduledDeliveryInfo?: ScheduledDeliveryInfo; + /** + * When true, this fulfillment order preview is fulfillable. + * @type {boolean} + * @memberof FulfillmentPreview + */ + isFulfillable: boolean; + /** + * When true, this fulfillment order preview is for COD (Cash On Delivery). + * @type {boolean} + * @memberof FulfillmentPreview + */ + isCODCapable: boolean; + /** + * + * @type {Weight} + * @memberof FulfillmentPreview + */ + estimatedShippingWeight?: Weight; + /** + * An array of fee type and cost pairs. + * @type {Array} + * @memberof FulfillmentPreview + */ + estimatedFees?: Array; + /** + * An array of fulfillment preview shipment information. + * @type {Array} + * @memberof FulfillmentPreview + */ + fulfillmentPreviewShipments?: Array; + /** + * An array of unfulfillable preview item information. + * @type {Array} + * @memberof FulfillmentPreview + */ + unfulfillablePreviewItems?: Array; + /** + * + * @type {Array} + * @memberof FulfillmentPreview + */ + orderUnfulfillableReasons?: Array; + /** + * The marketplace the fulfillment order is placed against. + * @type {string} + * @memberof FulfillmentPreview + */ + marketplaceId: string; + /** + * A list of features and their fulfillment policies to apply to the order. + * @type {Array} + * @memberof FulfillmentPreview + */ + featureConstraints?: Array; +} +/** + * Item information for a shipment in a fulfillment order preview. + * @export + * @interface FulfillmentPreviewItem + */ +export interface FulfillmentPreviewItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof FulfillmentPreviewItem + */ + sellerSku: string; + /** + * The item quantity. + * @type {number} + * @memberof FulfillmentPreviewItem + */ + quantity: number; + /** + * A fulfillment order item identifier that the seller created with a call to the createFulfillmentOrder operation. + * @type {string} + * @memberof FulfillmentPreviewItem + */ + sellerFulfillmentOrderItemId: string; + /** + * + * @type {Weight} + * @memberof FulfillmentPreviewItem + */ + estimatedShippingWeight?: Weight; + /** + * The method used to calculate the estimated shipping weight. + * @type {string} + * @memberof FulfillmentPreviewItem + */ + shippingWeightCalculationMethod?: FulfillmentPreviewItemShippingWeightCalculationMethodEnum; +} + +/** + * @export + * @enum {string} + */ +export enum FulfillmentPreviewItemShippingWeightCalculationMethodEnum { + Package = 'Package', + Dimensional = 'Dimensional' +} + +/** + * Delivery and item information for a shipment in a fulfillment order preview. + * @export + * @interface FulfillmentPreviewShipment + */ +export interface FulfillmentPreviewShipment { + /** + * + * @type {string} + * @memberof FulfillmentPreviewShipment + */ + earliestShipDate?: string; + /** + * + * @type {string} + * @memberof FulfillmentPreviewShipment + */ + latestShipDate?: string; + /** + * + * @type {string} + * @memberof FulfillmentPreviewShipment + */ + earliestArrivalDate?: string; + /** + * + * @type {string} + * @memberof FulfillmentPreviewShipment + */ + latestArrivalDate?: string; + /** + * Provides additional insight into the shipment timeline when exact delivery dates are not able to be precomputed. + * @type {Array} + * @memberof FulfillmentPreviewShipment + */ + shippingNotes?: Array; + /** + * An array of fulfillment preview item information. + * @type {Array} + * @memberof FulfillmentPreviewShipment + */ + fulfillmentPreviewItems: Array; +} +/** + * Indicates if the return item has been processed by a fulfillment center. + * @export + * @enum {string} + */ +export enum FulfillmentReturnItemStatus { + New = 'New', + Processed = 'Processed' +} + +/** + * Delivery and item information for a shipment in a fulfillment order. + * @export + * @interface FulfillmentShipment + */ +export interface FulfillmentShipment { + /** + * A shipment identifier assigned by Amazon. + * @type {string} + * @memberof FulfillmentShipment + */ + amazonShipmentId: string; + /** + * An identifier for the fulfillment center that the shipment will be sent from. + * @type {string} + * @memberof FulfillmentShipment + */ + fulfillmentCenterId: string; + /** + * The current status of the shipment. + * @type {string} + * @memberof FulfillmentShipment + */ + fulfillmentShipmentStatus: FulfillmentShipmentFulfillmentShipmentStatusEnum; + /** + * + * @type {string} + * @memberof FulfillmentShipment + */ + shippingDate?: string; + /** + * + * @type {string} + * @memberof FulfillmentShipment + */ + estimatedArrivalDate?: string; + /** + * Provides additional insight into shipment timeline. Primairly used to communicate that actual delivery dates aren\'t available. + * @type {Array} + * @memberof FulfillmentShipment + */ + shippingNotes?: Array; + /** + * An array of fulfillment shipment item information. + * @type {Array} + * @memberof FulfillmentShipment + */ + fulfillmentShipmentItem: Array; + /** + * An array of fulfillment shipment package information. + * @type {Array} + * @memberof FulfillmentShipment + */ + fulfillmentShipmentPackage?: Array; +} + +/** + * @export + * @enum {string} + */ +export enum FulfillmentShipmentFulfillmentShipmentStatusEnum { + Pending = 'PENDING', + Shipped = 'SHIPPED', + CancelledByFulfiller = 'CANCELLED_BY_FULFILLER', + CancelledBySeller = 'CANCELLED_BY_SELLER' +} + +/** + * Item information for a shipment in a fulfillment order. + * @export + * @interface FulfillmentShipmentItem + */ +export interface FulfillmentShipmentItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof FulfillmentShipmentItem + */ + sellerSku: string; + /** + * The fulfillment order item identifier that the seller created and submitted with a call to the createFulfillmentOrder operation. + * @type {string} + * @memberof FulfillmentShipmentItem + */ + sellerFulfillmentOrderItemId: string; + /** + * The item quantity. + * @type {number} + * @memberof FulfillmentShipmentItem + */ + quantity: number; + /** + * An identifier for the package that contains the item quantity. + * @type {number} + * @memberof FulfillmentShipmentItem + */ + packageNumber?: number; + /** + * The serial number of the shipped item. + * @type {string} + * @memberof FulfillmentShipmentItem + */ + serialNumber?: string; +} +/** + * Package information for a shipment in a fulfillment order. + * @export + * @interface FulfillmentShipmentPackage + */ +export interface FulfillmentShipmentPackage { + /** + * Identifies a package in a shipment. + * @type {number} + * @memberof FulfillmentShipmentPackage + */ + packageNumber: number; + /** + * Identifies the carrier who will deliver the shipment to the recipient. + * @type {string} + * @memberof FulfillmentShipmentPackage + */ + carrierCode: string; + /** + * The tracking number, if provided, can be used to obtain tracking and delivery information. + * @type {string} + * @memberof FulfillmentShipmentPackage + */ + trackingNumber?: string; + /** + * + * @type {string} + * @memberof FulfillmentShipmentPackage + */ + estimatedArrivalDate?: string; +} +/** + * The breakdown of eligibility inventory by feature. + * @export + * @interface GetFeatureInventoryResponse + */ +export interface GetFeatureInventoryResponse { + /** + * + * @type {GetFeatureInventoryResult} + * @memberof GetFeatureInventoryResponse + */ + payload?: GetFeatureInventoryResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFeatureInventoryResponse + */ + errors?: Array; +} +/** + * The payload for the getEligibileInventory operation. + * @export + * @interface GetFeatureInventoryResult + */ +export interface GetFeatureInventoryResult { + /** + * The requested marketplace. + * @type {string} + * @memberof GetFeatureInventoryResult + */ + marketplaceId: string; + /** + * The name of the feature. + * @type {string} + * @memberof GetFeatureInventoryResult + */ + featureName: string; + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof GetFeatureInventoryResult + */ + nextToken?: string; + /** + * An array of SKUs eligible for this feature and the quantity available. + * @type {Array} + * @memberof GetFeatureInventoryResult + */ + featureSkus?: Array; +} +/** + * The response schema for the getFeatureSKU operation. + * @export + * @interface GetFeatureSkuResponse + */ +export interface GetFeatureSkuResponse { + /** + * + * @type {GetFeatureSkuResult} + * @memberof GetFeatureSkuResponse + */ + payload?: GetFeatureSkuResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFeatureSkuResponse + */ + errors?: Array; +} +/** + * The payload for the getFeatureSKU operation. + * @export + * @interface GetFeatureSkuResult + */ +export interface GetFeatureSkuResult { + /** + * The requested marketplace. + * @type {string} + * @memberof GetFeatureSkuResult + */ + marketplaceId: string; + /** + * The name of the feature. + * @type {string} + * @memberof GetFeatureSkuResult + */ + featureName: string; + /** + * When true, the seller SKU is eligible for the requested feature. + * @type {boolean} + * @memberof GetFeatureSkuResult + */ + isEligible: boolean; + /** + * A list of one or more reasons that the seller SKU is ineligibile for the feature. Possible values: * MERCHANT_NOT_ENROLLED - The merchant isn\'t enrolled for the feature. * SKU_NOT_ELIGIBLE - The SKU doesn\'t reside in a warehouse that supports the feature. * INVALID_SKU - There is an issue with the SKU provided. + * @type {Array} + * @memberof GetFeatureSkuResult + */ + ineligibleReasons?: Array; + /** + * + * @type {FeatureSku} + * @memberof GetFeatureSkuResult + */ + skuInfo?: FeatureSku; +} +/** + * The response schema for the getFeatures operation. + * @export + * @interface GetFeaturesResponse + */ +export interface GetFeaturesResponse { + /** + * + * @type {GetFeaturesResult} + * @memberof GetFeaturesResponse + */ + payload?: GetFeaturesResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFeaturesResponse + */ + errors?: Array; +} +/** + * The payload for the getFeatures operation. + * @export + * @interface GetFeaturesResult + */ +export interface GetFeaturesResult { + /** + * An array of features. + * @type {Array} + * @memberof GetFeaturesResult + */ + features: Array; +} +/** + * The response schema for the getFulfillmentOrder operation. + * @export + * @interface GetFulfillmentOrderResponse + */ +export interface GetFulfillmentOrderResponse { + /** + * + * @type {GetFulfillmentOrderResult} + * @memberof GetFulfillmentOrderResponse + */ + payload?: GetFulfillmentOrderResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFulfillmentOrderResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetFulfillmentOrderResult + */ +export interface GetFulfillmentOrderResult { + /** + * + * @type {FulfillmentOrder} + * @memberof GetFulfillmentOrderResult + */ + fulfillmentOrder: FulfillmentOrder; + /** + * An array of fulfillment order item information. + * @type {Array} + * @memberof GetFulfillmentOrderResult + */ + fulfillmentOrderItems: Array; + /** + * An array of fulfillment shipment information. + * @type {Array} + * @memberof GetFulfillmentOrderResult + */ + fulfillmentShipments?: Array; + /** + * An array of items that Amazon accepted for return. Returns empty if no items were accepted for return. + * @type {Array} + * @memberof GetFulfillmentOrderResult + */ + returnItems: Array; + /** + * An array of return authorization information. + * @type {Array} + * @memberof GetFulfillmentOrderResult + */ + returnAuthorizations: Array; +} +/** + * Item information for a fulfillment order preview. + * @export + * @interface GetFulfillmentPreviewItem + */ +export interface GetFulfillmentPreviewItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof GetFulfillmentPreviewItem + */ + sellerSku: string; + /** + * The item quantity. + * @type {number} + * @memberof GetFulfillmentPreviewItem + */ + quantity: number; + /** + * + * @type {Money} + * @memberof GetFulfillmentPreviewItem + */ + perUnitDeclaredValue?: Money; + /** + * A fulfillment order item identifier that the seller creates to track items in the fulfillment preview. + * @type {string} + * @memberof GetFulfillmentPreviewItem + */ + sellerFulfillmentOrderItemId: string; +} +/** + * The request body schema for the getFulfillmentPreview operation. + * @export + * @interface GetFulfillmentPreviewRequest + */ +export interface GetFulfillmentPreviewRequest { + /** + * The marketplace the fulfillment order is placed against. + * @type {string} + * @memberof GetFulfillmentPreviewRequest + */ + marketplaceId?: string; + /** + * + * @type {Address} + * @memberof GetFulfillmentPreviewRequest + */ + address: Address; + /** + * An array of fulfillment preview item information. + * @type {Array} + * @memberof GetFulfillmentPreviewRequest + */ + items: Array; + /** + * + * @type {Array} + * @memberof GetFulfillmentPreviewRequest + */ + shippingSpeedCategories?: Array; + /** + * Specifies whether to return fulfillment order previews that are for COD (Cash On Delivery). Possible values: * true - Returns all fulfillment order previews (both for COD and not for COD). * false - Returns only fulfillment order previews that are not for COD. + * @type {boolean} + * @memberof GetFulfillmentPreviewRequest + */ + includeCODFulfillmentPreview?: boolean; + /** + * Specifies whether to return the ScheduledDeliveryInfo response object, which contains the available delivery windows for a Scheduled Delivery. The ScheduledDeliveryInfo response object can only be returned for fulfillment order previews with ShippingSpeedCategories = ScheduledDelivery. + * @type {boolean} + * @memberof GetFulfillmentPreviewRequest + */ + includeDeliveryWindows?: boolean; + /** + * A list of features and their fulfillment policies to apply to the order. + * @type {Array} + * @memberof GetFulfillmentPreviewRequest + */ + featureConstraints?: Array; +} +/** + * The response schema for the getFulfillmentPreview operation. + * @export + * @interface GetFulfillmentPreviewResponse + */ +export interface GetFulfillmentPreviewResponse { + /** + * + * @type {GetFulfillmentPreviewResult} + * @memberof GetFulfillmentPreviewResponse + */ + payload?: GetFulfillmentPreviewResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetFulfillmentPreviewResponse + */ + errors?: Array; +} +/** + * A list of fulfillment order previews, including estimated shipping weights, estimated shipping fees, and estimated ship dates and arrival dates. + * @export + * @interface GetFulfillmentPreviewResult + */ +export interface GetFulfillmentPreviewResult { + /** + * An array of fulfillment preview information. + * @type {Array} + * @memberof GetFulfillmentPreviewResult + */ + fulfillmentPreviews?: Array; +} +/** + * The response schema for the getPackageTrackingDetails operation. + * @export + * @interface GetPackageTrackingDetailsResponse + */ +export interface GetPackageTrackingDetailsResponse { + /** + * + * @type {PackageTrackingDetails} + * @memberof GetPackageTrackingDetailsResponse + */ + payload?: PackageTrackingDetails; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetPackageTrackingDetailsResponse + */ + errors?: Array; +} +/** + * The reason that the item is invalid for return. + * @export + * @interface InvalidItemReason + */ +export interface InvalidItemReason { + /** + * + * @type {InvalidItemReasonCode} + * @memberof InvalidItemReason + */ + invalidItemReasonCode: InvalidItemReasonCode; + /** + * A human readable description of the invalid item reason code. + * @type {string} + * @memberof InvalidItemReason + */ + description: string; +} +/** + * A code for why the item is invalid for return. + * @export + * @enum {string} + */ +export enum InvalidItemReasonCode { + InvalidValues = 'InvalidValues', + DuplicateRequest = 'DuplicateRequest', + NoCompletedShipItems = 'NoCompletedShipItems', + NoReturnableQuantity = 'NoReturnableQuantity' +} + +/** + * An item that is invalid for return. + * @export + * @interface InvalidReturnItem + */ +export interface InvalidReturnItem { + /** + * An identifier assigned by the seller to the return item. + * @type {string} + * @memberof InvalidReturnItem + */ + sellerReturnItemId: string; + /** + * The identifier assigned to the item by the seller when the fulfillment order was created. + * @type {string} + * @memberof InvalidReturnItem + */ + sellerFulfillmentOrderItemId: string; + /** + * + * @type {InvalidItemReason} + * @memberof InvalidReturnItem + */ + invalidItemReason: InvalidItemReason; +} +/** + * The response schema for the listAllFulfillmentOrders operation. + * @export + * @interface ListAllFulfillmentOrdersResponse + */ +export interface ListAllFulfillmentOrdersResponse { + /** + * + * @type {ListAllFulfillmentOrdersResult} + * @memberof ListAllFulfillmentOrdersResponse + */ + payload?: ListAllFulfillmentOrdersResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ListAllFulfillmentOrdersResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface ListAllFulfillmentOrdersResult + */ +export interface ListAllFulfillmentOrdersResult { + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof ListAllFulfillmentOrdersResult + */ + nextToken?: string; + /** + * An array of fulfillment order information. + * @type {Array} + * @memberof ListAllFulfillmentOrdersResult + */ + fulfillmentOrders?: Array; +} +/** + * The response schema for the listReturnReasonCodes operation. + * @export + * @interface ListReturnReasonCodesResponse + */ +export interface ListReturnReasonCodesResponse { + /** + * + * @type {ListReturnReasonCodesResult} + * @memberof ListReturnReasonCodesResponse + */ + payload?: ListReturnReasonCodesResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof ListReturnReasonCodesResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface ListReturnReasonCodesResult + */ +export interface ListReturnReasonCodesResult { + /** + * An array of return reason code details. + * @type {Array} + * @memberof ListReturnReasonCodesResult + */ + reasonCodeDetails?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * An amount of money, including units in the form of currency. + * @export + * @interface Money + */ +export interface Money { + /** + * Three digit currency code in ISO 4217 format. + * @type {string} + * @memberof Money + */ + currencyCode: string; + /** + * A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. + * @type {string} + * @memberof Money + */ + value: string; +} +/** + * + * @export + * @interface PackageTrackingDetails + */ +export interface PackageTrackingDetails { + /** + * The package identifier. + * @type {number} + * @memberof PackageTrackingDetails + */ + packageNumber: number; + /** + * The tracking number for the package. + * @type {string} + * @memberof PackageTrackingDetails + */ + trackingNumber?: string; + /** + * Link on swiship.com that allows customers to track the package. + * @type {string} + * @memberof PackageTrackingDetails + */ + customerTrackingLink?: string; + /** + * The name of the carrier. + * @type {string} + * @memberof PackageTrackingDetails + */ + carrierCode?: string; + /** + * The phone number of the carrier. + * @type {string} + * @memberof PackageTrackingDetails + */ + carrierPhoneNumber?: string; + /** + * The URL of the carrier’s website. + * @type {string} + * @memberof PackageTrackingDetails + */ + carrierURL?: string; + /** + * + * @type {string} + * @memberof PackageTrackingDetails + */ + shipDate?: string; + /** + * + * @type {string} + * @memberof PackageTrackingDetails + */ + estimatedArrivalDate?: string; + /** + * + * @type {TrackingAddress} + * @memberof PackageTrackingDetails + */ + shipToAddress?: TrackingAddress; + /** + * + * @type {CurrentStatus} + * @memberof PackageTrackingDetails + */ + currentStatus?: CurrentStatus; + /** + * Description corresponding to the CurrentStatus value. + * @type {string} + * @memberof PackageTrackingDetails + */ + currentStatusDescription?: string; + /** + * The name of the person who signed for the package. + * @type {string} + * @memberof PackageTrackingDetails + */ + signedForBy?: string; + /** + * + * @type {AdditionalLocationInfo} + * @memberof PackageTrackingDetails + */ + additionalLocationInfo?: AdditionalLocationInfo; + /** + * An array of tracking event information. + * @type {Array} + * @memberof PackageTrackingDetails + */ + trackingEvents?: Array; +} +/** + * A return reason code, a description, and an optional description translation. + * @export + * @interface ReasonCodeDetails + */ +export interface ReasonCodeDetails { + /** + * A code that indicates a valid return reason. + * @type {string} + * @memberof ReasonCodeDetails + */ + returnReasonCode: string; + /** + * A human readable description of the return reason code. + * @type {string} + * @memberof ReasonCodeDetails + */ + description: string; + /** + * A translation of the description. The translation is in the language specified in the Language request parameter. + * @type {string} + * @memberof ReasonCodeDetails + */ + translatedDescription?: string; +} +/** + * Return authorization information for items accepted for return. + * @export + * @interface ReturnAuthorization + */ +export interface ReturnAuthorization { + /** + * An identifier for the return authorization. This identifier associates return items with the return authorization used to return them. + * @type {string} + * @memberof ReturnAuthorization + */ + returnAuthorizationId: string; + /** + * An identifier for the Amazon fulfillment center that the return items should be sent to. + * @type {string} + * @memberof ReturnAuthorization + */ + fulfillmentCenterId: string; + /** + * + * @type {Address} + * @memberof ReturnAuthorization + */ + returnToAddress: Address; + /** + * The return merchandise authorization (RMA) that Amazon needs to process the return. + * @type {string} + * @memberof ReturnAuthorization + */ + amazonRmaId: string; + /** + * A URL for a web page that contains the return authorization barcode and the mailing label. This does not include pre-paid shipping. + * @type {string} + * @memberof ReturnAuthorization + */ + rmaPageURL: string; +} +/** + * An item that Amazon accepted for return. + * @export + * @interface ReturnItem + */ +export interface ReturnItem { + /** + * An identifier assigned by the seller to the return item. + * @type {string} + * @memberof ReturnItem + */ + sellerReturnItemId: string; + /** + * The identifier assigned to the item by the seller when the fulfillment order was created. + * @type {string} + * @memberof ReturnItem + */ + sellerFulfillmentOrderItemId: string; + /** + * The identifier for the shipment that is associated with the return item. + * @type {string} + * @memberof ReturnItem + */ + amazonShipmentId: string; + /** + * The return reason code assigned to the return item by the seller. + * @type {string} + * @memberof ReturnItem + */ + sellerReturnReasonCode: string; + /** + * An optional comment about the return item. + * @type {string} + * @memberof ReturnItem + */ + returnComment?: string; + /** + * The return reason code that the Amazon fulfillment center assigned to the return item. + * @type {string} + * @memberof ReturnItem + */ + amazonReturnReasonCode?: string; + /** + * + * @type {FulfillmentReturnItemStatus} + * @memberof ReturnItem + */ + status: FulfillmentReturnItemStatus; + /** + * + * @type {string} + * @memberof ReturnItem + */ + statusChangedDate: string; + /** + * Identifies the return authorization used to return this item. See ReturnAuthorization. + * @type {string} + * @memberof ReturnItem + */ + returnAuthorizationId?: string; + /** + * + * @type {ReturnItemDisposition} + * @memberof ReturnItem + */ + returnReceivedCondition?: ReturnItemDisposition; + /** + * The identifier for the Amazon fulfillment center that processed the return item. + * @type {string} + * @memberof ReturnItem + */ + fulfillmentCenterId?: string; +} +/** + * The condition of the return item when received by an Amazon fulfillment center. + * @export + * @enum {string} + */ +export enum ReturnItemDisposition { + Sellable = 'Sellable', + Defective = 'Defective', + CustomerDamaged = 'CustomerDamaged', + CarrierDamaged = 'CarrierDamaged', + FulfillerDamaged = 'FulfillerDamaged' +} + +/** + * Delivery information for a scheduled delivery. + * @export + * @interface ScheduledDeliveryInfo + */ +export interface ScheduledDeliveryInfo { + /** + * The time zone of the destination address for the fulfillment order preview. Must be an IANA time zone name. Example: Asia/Tokyo. + * @type {string} + * @memberof ScheduledDeliveryInfo + */ + deliveryTimeZone: string; + /** + * An array of delivery windows. + * @type {Array} + * @memberof ScheduledDeliveryInfo + */ + deliveryWindows: Array; +} +/** + * The shipping method used for the fulfillment order. + * @export + * @enum {string} + */ +export enum ShippingSpeedCategory { + Standard = 'Standard', + Expedited = 'Expedited', + Priority = 'Priority', + ScheduledDelivery = 'ScheduledDelivery' +} + +/** + * Address information for tracking the package. + * @export + * @interface TrackingAddress + */ +export interface TrackingAddress { + /** + * The city. + * @type {string} + * @memberof TrackingAddress + */ + city: string; + /** + * The state. + * @type {string} + * @memberof TrackingAddress + */ + state: string; + /** + * The country. + * @type {string} + * @memberof TrackingAddress + */ + country: string; +} +/** + * Information for tracking package deliveries. + * @export + * @interface TrackingEvent + */ +export interface TrackingEvent { + /** + * + * @type {string} + * @memberof TrackingEvent + */ + eventDate: string; + /** + * + * @type {TrackingAddress} + * @memberof TrackingEvent + */ + eventAddress: TrackingAddress; + /** + * + * @type {EventCode} + * @memberof TrackingEvent + */ + eventCode: EventCode; + /** + * A description for the corresponding event code. + * @type {string} + * @memberof TrackingEvent + */ + eventDescription: string; +} +/** + * Information about unfulfillable items in a fulfillment order preview. + * @export + * @interface UnfulfillablePreviewItem + */ +export interface UnfulfillablePreviewItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof UnfulfillablePreviewItem + */ + sellerSku: string; + /** + * The item quantity. + * @type {number} + * @memberof UnfulfillablePreviewItem + */ + quantity: number; + /** + * A fulfillment order item identifier created with a call to the getFulfillmentPreview operation. + * @type {string} + * @memberof UnfulfillablePreviewItem + */ + sellerFulfillmentOrderItemId: string; + /** + * + * @type {Array} + * @memberof UnfulfillablePreviewItem + */ + itemUnfulfillableReasons?: Array; +} +/** + * Item information for updating a fulfillment order. + * @export + * @interface UpdateFulfillmentOrderItem + */ +export interface UpdateFulfillmentOrderItem { + /** + * The seller SKU of the item. + * @type {string} + * @memberof UpdateFulfillmentOrderItem + */ + sellerSku?: string; + /** + * Identifies the fulfillment order item to update. Created with a previous call to the createFulfillmentOrder operation. + * @type {string} + * @memberof UpdateFulfillmentOrderItem + */ + sellerFulfillmentOrderItemId: string; + /** + * The item quantity. + * @type {number} + * @memberof UpdateFulfillmentOrderItem + */ + quantity: number; + /** + * A message to the gift recipient, if applicable. + * @type {string} + * @memberof UpdateFulfillmentOrderItem + */ + giftMessage?: string; + /** + * Item-specific text that displays in recipient-facing materials such as the outbound shipment packing slip. + * @type {string} + * @memberof UpdateFulfillmentOrderItem + */ + displayableComment?: string; + /** + * Amazon\'s fulfillment network SKU of the item. + * @type {string} + * @memberof UpdateFulfillmentOrderItem + */ + fulfillmentNetworkSku?: string; + /** + * Indicates whether the item is sellable or unsellable. + * @type {string} + * @memberof UpdateFulfillmentOrderItem + */ + orderItemDisposition?: string; + /** + * + * @type {Money} + * @memberof UpdateFulfillmentOrderItem + */ + perUnitDeclaredValue?: Money; + /** + * + * @type {Money} + * @memberof UpdateFulfillmentOrderItem + */ + perUnitPrice?: Money; + /** + * + * @type {Money} + * @memberof UpdateFulfillmentOrderItem + */ + perUnitTax?: Money; +} +/** + * + * @export + * @interface UpdateFulfillmentOrderRequest + */ +export interface UpdateFulfillmentOrderRequest { + /** + * The marketplace the fulfillment order is placed against. + * @type {string} + * @memberof UpdateFulfillmentOrderRequest + */ + marketplaceId?: string; + /** + * A fulfillment order identifier that the seller creates. This value displays as the order identifier in recipient-facing materials such as the outbound shipment packing slip. The value of DisplayableOrderId should match the order identifier that the seller provides to the recipient. The seller can use the SellerFulfillmentOrderId for this value or they can specify an alternate value if they want the recipient to reference an alternate order identifier. + * @type {string} + * @memberof UpdateFulfillmentOrderRequest + */ + displayableOrderId?: string; + /** + * + * @type {string} + * @memberof UpdateFulfillmentOrderRequest + */ + displayableOrderDate?: string; + /** + * Order-specific text that appears in recipient-facing materials such as the outbound shipment packing slip. + * @type {string} + * @memberof UpdateFulfillmentOrderRequest + */ + displayableOrderComment?: string; + /** + * + * @type {ShippingSpeedCategory} + * @memberof UpdateFulfillmentOrderRequest + */ + shippingSpeedCategory?: ShippingSpeedCategory; + /** + * + * @type {Address} + * @memberof UpdateFulfillmentOrderRequest + */ + destinationAddress?: Address; + /** + * + * @type {FulfillmentAction} + * @memberof UpdateFulfillmentOrderRequest + */ + fulfillmentAction?: FulfillmentAction; + /** + * + * @type {FulfillmentPolicy} + * @memberof UpdateFulfillmentOrderRequest + */ + fulfillmentPolicy?: FulfillmentPolicy; + /** + * The two-character country code for the country from which the fulfillment order ships. Must be in ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof UpdateFulfillmentOrderRequest + */ + shipFromCountryCode?: string; + /** + * A list of email addresses that the seller provides that are used by Amazon to send ship-complete notifications to recipients on behalf of the seller. + * @type {Array} + * @memberof UpdateFulfillmentOrderRequest + */ + notificationEmails?: Array; + /** + * A list of features and their fulfillment policies to apply to the order. + * @type {Array} + * @memberof UpdateFulfillmentOrderRequest + */ + featureConstraints?: Array; + /** + * An array of fulfillment order item information for updating a fulfillment order. + * @type {Array} + * @memberof UpdateFulfillmentOrderRequest + */ + items?: Array; +} +/** + * The response schema for the updateFulfillmentOrder operation. + * @export + * @interface UpdateFulfillmentOrderResponse + */ +export interface UpdateFulfillmentOrderResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof UpdateFulfillmentOrderResponse + */ + errors?: Array; +} +/** + * The weight. + * @export + * @interface Weight + */ +export interface Weight { + /** + * The unit of weight. + * @type {string} + * @memberof Weight + */ + unit: WeightUnitEnum; + /** + * The weight value. + * @type {string} + * @memberof Weight + */ + value: string; +} + +/** + * @export + * @enum {string} + */ +export enum WeightUnitEnum { + Kg = 'KG', + Lb = 'LB' +} + + +/** + * FbaOutboundApi - axios parameter creator + * @export + */ +export const FbaOutboundApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelFulfillmentOrder: async (sellerFulfillmentOrderId: string, options: any = {}): Promise => { + // verify required parameter 'sellerFulfillmentOrderId' is not null or undefined + assertParamExists('cancelFulfillmentOrder', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId) + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/cancel` + .replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFulfillmentOrder: async (body: CreateFulfillmentOrderRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createFulfillmentOrder', 'body', body) + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\'s request to return items. + * @param {CreateFulfillmentReturnRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFulfillmentReturn: async (sellerFulfillmentOrderId: string, body: CreateFulfillmentReturnRequest, options: any = {}): Promise => { + // verify required parameter 'sellerFulfillmentOrderId' is not null or undefined + assertParamExists('createFulfillmentReturn', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId) + // verify required parameter 'body' is not null or undefined + assertParamExists('createFulfillmentReturn', 'body', body) + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/return` + .replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature. + * @param {string} featureName The name of the feature for which to return a list of eligible inventory. + * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeatureInventory: async (marketplaceId: string, featureName: string, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getFeatureInventory', 'marketplaceId', marketplaceId) + // verify required parameter 'featureName' is not null or undefined + assertParamExists('getFeatureInventory', 'featureName', featureName) + const localVarPath = `/fba/outbound/2020-07-01/features/inventory/{featureName}` + .replace(`{${"featureName"}}`, encodeURIComponent(String(featureName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (nextToken !== undefined) { + localVarQueryParameter['nextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the count. + * @param {string} featureName The name of the feature. + * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeatureSKU: async (marketplaceId: string, featureName: string, sellerSku: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getFeatureSKU', 'marketplaceId', marketplaceId) + // verify required parameter 'featureName' is not null or undefined + assertParamExists('getFeatureSKU', 'featureName', featureName) + // verify required parameter 'sellerSku' is not null or undefined + assertParamExists('getFeatureSKU', 'sellerSku', sellerSku) + const localVarPath = `/fba/outbound/2020-07-01/features/inventory/{featureName}/{sellerSku}` + .replace(`{${"featureName"}}`, encodeURIComponent(String(featureName))) + .replace(`{${"sellerSku"}}`, encodeURIComponent(String(sellerSku))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the list of features. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeatures: async (marketplaceId: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getFeatures', 'marketplaceId', marketplaceId) + const localVarPath = `/fba/outbound/2020-07-01/features`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFulfillmentOrder: async (sellerFulfillmentOrderId: string, options: any = {}): Promise => { + // verify required parameter 'sellerFulfillmentOrderId' is not null or undefined + assertParamExists('getFulfillmentOrder', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId) + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}` + .replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetFulfillmentPreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFulfillmentPreview: async (body: GetFulfillmentPreviewRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getFulfillmentPreview', 'body', body) + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/preview`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPackageTrackingDetails: async (packageNumber: number, options: any = {}): Promise => { + // verify required parameter 'packageNumber' is not null or undefined + assertParamExists('getPackageTrackingDetails', 'packageNumber', packageNumber) + const localVarPath = `/fba/outbound/2020-07-01/tracking`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (packageNumber !== undefined) { + localVarQueryParameter['packageNumber'] = packageNumber; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllFulfillmentOrders: async (queryStartDate?: string, nextToken?: string, options: any = {}): Promise => { + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (queryStartDate !== undefined) { + localVarQueryParameter['queryStartDate'] = (queryStartDate as any instanceof Date) ? + (queryStartDate as any).toISOString() : + queryStartDate; + } + + if (nextToken !== undefined) { + localVarQueryParameter['nextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSku The seller SKU for which return reason codes are required. + * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into. + * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes. + * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReturnReasonCodes: async (sellerSku: string, language: string, marketplaceId?: string, sellerFulfillmentOrderId?: string, options: any = {}): Promise => { + // verify required parameter 'sellerSku' is not null or undefined + assertParamExists('listReturnReasonCodes', 'sellerSku', sellerSku) + // verify required parameter 'language' is not null or undefined + assertParamExists('listReturnReasonCodes', 'language', language) + const localVarPath = `/fba/outbound/2020-07-01/returnReasonCodes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (sellerSku !== undefined) { + localVarQueryParameter['sellerSku'] = sellerSku; + } + + if (marketplaceId !== undefined) { + localVarQueryParameter['marketplaceId'] = marketplaceId; + } + + if (sellerFulfillmentOrderId !== undefined) { + localVarQueryParameter['sellerFulfillmentOrderId'] = sellerFulfillmentOrderId; + } + + if (language !== undefined) { + localVarQueryParameter['language'] = language; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {UpdateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateFulfillmentOrder: async (sellerFulfillmentOrderId: string, body: UpdateFulfillmentOrderRequest, options: any = {}): Promise => { + // verify required parameter 'sellerFulfillmentOrderId' is not null or undefined + assertParamExists('updateFulfillmentOrder', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId) + // verify required parameter 'body' is not null or undefined + assertParamExists('updateFulfillmentOrder', 'body', body) + const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}` + .replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FbaOutboundApi - functional programming interface + * @export + */ +export const FbaOutboundApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FbaOutboundApiAxiosParamCreator(configuration) + return { + /** + * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFulfillmentOrder(sellerFulfillmentOrderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createFulfillmentOrder(body: CreateFulfillmentOrderRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFulfillmentOrder(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\'s request to return items. + * @param {CreateFulfillmentReturnRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createFulfillmentReturn(sellerFulfillmentOrderId: string, body: CreateFulfillmentReturnRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFulfillmentReturn(sellerFulfillmentOrderId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature. + * @param {string} featureName The name of the feature for which to return a list of eligible inventory. + * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFeatureInventory(marketplaceId: string, featureName: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFeatureInventory(marketplaceId, featureName, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the count. + * @param {string} featureName The name of the feature. + * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFeatureSKU(marketplaceId: string, featureName: string, sellerSku: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFeatureSKU(marketplaceId, featureName, sellerSku, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the list of features. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFeatures(marketplaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFeatures(marketplaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFulfillmentOrder(sellerFulfillmentOrderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetFulfillmentPreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFulfillmentPreview(body: GetFulfillmentPreviewRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFulfillmentPreview(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPackageTrackingDetails(packageNumber: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPackageTrackingDetails(packageNumber, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllFulfillmentOrders(queryStartDate?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllFulfillmentOrders(queryStartDate, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSku The seller SKU for which return reason codes are required. + * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into. + * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes. + * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listReturnReasonCodes(sellerSku: string, language: string, marketplaceId?: string, sellerFulfillmentOrderId?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {UpdateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateFulfillmentOrder(sellerFulfillmentOrderId: string, body: UpdateFulfillmentOrderRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateFulfillmentOrder(sellerFulfillmentOrderId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FbaOutboundApi - factory interface + * @export + */ +export const FbaOutboundApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FbaOutboundApiFp(configuration) + return { + /** + * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any): AxiosPromise { + return localVarFp.cancelFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(axios, basePath)); + }, + /** + * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFulfillmentOrder(body: CreateFulfillmentOrderRequest, options?: any): AxiosPromise { + return localVarFp.createFulfillmentOrder(body, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\'s request to return items. + * @param {CreateFulfillmentReturnRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFulfillmentReturn(sellerFulfillmentOrderId: string, body: CreateFulfillmentReturnRequest, options?: any): AxiosPromise { + return localVarFp.createFulfillmentReturn(sellerFulfillmentOrderId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature. + * @param {string} featureName The name of the feature for which to return a list of eligible inventory. + * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeatureInventory(marketplaceId: string, featureName: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getFeatureInventory(marketplaceId, featureName, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the count. + * @param {string} featureName The name of the feature. + * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeatureSKU(marketplaceId: string, featureName: string, sellerSku: string, options?: any): AxiosPromise { + return localVarFp.getFeatureSKU(marketplaceId, featureName, sellerSku, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the list of features. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFeatures(marketplaceId: string, options?: any): AxiosPromise { + return localVarFp.getFeatures(marketplaceId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any): AxiosPromise { + return localVarFp.getFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetFulfillmentPreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFulfillmentPreview(body: GetFulfillmentPreviewRequest, options?: any): AxiosPromise { + return localVarFp.getFulfillmentPreview(body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPackageTrackingDetails(packageNumber: number, options?: any): AxiosPromise { + return localVarFp.getPackageTrackingDetails(packageNumber, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllFulfillmentOrders(queryStartDate?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.listAllFulfillmentOrders(queryStartDate, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSku The seller SKU for which return reason codes are required. + * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into. + * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes. + * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReturnReasonCodes(sellerSku: string, language: string, marketplaceId?: string, sellerFulfillmentOrderId?: string, options?: any): AxiosPromise { + return localVarFp.listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options).then((request) => request(axios, basePath)); + }, + /** + * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {UpdateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateFulfillmentOrder(sellerFulfillmentOrderId: string, body: UpdateFulfillmentOrderRequest, options?: any): AxiosPromise { + return localVarFp.updateFulfillmentOrder(sellerFulfillmentOrderId, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FbaOutboundApi - object-oriented interface + * @export + * @class FbaOutboundApi + * @extends {BaseAPI} + */ +export class FbaOutboundApi extends BaseAPI { + /** + * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public cancelFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any) { + return FbaOutboundApiFp(this.configuration).cancelFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public createFulfillmentOrder(body: CreateFulfillmentOrderRequest, options?: any) { + return FbaOutboundApiFp(this.configuration).createFulfillmentOrder(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\'s request to return items. + * @param {CreateFulfillmentReturnRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public createFulfillmentReturn(sellerFulfillmentOrderId: string, body: CreateFulfillmentReturnRequest, options?: any) { + return FbaOutboundApiFp(this.configuration).createFulfillmentReturn(sellerFulfillmentOrderId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature. + * @param {string} featureName The name of the feature for which to return a list of eligible inventory. + * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public getFeatureInventory(marketplaceId: string, featureName: string, nextToken?: string, options?: any) { + return FbaOutboundApiFp(this.configuration).getFeatureInventory(marketplaceId, featureName, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the count. + * @param {string} featureName The name of the feature. + * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public getFeatureSKU(marketplaceId: string, featureName: string, sellerSku: string, options?: any) { + return FbaOutboundApiFp(this.configuration).getFeatureSKU(marketplaceId, featureName, sellerSku, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId The marketplace for which to return the list of features. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public getFeatures(marketplaceId: string, options?: any) { + return FbaOutboundApiFp(this.configuration).getFeatures(marketplaceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public getFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any) { + return FbaOutboundApiFp(this.configuration).getFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetFulfillmentPreviewRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public getFulfillmentPreview(body: GetFulfillmentPreviewRequest, options?: any) { + return FbaOutboundApiFp(this.configuration).getFulfillmentPreview(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public getPackageTrackingDetails(packageNumber: number, options?: any) { + return FbaOutboundApiFp(this.configuration).getPackageTrackingDetails(packageNumber, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order. + * @param {string} [nextToken] A string token returned in the response to your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public listAllFulfillmentOrders(queryStartDate?: string, nextToken?: string, options?: any) { + return FbaOutboundApiFp(this.configuration).listAllFulfillmentOrders(queryStartDate, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSku The seller SKU for which return reason codes are required. + * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into. + * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes. + * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public listReturnReasonCodes(sellerSku: string, language: string, marketplaceId?: string, sellerFulfillmentOrderId?: string, options?: any) { + return FbaOutboundApiFp(this.configuration).listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created. + * @param {UpdateFulfillmentOrderRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FbaOutboundApi + */ + public updateFulfillmentOrder(sellerFulfillmentOrderId: string, body: UpdateFulfillmentOrderRequest, options?: any) { + return FbaOutboundApiFp(this.configuration).updateFulfillmentOrder(sellerFulfillmentOrderId, body, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/fulfillment-outbound-api-model/base.ts b/src/api-models/fulfillment-outbound-api-model/base.ts new file mode 100644 index 00000000..4ccd1cde --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner APIs for Fulfillment Outbound + * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon\'s fulfillment network. You can get information on both potential and existing fulfillment orders. + * + * The version of the OpenAPI document: 2020-07-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/fulfillment-outbound-api-model/common.ts b/src/api-models/fulfillment-outbound-api-model/common.ts new file mode 100644 index 00000000..734886e3 --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner APIs for Fulfillment Outbound + * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon\'s fulfillment network. You can get information on both potential and existing fulfillment orders. + * + * The version of the OpenAPI document: 2020-07-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/fulfillment-outbound-api-model/configuration.ts b/src/api-models/fulfillment-outbound-api-model/configuration.ts new file mode 100644 index 00000000..f7cccfe3 --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner APIs for Fulfillment Outbound + * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon\'s fulfillment network. You can get information on both potential and existing fulfillment orders. + * + * The version of the OpenAPI document: 2020-07-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/fulfillment-outbound-api-model/git_push.sh b/src/api-models/fulfillment-outbound-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/fulfillment-outbound-api-model/index.ts b/src/api-models/fulfillment-outbound-api-model/index.ts new file mode 100644 index 00000000..ddae4d50 --- /dev/null +++ b/src/api-models/fulfillment-outbound-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner APIs for Fulfillment Outbound + * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon\'s fulfillment network. You can get information on both potential and existing fulfillment orders. + * + * The version of the OpenAPI document: 2020-07-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/merchant-fulfillment-api-model/.gitignore b/src/api-models/merchant-fulfillment-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/merchant-fulfillment-api-model/.npmignore b/src/api-models/merchant-fulfillment-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/merchant-fulfillment-api-model/.openapi-generator-ignore b/src/api-models/merchant-fulfillment-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/merchant-fulfillment-api-model/.openapi-generator/FILES b/src/api-models/merchant-fulfillment-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/merchant-fulfillment-api-model/.openapi-generator/VERSION b/src/api-models/merchant-fulfillment-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/merchant-fulfillment-api-model/api.ts b/src/api-models/merchant-fulfillment-api-model/api.ts new file mode 100644 index 00000000..d8e63fbf --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/api.ts @@ -0,0 +1,1983 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Merchant Fulfillment + * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Maps the additional seller input to the definition. The key to the map is the field name. + * @export + * @interface AdditionalInputs + */ +export interface AdditionalInputs { + /** + * The field name. + * @type {string} + * @memberof AdditionalInputs + */ + AdditionalInputFieldName?: string; + /** + * + * @type {SellerInputDefinition} + * @memberof AdditionalInputs + */ + SellerInputDefinition?: SellerInputDefinition; +} +/** + * Additional information required to purchase shipping. + * @export + * @interface AdditionalSellerInput + */ +export interface AdditionalSellerInput { + /** + * The data type of the additional information. + * @type {string} + * @memberof AdditionalSellerInput + */ + DataType?: string; + /** + * The value when the data type is string. + * @type {string} + * @memberof AdditionalSellerInput + */ + ValueAsString?: string; + /** + * The value when the data type is boolean. + * @type {boolean} + * @memberof AdditionalSellerInput + */ + ValueAsBoolean?: boolean; + /** + * The value when the data type is integer. + * @type {number} + * @memberof AdditionalSellerInput + */ + ValueAsInteger?: number; + /** + * + * @type {string} + * @memberof AdditionalSellerInput + */ + ValueAsTimestamp?: string; + /** + * + * @type {Address} + * @memberof AdditionalSellerInput + */ + ValueAsAddress?: Address; + /** + * + * @type {Weight} + * @memberof AdditionalSellerInput + */ + ValueAsWeight?: Weight; + /** + * + * @type {Length} + * @memberof AdditionalSellerInput + */ + ValueAsDimension?: Length; + /** + * + * @type {CurrencyAmount} + * @memberof AdditionalSellerInput + */ + ValueAsCurrency?: CurrencyAmount; +} +/** + * An additional set of seller inputs required to purchase shipping. + * @export + * @interface AdditionalSellerInputs + */ +export interface AdditionalSellerInputs { + /** + * The name of the additional input field. + * @type {string} + * @memberof AdditionalSellerInputs + */ + AdditionalInputFieldName: string; + /** + * + * @type {AdditionalSellerInput} + * @memberof AdditionalSellerInputs + */ + AdditionalSellerInput: AdditionalSellerInput; +} +/** + * The postal address information. + * @export + * @interface Address + */ +export interface Address { + /** + * The name of the addressee, or business name. + * @type {string} + * @memberof Address + */ + Name: string; + /** + * The street address information. + * @type {string} + * @memberof Address + */ + AddressLine1: string; + /** + * Additional street address information. + * @type {string} + * @memberof Address + */ + AddressLine2?: string; + /** + * Additional street address information. + * @type {string} + * @memberof Address + */ + AddressLine3?: string; + /** + * The district or county. + * @type {string} + * @memberof Address + */ + DistrictOrCounty?: string; + /** + * The email address. + * @type {string} + * @memberof Address + */ + Email: string; + /** + * The city. + * @type {string} + * @memberof Address + */ + City: string; + /** + * The state or province code. + * @type {string} + * @memberof Address + */ + StateOrProvinceCode?: string; + /** + * The zip code or postal code. + * @type {string} + * @memberof Address + */ + PostalCode: string; + /** + * The country code. A two-character country code, in ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Address + */ + CountryCode: string; + /** + * The phone number. + * @type {string} + * @memberof Address + */ + Phone: string; +} +/** + * Indicates whether the carrier will pick up the package, and what fee is charged, if any. + * @export + * @interface AvailableCarrierWillPickUpOption + */ +export interface AvailableCarrierWillPickUpOption { + /** + * + * @type {CarrierWillPickUpOption} + * @memberof AvailableCarrierWillPickUpOption + */ + CarrierWillPickUpOption: CarrierWillPickUpOption; + /** + * + * @type {CurrencyAmount} + * @memberof AvailableCarrierWillPickUpOption + */ + Charge: CurrencyAmount; +} +/** + * The available delivery confirmation options, and the fee charged, if any. + * @export + * @interface AvailableDeliveryExperienceOption + */ +export interface AvailableDeliveryExperienceOption { + /** + * + * @type {DeliveryExperienceOption} + * @memberof AvailableDeliveryExperienceOption + */ + DeliveryExperienceOption: DeliveryExperienceOption; + /** + * + * @type {CurrencyAmount} + * @memberof AvailableDeliveryExperienceOption + */ + Charge: CurrencyAmount; +} +/** + * The available shipping service options. + * @export + * @interface AvailableShippingServiceOptions + */ +export interface AvailableShippingServiceOptions { + /** + * List of available carrier pickup options. + * @type {Array} + * @memberof AvailableShippingServiceOptions + */ + AvailableCarrierWillPickUpOptions: Array; + /** + * List of available delivery experience options. + * @type {Array} + * @memberof AvailableShippingServiceOptions + */ + AvailableDeliveryExperienceOptions: Array; +} +/** + * Response schema. + * @export + * @interface CancelShipmentResponse + */ +export interface CancelShipmentResponse { + /** + * + * @type {Shipment} + * @memberof CancelShipmentResponse + */ + payload?: Shipment; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelShipmentResponse + */ + errors?: Array; +} +/** + * Carrier will pick up option. + * @export + * @enum {string} + */ +export enum CarrierWillPickUpOption { + CarrierWillPickUp = 'CarrierWillPickUp', + ShipperWillDropOff = 'ShipperWillDropOff', + NoPreference = 'NoPreference' +} + +/** + * A validation constraint. + * @export + * @interface Constraint + */ +export interface Constraint { + /** + * A regular expression. + * @type {string} + * @memberof Constraint + */ + ValidationRegEx?: string; + /** + * A validation string. + * @type {string} + * @memberof Constraint + */ + ValidationString: string; +} +/** + * Request schema. + * @export + * @interface CreateShipmentRequest + */ +export interface CreateShipmentRequest { + /** + * + * @type {ShipmentRequestDetails} + * @memberof CreateShipmentRequest + */ + ShipmentRequestDetails: ShipmentRequestDetails; + /** + * An Amazon-defined shipping service identifier. + * @type {string} + * @memberof CreateShipmentRequest + */ + ShippingServiceId: string; + /** + * Identifies a shipping service order made by a carrier. + * @type {string} + * @memberof CreateShipmentRequest + */ + ShippingServiceOfferId?: string; + /** + * + * @type {HazmatType} + * @memberof CreateShipmentRequest + */ + HazmatType?: HazmatType; + /** + * + * @type {LabelFormatOptionRequest} + * @memberof CreateShipmentRequest + */ + LabelFormatOption?: LabelFormatOptionRequest; + /** + * A list of additional seller input pairs required to purchase shipping. + * @type {Array} + * @memberof CreateShipmentRequest + */ + ShipmentLevelSellerInputsList?: Array; +} +/** + * Response schema. + * @export + * @interface CreateShipmentResponse + */ +export interface CreateShipmentResponse { + /** + * + * @type {Shipment} + * @memberof CreateShipmentResponse + */ + payload?: Shipment; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateShipmentResponse + */ + errors?: Array; +} +/** + * Currency type and amount. + * @export + * @interface CurrencyAmount + */ +export interface CurrencyAmount { + /** + * Three-digit currency code in ISO 4217 format. + * @type {string} + * @memberof CurrencyAmount + */ + CurrencyCode: string; + /** + * The currency amount. + * @type {number} + * @memberof CurrencyAmount + */ + Amount: number; +} +/** + * The delivery confirmation level. + * @export + * @enum {string} + */ +export enum DeliveryExperienceOption { + DeliveryConfirmationWithAdultSignature = 'DeliveryConfirmationWithAdultSignature', + DeliveryConfirmationWithSignature = 'DeliveryConfirmationWithSignature', + DeliveryConfirmationWithoutSignature = 'DeliveryConfirmationWithoutSignature', + NoTracking = 'NoTracking', + NoPreference = 'NoPreference' +} + +/** + * The delivery confirmation level. + * @export + * @enum {string} + */ +export enum DeliveryExperienceType { + DeliveryConfirmationWithAdultSignature = 'DeliveryConfirmationWithAdultSignature', + DeliveryConfirmationWithSignature = 'DeliveryConfirmationWithSignature', + DeliveryConfirmationWithoutSignature = 'DeliveryConfirmationWithoutSignature', + NoTracking = 'NoTracking' +} + +/** + * The document data and checksum. + * @export + * @interface FileContents + */ +export interface FileContents { + /** + * Data for printing labels, in the form of a Base64-encoded, GZip-compressed string. + * @type {string} + * @memberof FileContents + */ + Contents: string; + /** + * + * @type {FileType} + * @memberof FileContents + */ + FileType: FileType; + /** + * An MD5 hash to validate the PDF document data, in the form of a Base64-encoded string. + * @type {string} + * @memberof FileContents + */ + Checksum: string; +} +/** + * The file type for a label. + * @export + * @enum {string} + */ +export enum FileType { + ApplicationPdf = 'application/pdf', + ApplicationZpl = 'application/zpl', + ImagePng = 'image/png' +} + +/** + * Request schema. + * @export + * @interface GetAdditionalSellerInputsRequest + */ +export interface GetAdditionalSellerInputsRequest { + /** + * An Amazon-defined shipping service identifier. + * @type {string} + * @memberof GetAdditionalSellerInputsRequest + */ + ShippingServiceId: string; + /** + * + * @type {Address} + * @memberof GetAdditionalSellerInputsRequest + */ + ShipFromAddress: Address; + /** + * An Amazon-defined order identifier, in 3-7-7 format.
**Pattern** : `[0-9A-Z]{3}-[0-9]{7}-[0-9]{7}`. + * @type {string} + * @memberof GetAdditionalSellerInputsRequest + */ + OrderId: string; +} +/** + * Response schema. + * @export + * @interface GetAdditionalSellerInputsResponse + */ +export interface GetAdditionalSellerInputsResponse { + /** + * + * @type {GetAdditionalSellerInputsResult} + * @memberof GetAdditionalSellerInputsResponse + */ + payload?: GetAdditionalSellerInputsResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetAdditionalSellerInputsResponse + */ + errors?: Array; +} +/** + * The payload for the getAdditionalSellerInputs operation. + * @export + * @interface GetAdditionalSellerInputsResult + */ +export interface GetAdditionalSellerInputsResult { + /** + * A list of additional inputs. + * @type {Array} + * @memberof GetAdditionalSellerInputsResult + */ + ShipmentLevelFields?: Array; + /** + * A list of item level fields. + * @type {Array} + * @memberof GetAdditionalSellerInputsResult + */ + ItemLevelFieldsList?: Array; +} +/** + * Request schema. + * @export + * @interface GetEligibleShipmentServicesRequest + */ +export interface GetEligibleShipmentServicesRequest { + /** + * + * @type {ShipmentRequestDetails} + * @memberof GetEligibleShipmentServicesRequest + */ + ShipmentRequestDetails: ShipmentRequestDetails; + /** + * + * @type {ShippingOfferingFilter} + * @memberof GetEligibleShipmentServicesRequest + */ + ShippingOfferingFilter?: ShippingOfferingFilter; +} +/** + * Response schema. + * @export + * @interface GetEligibleShipmentServicesResponse + */ +export interface GetEligibleShipmentServicesResponse { + /** + * + * @type {GetEligibleShipmentServicesResult} + * @memberof GetEligibleShipmentServicesResponse + */ + payload?: GetEligibleShipmentServicesResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetEligibleShipmentServicesResponse + */ + errors?: Array; +} +/** + * The payload for the getEligibleShipmentServices operation. + * @export + * @interface GetEligibleShipmentServicesResult + */ +export interface GetEligibleShipmentServicesResult { + /** + * A list of shipping services offers. + * @type {Array} + * @memberof GetEligibleShipmentServicesResult + */ + ShippingServiceList: Array; + /** + * List of services that were for some reason unavailable for this request + * @type {Array} + * @memberof GetEligibleShipmentServicesResult + */ + RejectedShippingServiceList?: Array; + /** + * A list of temporarily unavailable carriers. + * @type {Array} + * @memberof GetEligibleShipmentServicesResult + */ + TemporarilyUnavailableCarrierList?: Array; + /** + * List of carriers whose terms and conditions were not accepted by the seller. + * @type {Array} + * @memberof GetEligibleShipmentServicesResult + */ + TermsAndConditionsNotAcceptedCarrierList?: Array; +} +/** + * Response schema. + * @export + * @interface GetShipmentResponse + */ +export interface GetShipmentResponse { + /** + * + * @type {Shipment} + * @memberof GetShipmentResponse + */ + payload?: Shipment; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetShipmentResponse + */ + errors?: Array; +} +/** + * Hazardous materials options for a package. Consult the terms and conditions for each carrier for more information on hazardous materials. + * @export + * @enum {string} + */ +export enum HazmatType { + None = 'None', + LqHazmat = 'LQHazmat' +} + +/** + * Indicates whether the additional seller input is at the item or shipment level. + * @export + * @enum {string} + */ +export enum InputTargetType { + ShipmentLevel = 'SHIPMENT_LEVEL', + ItemLevel = 'ITEM_LEVEL' +} + +/** + * An Amazon order item identifier and a quantity. + * @export + * @interface Item + */ +export interface Item { + /** + * An Amazon-defined identifier for an individual item in an order. + * @type {string} + * @memberof Item + */ + OrderItemId: string; + /** + * The number of items. + * @type {number} + * @memberof Item + */ + Quantity: number; + /** + * + * @type {Weight} + * @memberof Item + */ + ItemWeight?: Weight; + /** + * The description of the item. + * @type {string} + * @memberof Item + */ + ItemDescription?: string; + /** + * A list of transparency codes. + * @type {Array} + * @memberof Item + */ + TransparencyCodeList?: Array; + /** + * A list of additional seller input pairs required to purchase shipping. + * @type {Array} + * @memberof Item + */ + ItemLevelSellerInputsList?: Array; +} +/** + * + * @export + * @interface ItemLevelFields + */ +export interface ItemLevelFields { + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ItemLevelFields + */ + Asin: string; + /** + * A list of additional inputs. + * @type {Array} + * @memberof ItemLevelFields + */ + AdditionalInputs: Array; +} +/** + * Data for creating a shipping label and dimensions for printing the label. + * @export + * @interface Label + */ +export interface Label { + /** + * Custom text to print on the label. Note: Custom text is only included on labels that are in ZPL format (ZPL203). FedEx does not support CustomTextForLabel. + * @type {string} + * @memberof Label + */ + CustomTextForLabel?: string; + /** + * + * @type {LabelDimensions} + * @memberof Label + */ + Dimensions: LabelDimensions; + /** + * + * @type {FileContents} + * @memberof Label + */ + FileContents: FileContents; + /** + * + * @type {LabelFormat} + * @memberof Label + */ + LabelFormat?: LabelFormat; + /** + * + * @type {StandardIdForLabel} + * @memberof Label + */ + StandardIdForLabel?: StandardIdForLabel; +} +/** + * Custom text for shipping labels. + * @export + * @interface LabelCustomization + */ +export interface LabelCustomization { + /** + * Custom text to print on the label. Note: Custom text is only included on labels that are in ZPL format (ZPL203). FedEx does not support CustomTextForLabel. + * @type {string} + * @memberof LabelCustomization + */ + CustomTextForLabel?: string; + /** + * + * @type {StandardIdForLabel} + * @memberof LabelCustomization + */ + StandardIdForLabel?: StandardIdForLabel; +} +/** + * Dimensions for printing a shipping label. + * @export + * @interface LabelDimensions + */ +export interface LabelDimensions { + /** + * A label dimension. + * @type {number} + * @memberof LabelDimensions + */ + Length: number; + /** + * A label dimension. + * @type {number} + * @memberof LabelDimensions + */ + Width: number; + /** + * + * @type {UnitOfLength} + * @memberof LabelDimensions + */ + Unit: UnitOfLength; +} +/** + * The label format. + * @export + * @enum {string} + */ +export enum LabelFormat { + Pdf = 'PDF', + Png = 'PNG', + Zpl203 = 'ZPL203', + Zpl300 = 'ZPL300', + ShippingServiceDefault = 'ShippingServiceDefault' +} + +/** + * The label format details and whether to include a packing slip. + * @export + * @interface LabelFormatOption + */ +export interface LabelFormatOption { + /** + * When true, include a packing slip with the label. + * @type {boolean} + * @memberof LabelFormatOption + */ + IncludePackingSlipWithLabel?: boolean; + /** + * + * @type {LabelFormat} + * @memberof LabelFormatOption + */ + LabelFormat?: LabelFormat; +} +/** + * Whether to include a packing slip. + * @export + * @interface LabelFormatOptionRequest + */ +export interface LabelFormatOptionRequest { + /** + * When true, include a packing slip with the label. + * @type {boolean} + * @memberof LabelFormatOptionRequest + */ + IncludePackingSlipWithLabel?: boolean; +} +/** + * The length. + * @export + * @interface Length + */ +export interface Length { + /** + * The value in units. + * @type {number} + * @memberof Length + */ + value?: number; + /** + * + * @type {UnitOfLength} + * @memberof Length + */ + unit?: UnitOfLength; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occured. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The dimensions of a package contained in a shipment. + * @export + * @interface PackageDimensions + */ +export interface PackageDimensions { + /** + * + * @type {number} + * @memberof PackageDimensions + */ + Length?: number; + /** + * + * @type {number} + * @memberof PackageDimensions + */ + Width?: number; + /** + * + * @type {number} + * @memberof PackageDimensions + */ + Height?: number; + /** + * + * @type {UnitOfLength} + * @memberof PackageDimensions + */ + Unit?: UnitOfLength; + /** + * + * @type {PredefinedPackageDimensions} + * @memberof PackageDimensions + */ + PredefinedPackageDimensions?: PredefinedPackageDimensions; +} +/** + * An enumeration of predefined parcel tokens. If you specify a PredefinedPackageDimensions token, you are not obligated to use a branded package from a carrier. For example, if you specify the FedEx_Box_10kg token, you do not have to use that particular package from FedEx. You are only obligated to use a box that matches the dimensions specified by the token. Note: Please note that carriers can have restrictions on the type of package allowed for certain ship methods. Check the carrier website for all details. Example: Flat rate pricing is available when materials are sent by USPS in a USPS-produced Flat Rate Envelope or Box. + * @export + * @enum {string} + */ +export enum PredefinedPackageDimensions { + FedExBox10kg = 'FedEx_Box_10kg', + FedExBox25kg = 'FedEx_Box_25kg', + FedExBoxExtraLarge1 = 'FedEx_Box_Extra_Large_1', + FedExBoxExtraLarge2 = 'FedEx_Box_Extra_Large_2', + FedExBoxLarge1 = 'FedEx_Box_Large_1', + FedExBoxLarge2 = 'FedEx_Box_Large_2', + FedExBoxMedium1 = 'FedEx_Box_Medium_1', + FedExBoxMedium2 = 'FedEx_Box_Medium_2', + FedExBoxSmall1 = 'FedEx_Box_Small_1', + FedExBoxSmall2 = 'FedEx_Box_Small_2', + FedExEnvelope = 'FedEx_Envelope', + FedExPaddedPak = 'FedEx_Padded_Pak', + FedExPak1 = 'FedEx_Pak_1', + FedExPak2 = 'FedEx_Pak_2', + FedExTube = 'FedEx_Tube', + FedExXlPak = 'FedEx_XL_Pak', + UpsBox10kg = 'UPS_Box_10kg', + UpsBox25kg = 'UPS_Box_25kg', + UpsExpressBox = 'UPS_Express_Box', + UpsExpressBoxLarge = 'UPS_Express_Box_Large', + UpsExpressBoxMedium = 'UPS_Express_Box_Medium', + UpsExpressBoxSmall = 'UPS_Express_Box_Small', + UpsExpressEnvelope = 'UPS_Express_Envelope', + UpsExpressHardPak = 'UPS_Express_Hard_Pak', + UpsExpressLegalEnvelope = 'UPS_Express_Legal_Envelope', + UpsExpressPak = 'UPS_Express_Pak', + UpsExpressTube = 'UPS_Express_Tube', + UpsLaboratoryPak = 'UPS_Laboratory_Pak', + UpsPadPak = 'UPS_Pad_Pak', + UpsPallet = 'UPS_Pallet', + UspsCard = 'USPS_Card', + UspsFlat = 'USPS_Flat', + UspsFlatRateCardboardEnvelope = 'USPS_FlatRateCardboardEnvelope', + UspsFlatRateEnvelope = 'USPS_FlatRateEnvelope', + UspsFlatRateGiftCardEnvelope = 'USPS_FlatRateGiftCardEnvelope', + UspsFlatRateLegalEnvelope = 'USPS_FlatRateLegalEnvelope', + UspsFlatRatePaddedEnvelope = 'USPS_FlatRatePaddedEnvelope', + UspsFlatRateWindowEnvelope = 'USPS_FlatRateWindowEnvelope', + UspsLargeFlatRateBoardGameBox = 'USPS_LargeFlatRateBoardGameBox', + UspsLargeFlatRateBox = 'USPS_LargeFlatRateBox', + UspsLetter = 'USPS_Letter', + UspsMediumFlatRateBox1 = 'USPS_MediumFlatRateBox1', + UspsMediumFlatRateBox2 = 'USPS_MediumFlatRateBox2', + UspsRegionalRateBoxA1 = 'USPS_RegionalRateBoxA1', + UspsRegionalRateBoxA2 = 'USPS_RegionalRateBoxA2', + UspsRegionalRateBoxB1 = 'USPS_RegionalRateBoxB1', + UspsRegionalRateBoxB2 = 'USPS_RegionalRateBoxB2', + UspsRegionalRateBoxC = 'USPS_RegionalRateBoxC', + UspsSmallFlatRateBox = 'USPS_SmallFlatRateBox', + UspsSmallFlatRateEnvelope = 'USPS_SmallFlatRateEnvelope' +} + +/** + * Information about a rejected shipping service + * @export + * @interface RejectedShippingService + */ +export interface RejectedShippingService { + /** + * The rejected shipping carrier name. e.g. USPS + * @type {string} + * @memberof RejectedShippingService + */ + CarrierName: string; + /** + * The rejected shipping service localized name. e.g. FedEx Standard Overnight + * @type {string} + * @memberof RejectedShippingService + */ + ShippingServiceName: string; + /** + * An Amazon-defined shipping service identifier. + * @type {string} + * @memberof RejectedShippingService + */ + ShippingServiceId: string; + /** + * A reason code meant to be consumed programatically. e.g. CARRIER_CANNOT_SHIP_TO_POBOX + * @type {string} + * @memberof RejectedShippingService + */ + RejectionReasonCode: string; + /** + * A localized human readable description of the rejected reason. + * @type {string} + * @memberof RejectedShippingService + */ + RejectionReasonMessage?: string; +} +/** + * Specifies characteristics that apply to a seller input. + * @export + * @interface SellerInputDefinition + */ +export interface SellerInputDefinition { + /** + * When true, the additional input field is required. + * @type {boolean} + * @memberof SellerInputDefinition + */ + IsRequired: boolean; + /** + * The data type of the additional input field. + * @type {string} + * @memberof SellerInputDefinition + */ + DataType: string; + /** + * List of constraints. + * @type {Array} + * @memberof SellerInputDefinition + */ + Constraints: Array; + /** + * The display text for the additional input field. + * @type {string} + * @memberof SellerInputDefinition + */ + InputDisplayText: string; + /** + * + * @type {InputTargetType} + * @memberof SellerInputDefinition + */ + InputTarget?: InputTargetType; + /** + * + * @type {AdditionalSellerInput} + * @memberof SellerInputDefinition + */ + StoredValue: AdditionalSellerInput; + /** + * The set of fixed values in an additional seller input. + * @type {Array} + * @memberof SellerInputDefinition + */ + RestrictedSetValues?: Array; +} +/** + * The details of a shipment, including the shipment status. + * @export + * @interface Shipment + */ +export interface Shipment { + /** + * An Amazon-defined shipment identifier. + * @type {string} + * @memberof Shipment + */ + ShipmentId: string; + /** + * An Amazon-defined order identifier, in 3-7-7 format.
**Pattern** : `[0-9A-Z]{3}-[0-9]{7}-[0-9]{7}`. + * @type {string} + * @memberof Shipment + */ + AmazonOrderId: string; + /** + * A seller-defined order identifier. + * @type {string} + * @memberof Shipment + */ + SellerOrderId?: string; + /** + * The list of items to be included in a shipment. + * @type {Array} + * @memberof Shipment + */ + ItemList: Array; + /** + * + * @type {Address} + * @memberof Shipment + */ + ShipFromAddress: Address; + /** + * + * @type {Address} + * @memberof Shipment + */ + ShipToAddress: Address; + /** + * + * @type {PackageDimensions} + * @memberof Shipment + */ + PackageDimensions: PackageDimensions; + /** + * + * @type {Weight} + * @memberof Shipment + */ + Weight: Weight; + /** + * + * @type {CurrencyAmount} + * @memberof Shipment + */ + Insurance: CurrencyAmount; + /** + * + * @type {ShippingService} + * @memberof Shipment + */ + ShippingService: ShippingService; + /** + * + * @type {Label} + * @memberof Shipment + */ + Label: Label; + /** + * + * @type {ShipmentStatus} + * @memberof Shipment + */ + Status: ShipmentStatus; + /** + * The shipment tracking identifier provided by the carrier. + * @type {string} + * @memberof Shipment + */ + TrackingId?: string; + /** + * + * @type {string} + * @memberof Shipment + */ + CreatedDate: string; + /** + * + * @type {string} + * @memberof Shipment + */ + LastUpdatedDate?: string; +} +/** + * Shipment information required for requesting shipping service offers or for creating a shipment. + * @export + * @interface ShipmentRequestDetails + */ +export interface ShipmentRequestDetails { + /** + * An Amazon-defined order identifier, in 3-7-7 format.
**Pattern** : `[0-9A-Z]{3}-[0-9]{7}-[0-9]{7}`. + * @type {string} + * @memberof ShipmentRequestDetails + */ + AmazonOrderId: string; + /** + * A seller-defined order identifier. + * @type {string} + * @memberof ShipmentRequestDetails + */ + SellerOrderId?: string; + /** + * The list of items to be included in a shipment. + * @type {Array} + * @memberof ShipmentRequestDetails + */ + ItemList: Array; + /** + * + * @type {Address} + * @memberof ShipmentRequestDetails + */ + ShipFromAddress: Address; + /** + * + * @type {PackageDimensions} + * @memberof ShipmentRequestDetails + */ + PackageDimensions: PackageDimensions; + /** + * + * @type {Weight} + * @memberof ShipmentRequestDetails + */ + Weight: Weight; + /** + * + * @type {string} + * @memberof ShipmentRequestDetails + */ + MustArriveByDate?: string; + /** + * + * @type {string} + * @memberof ShipmentRequestDetails + */ + ShipDate?: string; + /** + * + * @type {ShippingServiceOptions} + * @memberof ShipmentRequestDetails + */ + ShippingServiceOptions: ShippingServiceOptions; + /** + * + * @type {LabelCustomization} + * @memberof ShipmentRequestDetails + */ + LabelCustomization?: LabelCustomization; +} +/** + * The shipment status. + * @export + * @enum {string} + */ +export enum ShipmentStatus { + Purchased = 'Purchased', + RefundPending = 'RefundPending', + RefundRejected = 'RefundRejected', + RefundApplied = 'RefundApplied' +} + +/** + * Filter for use when requesting eligible shipping services. + * @export + * @interface ShippingOfferingFilter + */ +export interface ShippingOfferingFilter { + /** + * When true, include a packing slip with the label. + * @type {boolean} + * @memberof ShippingOfferingFilter + */ + IncludePackingSlipWithLabel?: boolean; + /** + * When true, include complex shipping options. + * @type {boolean} + * @memberof ShippingOfferingFilter + */ + IncludeComplexShippingOptions?: boolean; + /** + * + * @type {CarrierWillPickUpOption} + * @memberof ShippingOfferingFilter + */ + CarrierWillPickUp?: CarrierWillPickUpOption; + /** + * + * @type {DeliveryExperienceOption} + * @memberof ShippingOfferingFilter + */ + DeliveryExperience?: DeliveryExperienceOption; +} +/** + * A shipping service offer made by a carrier. + * @export + * @interface ShippingService + */ +export interface ShippingService { + /** + * A plain text representation of a carrier\'s shipping service. For example, \"UPS Ground\" or \"FedEx Standard Overnight\". + * @type {string} + * @memberof ShippingService + */ + ShippingServiceName: string; + /** + * The name of the carrier. + * @type {string} + * @memberof ShippingService + */ + CarrierName: string; + /** + * An Amazon-defined shipping service identifier. + * @type {string} + * @memberof ShippingService + */ + ShippingServiceId: string; + /** + * An Amazon-defined shipping service offer identifier. + * @type {string} + * @memberof ShippingService + */ + ShippingServiceOfferId: string; + /** + * + * @type {string} + * @memberof ShippingService + */ + ShipDate: string; + /** + * + * @type {string} + * @memberof ShippingService + */ + EarliestEstimatedDeliveryDate?: string; + /** + * + * @type {string} + * @memberof ShippingService + */ + LatestEstimatedDeliveryDate?: string; + /** + * + * @type {CurrencyAmount} + * @memberof ShippingService + */ + Rate: CurrencyAmount; + /** + * + * @type {ShippingServiceOptions} + * @memberof ShippingService + */ + ShippingServiceOptions: ShippingServiceOptions; + /** + * + * @type {AvailableShippingServiceOptions} + * @memberof ShippingService + */ + AvailableShippingServiceOptions?: AvailableShippingServiceOptions; + /** + * List of label formats. + * @type {Array} + * @memberof ShippingService + */ + AvailableLabelFormats?: Array; + /** + * The available label formats. + * @type {Array} + * @memberof ShippingService + */ + AvailableFormatOptionsForLabel?: Array; + /** + * When true, additional seller inputs are required. + * @type {boolean} + * @memberof ShippingService + */ + RequiresAdditionalSellerInputs: boolean; +} +/** + * Extra services provided by a carrier. + * @export + * @interface ShippingServiceOptions + */ +export interface ShippingServiceOptions { + /** + * + * @type {DeliveryExperienceType} + * @memberof ShippingServiceOptions + */ + DeliveryExperience: DeliveryExperienceType; + /** + * + * @type {CurrencyAmount} + * @memberof ShippingServiceOptions + */ + DeclaredValue?: CurrencyAmount; + /** + * When true, the carrier will pick up the package. Note: Scheduled carrier pickup is available only using Dynamex (US), DPD (UK), and Royal Mail (UK). + * @type {boolean} + * @memberof ShippingServiceOptions + */ + CarrierWillPickUp: boolean; + /** + * + * @type {CarrierWillPickUpOption} + * @memberof ShippingServiceOptions + */ + CarrierWillPickUpOption?: CarrierWillPickUpOption; + /** + * + * @type {LabelFormat} + * @memberof ShippingServiceOptions + */ + LabelFormat?: LabelFormat; +} +/** + * The type of standard identifier to print on the label. + * @export + * @enum {string} + */ +export enum StandardIdForLabel { + AmazonOrderId = 'AmazonOrderId' +} + +/** + * A carrier who is temporarily unavailable, most likely due to a service outage experienced by the carrier. + * @export + * @interface TemporarilyUnavailableCarrier + */ +export interface TemporarilyUnavailableCarrier { + /** + * The name of the carrier. + * @type {string} + * @memberof TemporarilyUnavailableCarrier + */ + CarrierName: string; +} +/** + * A carrier whose terms and conditions have not been accepted by the seller. + * @export + * @interface TermsAndConditionsNotAcceptedCarrier + */ +export interface TermsAndConditionsNotAcceptedCarrier { + /** + * The name of the carrier. + * @type {string} + * @memberof TermsAndConditionsNotAcceptedCarrier + */ + CarrierName: string; +} +/** + * The unit of length. + * @export + * @enum {string} + */ +export enum UnitOfLength { + Inches = 'inches', + Centimeters = 'centimeters' +} + +/** + * The unit of weight. + * @export + * @enum {string} + */ +export enum UnitOfWeight { + Oz = 'oz', + G = 'g' +} + +/** + * The weight. + * @export + * @interface Weight + */ +export interface Weight { + /** + * The weight value. + * @type {number} + * @memberof Weight + */ + Value: number; + /** + * + * @type {UnitOfWeight} + * @memberof Weight + */ + Unit: UnitOfWeight; +} + +/** + * MerchantFulfillmentApi - axios parameter creator + * @export + */ +export const MerchantFulfillmentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelShipment: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('cancelShipment', 'shipmentId', shipmentId) + const localVarPath = `/mfn/v0/shipments/{shipmentId}` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelShipmentOld: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('cancelShipmentOld', 'shipmentId', shipmentId) + const localVarPath = `/mfn/v0/shipments/{shipmentId}/cancel` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createShipment: async (body: CreateShipmentRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createShipment', 'body', body) + const localVarPath = `/mfn/v0/shipments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAdditionalSellerInputs: async (body: GetAdditionalSellerInputsRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getAdditionalSellerInputs', 'body', body) + const localVarPath = `/mfn/v0/additionalSellerInputs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAdditionalSellerInputsOld: async (body: GetAdditionalSellerInputsRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getAdditionalSellerInputsOld', 'body', body) + const localVarPath = `/mfn/v0/sellerInputs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEligibleShipmentServices: async (body: GetEligibleShipmentServicesRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getEligibleShipmentServices', 'body', body) + const localVarPath = `/mfn/v0/eligibleShippingServices`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEligibleShipmentServicesOld: async (body: GetEligibleShipmentServicesRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getEligibleShipmentServicesOld', 'body', body) + const localVarPath = `/mfn/v0/eligibleServices`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipment: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getShipment', 'shipmentId', shipmentId) + const localVarPath = `/mfn/v0/shipments/{shipmentId}` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MerchantFulfillmentApi - functional programming interface + * @export + */ +export const MerchantFulfillmentApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MerchantFulfillmentApiAxiosParamCreator(configuration) + return { + /** + * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelShipment(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelShipment(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelShipmentOld(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelShipmentOld(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createShipment(body: CreateShipmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createShipment(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAdditionalSellerInputs(body: GetAdditionalSellerInputsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAdditionalSellerInputs(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAdditionalSellerInputsOld(body: GetAdditionalSellerInputsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAdditionalSellerInputsOld(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getEligibleShipmentServices(body: GetEligibleShipmentServicesRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getEligibleShipmentServices(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getEligibleShipmentServicesOld(body: GetEligibleShipmentServicesRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getEligibleShipmentServicesOld(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getShipment(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MerchantFulfillmentApi - factory interface + * @export + */ +export const MerchantFulfillmentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MerchantFulfillmentApiFp(configuration) + return { + /** + * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelShipment(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.cancelShipment(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelShipmentOld(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.cancelShipmentOld(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createShipment(body: CreateShipmentRequest, options?: any): AxiosPromise { + return localVarFp.createShipment(body, options).then((request) => request(axios, basePath)); + }, + /** + * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAdditionalSellerInputs(body: GetAdditionalSellerInputsRequest, options?: any): AxiosPromise { + return localVarFp.getAdditionalSellerInputs(body, options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAdditionalSellerInputsOld(body: GetAdditionalSellerInputsRequest, options?: any): AxiosPromise { + return localVarFp.getAdditionalSellerInputsOld(body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEligibleShipmentServices(body: GetEligibleShipmentServicesRequest, options?: any): AxiosPromise { + return localVarFp.getEligibleShipmentServices(body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEligibleShipmentServicesOld(body: GetEligibleShipmentServicesRequest, options?: any): AxiosPromise { + return localVarFp.getEligibleShipmentServicesOld(body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipment(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.getShipment(shipmentId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MerchantFulfillmentApi - object-oriented interface + * @export + * @class MerchantFulfillmentApi + * @extends {BaseAPI} + */ +export class MerchantFulfillmentApi extends BaseAPI { + /** + * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public cancelShipment(shipmentId: string, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).cancelShipment(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public cancelShipmentOld(shipmentId: string, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).cancelShipmentOld(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public createShipment(body: CreateShipmentRequest, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).createShipment(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public getAdditionalSellerInputs(body: GetAdditionalSellerInputsRequest, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).getAdditionalSellerInputs(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetAdditionalSellerInputsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public getAdditionalSellerInputsOld(body: GetAdditionalSellerInputsRequest, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).getAdditionalSellerInputsOld(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public getEligibleShipmentServices(body: GetEligibleShipmentServicesRequest, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).getEligibleShipmentServices(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetEligibleShipmentServicesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public getEligibleShipmentServicesOld(body: GetEligibleShipmentServicesRequest, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).getEligibleShipmentServicesOld(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MerchantFulfillmentApi + */ + public getShipment(shipmentId: string, options?: any) { + return MerchantFulfillmentApiFp(this.configuration).getShipment(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/merchant-fulfillment-api-model/base.ts b/src/api-models/merchant-fulfillment-api-model/base.ts new file mode 100644 index 00000000..14e70251 --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Merchant Fulfillment + * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/merchant-fulfillment-api-model/common.ts b/src/api-models/merchant-fulfillment-api-model/common.ts new file mode 100644 index 00000000..37a4c8e0 --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Merchant Fulfillment + * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/merchant-fulfillment-api-model/configuration.ts b/src/api-models/merchant-fulfillment-api-model/configuration.ts new file mode 100644 index 00000000..6cef0db3 --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Merchant Fulfillment + * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/merchant-fulfillment-api-model/git_push.sh b/src/api-models/merchant-fulfillment-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/merchant-fulfillment-api-model/index.ts b/src/api-models/merchant-fulfillment-api-model/index.ts new file mode 100644 index 00000000..e46327e8 --- /dev/null +++ b/src/api-models/merchant-fulfillment-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Merchant Fulfillment + * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/messaging-api-model/.gitignore b/src/api-models/messaging-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/messaging-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/messaging-api-model/.npmignore b/src/api-models/messaging-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/messaging-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/messaging-api-model/.openapi-generator-ignore b/src/api-models/messaging-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/messaging-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/messaging-api-model/.openapi-generator/FILES b/src/api-models/messaging-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/messaging-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/messaging-api-model/.openapi-generator/VERSION b/src/api-models/messaging-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/messaging-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/messaging-api-model/api.ts b/src/api-models/messaging-api-model/api.ts new file mode 100644 index 00000000..81bbe31a --- /dev/null +++ b/src/api-models/messaging-api-model/api.ts @@ -0,0 +1,1556 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Messaging + * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Represents a file uploaded to a destination that was created by the createUploadDestination operation of the Uploads API. + * @export + * @interface Attachment + */ +export interface Attachment { + /** + * The identifier of the upload destination. Get this value by calling the createUploadDestination operation of the Uploads API. + * @type {string} + * @memberof Attachment + */ + uploadDestinationId: string; + /** + * The name of the file, including the extension. This is the file name that will appear in the message. This does not need to match the file name of the file that you uploaded. + * @type {string} + * @memberof Attachment + */ + fileName: string; +} +/** + * The request schema for the createAmazonMotors operation. + * @export + * @interface CreateAmazonMotorsRequest + */ +export interface CreateAmazonMotorsRequest { + /** + * Attachments to include in the message to the buyer. If any text is included in the attachment, the text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {Array} + * @memberof CreateAmazonMotorsRequest + */ + attachments?: Array; +} +/** + * The response schema for the createAmazonMotors operation. + * @export + * @interface CreateAmazonMotorsResponse + */ +export interface CreateAmazonMotorsResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateAmazonMotorsResponse + */ + errors?: Array; +} +/** + * The request schema for the confirmCustomizationDetails operation. + * @export + * @interface CreateConfirmCustomizationDetailsRequest + */ +export interface CreateConfirmCustomizationDetailsRequest { + /** + * The text to be sent to the buyer. Only links related to customization details are allowed. Do not include HTML or email addresses. The text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {string} + * @memberof CreateConfirmCustomizationDetailsRequest + */ + text?: string; + /** + * Attachments to include in the message to the buyer. + * @type {Array} + * @memberof CreateConfirmCustomizationDetailsRequest + */ + attachments?: Array; +} +/** + * The response schema for the confirmCustomizationDetails operation. + * @export + * @interface CreateConfirmCustomizationDetailsResponse + */ +export interface CreateConfirmCustomizationDetailsResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateConfirmCustomizationDetailsResponse + */ + errors?: Array; +} +/** + * The request schema for the createConfirmDeliveryDetails operation. + * @export + * @interface CreateConfirmDeliveryDetailsRequest + */ +export interface CreateConfirmDeliveryDetailsRequest { + /** + * The text to be sent to the buyer. Only links related to order delivery are allowed. Do not include HTML or email addresses. The text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {string} + * @memberof CreateConfirmDeliveryDetailsRequest + */ + text?: string; +} +/** + * The response schema for the createConfirmDeliveryDetails operation. + * @export + * @interface CreateConfirmDeliveryDetailsResponse + */ +export interface CreateConfirmDeliveryDetailsResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateConfirmDeliveryDetailsResponse + */ + errors?: Array; +} +/** + * The request schema for the createConfirmOrderDetails operation. + * @export + * @interface CreateConfirmOrderDetailsRequest + */ +export interface CreateConfirmOrderDetailsRequest { + /** + * The text to be sent to the buyer. Only links related to order completion are allowed. Do not include HTML or email addresses. The text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {string} + * @memberof CreateConfirmOrderDetailsRequest + */ + text?: string; +} +/** + * The response schema for the createConfirmOrderDetails operation. + * @export + * @interface CreateConfirmOrderDetailsResponse + */ +export interface CreateConfirmOrderDetailsResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateConfirmOrderDetailsResponse + */ + errors?: Array; +} +/** + * The request schema for the createConfirmServiceDetails operation. + * @export + * @interface CreateConfirmServiceDetailsRequest + */ +export interface CreateConfirmServiceDetailsRequest { + /** + * The text to be sent to the buyer. Only links related to Home Service calls are allowed. Do not include HTML or email addresses. The text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {string} + * @memberof CreateConfirmServiceDetailsRequest + */ + text?: string; +} +/** + * The response schema for the createConfirmServiceDetails operation. + * @export + * @interface CreateConfirmServiceDetailsResponse + */ +export interface CreateConfirmServiceDetailsResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateConfirmServiceDetailsResponse + */ + errors?: Array; +} +/** + * The request schema for the createDigitalAccessKey operation. + * @export + * @interface CreateDigitalAccessKeyRequest + */ +export interface CreateDigitalAccessKeyRequest { + /** + * The text to be sent to the buyer. Only links related to the digital access key are allowed. Do not include HTML or email addresses. The text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {string} + * @memberof CreateDigitalAccessKeyRequest + */ + text?: string; + /** + * Attachments to include in the message to the buyer. + * @type {Array} + * @memberof CreateDigitalAccessKeyRequest + */ + attachments?: Array; +} +/** + * The response schema for the createDigitalAccessKey operation. + * @export + * @interface CreateDigitalAccessKeyResponse + */ +export interface CreateDigitalAccessKeyResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateDigitalAccessKeyResponse + */ + errors?: Array; +} +/** + * The request schema for the createLegalDisclosure operation. + * @export + * @interface CreateLegalDisclosureRequest + */ +export interface CreateLegalDisclosureRequest { + /** + * Attachments to include in the message to the buyer. If any text is included in the attachment, the text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {Array} + * @memberof CreateLegalDisclosureRequest + */ + attachments?: Array; +} +/** + * The response schema for the createLegalDisclosure operation. + * @export + * @interface CreateLegalDisclosureResponse + */ +export interface CreateLegalDisclosureResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateLegalDisclosureResponse + */ + errors?: Array; +} +/** + * The response schema for the createNegativeFeedbackRemoval operation. + * @export + * @interface CreateNegativeFeedbackRemovalResponse + */ +export interface CreateNegativeFeedbackRemovalResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateNegativeFeedbackRemovalResponse + */ + errors?: Array; +} +/** + * The request schema for the createUnexpectedProblem operation. + * @export + * @interface CreateUnexpectedProblemRequest + */ +export interface CreateUnexpectedProblemRequest { + /** + * The text to be sent to the buyer. Only links related to unexpected problem calls are allowed. Do not include HTML or email addresses. The text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {string} + * @memberof CreateUnexpectedProblemRequest + */ + text?: string; +} +/** + * The response schema for the createUnexpectedProblem operation. + * @export + * @interface CreateUnexpectedProblemResponse + */ +export interface CreateUnexpectedProblemResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateUnexpectedProblemResponse + */ + errors?: Array; +} +/** + * The request schema for the createWarranty operation. + * @export + * @interface CreateWarrantyRequest + */ +export interface CreateWarrantyRequest { + /** + * Attachments to include in the message to the buyer. If any text is included in the attachment, the text must be written in the buyer\'s language of preference, which can be retrieved from the GetAttributes operation. + * @type {Array} + * @memberof CreateWarrantyRequest + */ + attachments?: Array; + /** + * The start date of the warranty coverage to include in the message to the buyer. + * @type {string} + * @memberof CreateWarrantyRequest + */ + coverageStartDate?: string; + /** + * The end date of the warranty coverage to include in the message to the buyer. + * @type {string} + * @memberof CreateWarrantyRequest + */ + coverageEndDate?: string; +} +/** + * The response schema for the createWarranty operation. + * @export + * @interface CreateWarrantyResponse + */ +export interface CreateWarrantyResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateWarrantyResponse + */ + errors?: Array; +} +/** + * The response schema for the GetAttributes operation. + * @export + * @interface GetAttributesResponse + */ +export interface GetAttributesResponse { + /** + * + * @type {GetAttributesResponseBuyer} + * @memberof GetAttributesResponse + */ + buyer?: GetAttributesResponseBuyer; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetAttributesResponse + */ + errors?: Array; +} +/** + * The list of attributes related to the buyer. + * @export + * @interface GetAttributesResponseBuyer + */ +export interface GetAttributesResponseBuyer { + /** + * The buyer\'s language of preference, indicated with a locale-specific language tag. Examples: \"en-US\", \"zh-CN\", and \"en-GB\". + * @type {string} + * @memberof GetAttributesResponseBuyer + */ + locale?: string; +} +/** + * Describes a messaging action that can be taken for an order. Provides a JSON Hypertext Application Language (HAL) link to the JSON schema document that describes the expected input. + * @export + * @interface GetMessagingActionResponse + */ +export interface GetMessagingActionResponse { + /** + * + * @type {GetMessagingActionResponseLinks} + * @memberof GetMessagingActionResponse + */ + _links?: GetMessagingActionResponseLinks; + /** + * + * @type {GetMessagingActionResponseEmbedded} + * @memberof GetMessagingActionResponse + */ + _embedded?: GetMessagingActionResponseEmbedded; + /** + * + * @type {MessagingAction} + * @memberof GetMessagingActionResponse + */ + payload?: MessagingAction; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetMessagingActionResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetMessagingActionResponseEmbedded + */ +export interface GetMessagingActionResponseEmbedded { + /** + * + * @type {GetSchemaResponse} + * @memberof GetMessagingActionResponseEmbedded + */ + schema?: GetSchemaResponse; +} +/** + * + * @export + * @interface GetMessagingActionResponseLinks + */ +export interface GetMessagingActionResponseLinks { + /** + * + * @type {LinkObject} + * @memberof GetMessagingActionResponseLinks + */ + self: LinkObject; + /** + * + * @type {LinkObject} + * @memberof GetMessagingActionResponseLinks + */ + schema: LinkObject; +} +/** + * The response schema for the getMessagingActionsForOrder operation. + * @export + * @interface GetMessagingActionsForOrderResponse + */ +export interface GetMessagingActionsForOrderResponse { + /** + * + * @type {GetMessagingActionsForOrderResponseLinks} + * @memberof GetMessagingActionsForOrderResponse + */ + _links?: GetMessagingActionsForOrderResponseLinks; + /** + * + * @type {GetMessagingActionsForOrderResponseEmbedded} + * @memberof GetMessagingActionsForOrderResponse + */ + _embedded?: GetMessagingActionsForOrderResponseEmbedded; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetMessagingActionsForOrderResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetMessagingActionsForOrderResponseEmbedded + */ +export interface GetMessagingActionsForOrderResponseEmbedded { + /** + * + * @type {Array} + * @memberof GetMessagingActionsForOrderResponseEmbedded + */ + actions: Array; +} +/** + * + * @export + * @interface GetMessagingActionsForOrderResponseLinks + */ +export interface GetMessagingActionsForOrderResponseLinks { + /** + * + * @type {LinkObject} + * @memberof GetMessagingActionsForOrderResponseLinks + */ + self: LinkObject; + /** + * Eligible actions for the specified amazonOrderId. + * @type {Array} + * @memberof GetMessagingActionsForOrderResponseLinks + */ + actions: Array; +} +/** + * + * @export + * @interface GetSchemaResponse + */ +export interface GetSchemaResponse { + /** + * + * @type {GetSchemaResponseLinks} + * @memberof GetSchemaResponse + */ + _links?: GetSchemaResponseLinks; + /** + * A JSON schema document describing the expected payload of the action. This object can be validated against http://json-schema.org/draft-04/schema. + * @type {object} + * @memberof GetSchemaResponse + */ + payload?: object; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetSchemaResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetSchemaResponseLinks + */ +export interface GetSchemaResponseLinks { + /** + * + * @type {LinkObject} + * @memberof GetSchemaResponseLinks + */ + self: LinkObject; +} +/** + * A Link object. + * @export + * @interface LinkObject + */ +export interface LinkObject { + /** + * A URI for this object. + * @type {string} + * @memberof LinkObject + */ + href: string; + /** + * An identifier for this object. + * @type {string} + * @memberof LinkObject + */ + name?: string; +} +/** + * A simple object containing the name of the template. + * @export + * @interface MessagingAction + */ +export interface MessagingAction { + /** + * + * @type {string} + * @memberof MessagingAction + */ + name: string; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} + +/** + * MessagingApi - axios parameter creator + * @export + */ +export const MessagingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmCustomizationDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmCustomizationDetails: async (amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmCustomizationDetailsRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('confirmCustomizationDetails', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('confirmCustomizationDetails', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('confirmCustomizationDetails', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/confirmCustomizationDetails` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateAmazonMotorsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAmazonMotors: async (amazonOrderId: string, marketplaceIds: Array, body: CreateAmazonMotorsRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createAmazonMotors', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createAmazonMotors', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createAmazonMotors', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/amazonMotors` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmDeliveryDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createConfirmDeliveryDetails: async (amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmDeliveryDetailsRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createConfirmDeliveryDetails', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createConfirmDeliveryDetails', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createConfirmDeliveryDetails', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/confirmDeliveryDetails` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a message to ask a buyer an order-related question prior to shipping their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmOrderDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createConfirmOrderDetails: async (amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmOrderDetailsRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createConfirmOrderDetails', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createConfirmOrderDetails', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createConfirmOrderDetails', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/confirmOrderDetails` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmServiceDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createConfirmServiceDetails: async (amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmServiceDetailsRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createConfirmServiceDetails', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createConfirmServiceDetails', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createConfirmServiceDetails', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/confirmServiceDetails` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a message to a buyer to share a digital access key needed to utilize digital content in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateDigitalAccessKeyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createDigitalAccessKey: async (amazonOrderId: string, marketplaceIds: Array, body: CreateDigitalAccessKeyRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createDigitalAccessKey', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createDigitalAccessKey', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createDigitalAccessKey', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/digitalAccessKey` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateLegalDisclosureRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createLegalDisclosure: async (amazonOrderId: string, marketplaceIds: Array, body: CreateLegalDisclosureRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createLegalDisclosure', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createLegalDisclosure', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createLegalDisclosure', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer\'s problem. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNegativeFeedbackRemoval: async (amazonOrderId: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createNegativeFeedbackRemoval', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createNegativeFeedbackRemoval', 'marketplaceIds', marketplaceIds) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/negativeFeedbackRemoval` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateUnexpectedProblemRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUnexpectedProblem: async (amazonOrderId: string, marketplaceIds: Array, body: CreateUnexpectedProblemRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createUnexpectedProblem', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createUnexpectedProblem', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createUnexpectedProblem', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/unexpectedProblem` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sends a message to a buyer to provide details about warranty information on a purchase in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateWarrantyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWarranty: async (amazonOrderId: string, marketplaceIds: Array, body: CreateWarrantyRequest, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createWarranty', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createWarranty', 'marketplaceIds', marketplaceIds) + // verify required parameter 'body' is not null or undefined + assertParamExists('createWarranty', 'body', body) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/messages/warranty` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a response containing attributes related to an order. This includes buyer preferences. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAttributes: async (amazonOrderId: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('getAttributes', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getAttributes', 'marketplaceIds', marketplaceIds) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}/attributes` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available message types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMessagingActionsForOrder: async (amazonOrderId: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('getMessagingActionsForOrder', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getMessagingActionsForOrder', 'marketplaceIds', marketplaceIds) + const localVarPath = `/messaging/v1/orders/{amazonOrderId}` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MessagingApi - functional programming interface + * @export + */ +export const MessagingApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MessagingApiAxiosParamCreator(configuration) + return { + /** + * Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmCustomizationDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmCustomizationDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmCustomizationDetailsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmCustomizationDetails(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateAmazonMotorsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createAmazonMotors(amazonOrderId: string, marketplaceIds: Array, body: CreateAmazonMotorsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAmazonMotors(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmDeliveryDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createConfirmDeliveryDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmDeliveryDetailsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createConfirmDeliveryDetails(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a message to ask a buyer an order-related question prior to shipping their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmOrderDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createConfirmOrderDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmOrderDetailsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createConfirmOrderDetails(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmServiceDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createConfirmServiceDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmServiceDetailsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createConfirmServiceDetails(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a message to a buyer to share a digital access key needed to utilize digital content in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateDigitalAccessKeyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createDigitalAccessKey(amazonOrderId: string, marketplaceIds: Array, body: CreateDigitalAccessKeyRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createDigitalAccessKey(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateLegalDisclosureRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createLegalDisclosure(amazonOrderId: string, marketplaceIds: Array, body: CreateLegalDisclosureRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createLegalDisclosure(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer\'s problem. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createNegativeFeedbackRemoval(amazonOrderId: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createNegativeFeedbackRemoval(amazonOrderId, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateUnexpectedProblemRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUnexpectedProblem(amazonOrderId: string, marketplaceIds: Array, body: CreateUnexpectedProblemRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUnexpectedProblem(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Sends a message to a buyer to provide details about warranty information on a purchase in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateWarrantyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWarranty(amazonOrderId: string, marketplaceIds: Array, body: CreateWarrantyRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWarranty(amazonOrderId, marketplaceIds, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a response containing attributes related to an order. This includes buyer preferences. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAttributes(amazonOrderId: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAttributes(amazonOrderId, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available message types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMessagingActionsForOrder(amazonOrderId: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMessagingActionsForOrder(amazonOrderId, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MessagingApi - factory interface + * @export + */ +export const MessagingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MessagingApiFp(configuration) + return { + /** + * Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmCustomizationDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmCustomizationDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmCustomizationDetailsRequest, options?: any): AxiosPromise { + return localVarFp.confirmCustomizationDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateAmazonMotorsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAmazonMotors(amazonOrderId: string, marketplaceIds: Array, body: CreateAmazonMotorsRequest, options?: any): AxiosPromise { + return localVarFp.createAmazonMotors(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmDeliveryDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createConfirmDeliveryDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmDeliveryDetailsRequest, options?: any): AxiosPromise { + return localVarFp.createConfirmDeliveryDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a message to ask a buyer an order-related question prior to shipping their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmOrderDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createConfirmOrderDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmOrderDetailsRequest, options?: any): AxiosPromise { + return localVarFp.createConfirmOrderDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmServiceDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createConfirmServiceDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmServiceDetailsRequest, options?: any): AxiosPromise { + return localVarFp.createConfirmServiceDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a message to a buyer to share a digital access key needed to utilize digital content in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateDigitalAccessKeyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createDigitalAccessKey(amazonOrderId: string, marketplaceIds: Array, body: CreateDigitalAccessKeyRequest, options?: any): AxiosPromise { + return localVarFp.createDigitalAccessKey(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateLegalDisclosureRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createLegalDisclosure(amazonOrderId: string, marketplaceIds: Array, body: CreateLegalDisclosureRequest, options?: any): AxiosPromise { + return localVarFp.createLegalDisclosure(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer\'s problem. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNegativeFeedbackRemoval(amazonOrderId: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.createNegativeFeedbackRemoval(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateUnexpectedProblemRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUnexpectedProblem(amazonOrderId: string, marketplaceIds: Array, body: CreateUnexpectedProblemRequest, options?: any): AxiosPromise { + return localVarFp.createUnexpectedProblem(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Sends a message to a buyer to provide details about warranty information on a purchase in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateWarrantyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWarranty(amazonOrderId: string, marketplaceIds: Array, body: CreateWarrantyRequest, options?: any): AxiosPromise { + return localVarFp.createWarranty(amazonOrderId, marketplaceIds, body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a response containing attributes related to an order. This includes buyer preferences. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAttributes(amazonOrderId: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.getAttributes(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available message types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMessagingActionsForOrder(amazonOrderId: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.getMessagingActionsForOrder(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MessagingApi - object-oriented interface + * @export + * @class MessagingApi + * @extends {BaseAPI} + */ +export class MessagingApi extends BaseAPI { + /** + * Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmCustomizationDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public confirmCustomizationDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmCustomizationDetailsRequest, options?: any) { + return MessagingApiFp(this.configuration).confirmCustomizationDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateAmazonMotorsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createAmazonMotors(amazonOrderId: string, marketplaceIds: Array, body: CreateAmazonMotorsRequest, options?: any) { + return MessagingApiFp(this.configuration).createAmazonMotors(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmDeliveryDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createConfirmDeliveryDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmDeliveryDetailsRequest, options?: any) { + return MessagingApiFp(this.configuration).createConfirmDeliveryDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a message to ask a buyer an order-related question prior to shipping their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmOrderDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createConfirmOrderDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmOrderDetailsRequest, options?: any) { + return MessagingApiFp(this.configuration).createConfirmOrderDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateConfirmServiceDetailsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createConfirmServiceDetails(amazonOrderId: string, marketplaceIds: Array, body: CreateConfirmServiceDetailsRequest, options?: any) { + return MessagingApiFp(this.configuration).createConfirmServiceDetails(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a message to a buyer to share a digital access key needed to utilize digital content in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateDigitalAccessKeyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createDigitalAccessKey(amazonOrderId: string, marketplaceIds: Array, body: CreateDigitalAccessKeyRequest, options?: any) { + return MessagingApiFp(this.configuration).createDigitalAccessKey(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateLegalDisclosureRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createLegalDisclosure(amazonOrderId: string, marketplaceIds: Array, body: CreateLegalDisclosureRequest, options?: any) { + return MessagingApiFp(this.configuration).createLegalDisclosure(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer\'s problem. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createNegativeFeedbackRemoval(amazonOrderId: string, marketplaceIds: Array, options?: any) { + return MessagingApiFp(this.configuration).createNegativeFeedbackRemoval(amazonOrderId, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateUnexpectedProblemRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createUnexpectedProblem(amazonOrderId: string, marketplaceIds: Array, body: CreateUnexpectedProblemRequest, options?: any) { + return MessagingApiFp(this.configuration).createUnexpectedProblem(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sends a message to a buyer to provide details about warranty information on a purchase in their order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {CreateWarrantyRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public createWarranty(amazonOrderId: string, marketplaceIds: Array, body: CreateWarrantyRequest, options?: any) { + return MessagingApiFp(this.configuration).createWarranty(amazonOrderId, marketplaceIds, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a response containing attributes related to an order. This includes buyer preferences. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a message is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public getAttributes(amazonOrderId: string, marketplaceIds: Array, options?: any) { + return MessagingApiFp(this.configuration).getAttributes(amazonOrderId, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available message types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MessagingApi + */ + public getMessagingActionsForOrder(amazonOrderId: string, marketplaceIds: Array, options?: any) { + return MessagingApiFp(this.configuration).getMessagingActionsForOrder(amazonOrderId, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/messaging-api-model/base.ts b/src/api-models/messaging-api-model/base.ts new file mode 100644 index 00000000..98398463 --- /dev/null +++ b/src/api-models/messaging-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Messaging + * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/messaging-api-model/common.ts b/src/api-models/messaging-api-model/common.ts new file mode 100644 index 00000000..ba85019b --- /dev/null +++ b/src/api-models/messaging-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Messaging + * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/messaging-api-model/configuration.ts b/src/api-models/messaging-api-model/configuration.ts new file mode 100644 index 00000000..827ca21f --- /dev/null +++ b/src/api-models/messaging-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Messaging + * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/messaging-api-model/git_push.sh b/src/api-models/messaging-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/messaging-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/messaging-api-model/index.ts b/src/api-models/messaging-api-model/index.ts new file mode 100644 index 00000000..74ecebb3 --- /dev/null +++ b/src/api-models/messaging-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Messaging + * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/notifications-api-model/.gitignore b/src/api-models/notifications-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/notifications-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/notifications-api-model/.npmignore b/src/api-models/notifications-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/notifications-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/notifications-api-model/.openapi-generator-ignore b/src/api-models/notifications-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/notifications-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/notifications-api-model/.openapi-generator/FILES b/src/api-models/notifications-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/notifications-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/notifications-api-model/.openapi-generator/VERSION b/src/api-models/notifications-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/notifications-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/notifications-api-model/api.ts b/src/api-models/notifications-api-model/api.ts new file mode 100644 index 00000000..e7ae9242 --- /dev/null +++ b/src/api-models/notifications-api-model/api.ts @@ -0,0 +1,932 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Notifications + * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner\'s business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The request schema for the createDestination operation. + * @export + * @interface CreateDestinationRequest + */ +export interface CreateDestinationRequest { + /** + * + * @type {DestinationResourceSpecification} + * @memberof CreateDestinationRequest + */ + resourceSpecification: DestinationResourceSpecification; + /** + * A developer-defined name to help identify this destination. + * @type {string} + * @memberof CreateDestinationRequest + */ + name: string; +} +/** + * The response schema for the createDestination operation. + * @export + * @interface CreateDestinationResponse + */ +export interface CreateDestinationResponse { + /** + * + * @type {Destination} + * @memberof CreateDestinationResponse + */ + payload?: Destination; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateDestinationResponse + */ + errors?: Array; +} +/** + * The request schema for the createSubscription operation. + * @export + * @interface CreateSubscriptionRequest + */ +export interface CreateSubscriptionRequest { + /** + * The version of the payload object to be used in the notification. + * @type {string} + * @memberof CreateSubscriptionRequest + */ + payloadVersion?: string; + /** + * The identifier for the destination where notifications will be delivered. + * @type {string} + * @memberof CreateSubscriptionRequest + */ + destinationId?: string; +} +/** + * The response schema for the createSubscription operation. + * @export + * @interface CreateSubscriptionResponse + */ +export interface CreateSubscriptionResponse { + /** + * + * @type {Subscription} + * @memberof CreateSubscriptionResponse + */ + payload?: Subscription; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateSubscriptionResponse + */ + errors?: Array; +} +/** + * The response schema for the deleteDestination operation. + * @export + * @interface DeleteDestinationResponse + */ +export interface DeleteDestinationResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof DeleteDestinationResponse + */ + errors?: Array; +} +/** + * The response schema for the deleteSubscriptionById operation. + * @export + * @interface DeleteSubscriptionByIdResponse + */ +export interface DeleteSubscriptionByIdResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof DeleteSubscriptionByIdResponse + */ + errors?: Array; +} +/** + * Represents a destination created when you call the createDestination operation. + * @export + * @interface Destination + */ +export interface Destination { + /** + * The developer-defined name for this destination. + * @type {string} + * @memberof Destination + */ + name: string; + /** + * The destination identifier generated when you created the destination. + * @type {string} + * @memberof Destination + */ + destinationId: string; + /** + * + * @type {DestinationResource} + * @memberof Destination + */ + resource: DestinationResource; +} +/** + * The destination resource types. + * @export + * @interface DestinationResource + */ +export interface DestinationResource { + /** + * + * @type {SqsResource} + * @memberof DestinationResource + */ + sqs?: SqsResource; + /** + * + * @type {EventBridgeResource} + * @memberof DestinationResource + */ + eventBridge?: EventBridgeResource; +} +/** + * The information required to create a destination resource. Applications should use one resource type (sqs or eventBridge) per destination. + * @export + * @interface DestinationResourceSpecification + */ +export interface DestinationResourceSpecification { + /** + * + * @type {SqsResource} + * @memberof DestinationResourceSpecification + */ + sqs?: SqsResource; + /** + * + * @type {EventBridgeResourceSpecification} + * @memberof DestinationResourceSpecification + */ + eventBridge?: EventBridgeResourceSpecification; +} +/** + * Represents an Amazon EventBridge destination. + * @export + * @interface EventBridgeResource + */ +export interface EventBridgeResource { + /** + * The name of the partner event source associated with the destination. + * @type {string} + * @memberof EventBridgeResource + */ + name: string; + /** + * The AWS region in which you receive the notifications. For AWS regions that are supported in Amazon EventBridge, see https://docs.aws.amazon.com/general/latest/gr/ev.html. + * @type {string} + * @memberof EventBridgeResource + */ + region: string; + /** + * The identifier for the AWS account that is responsible for charges related to receiving notifications. + * @type {string} + * @memberof EventBridgeResource + */ + accountId: string; +} +/** + * The information required to create an Amazon EventBridge destination. + * @export + * @interface EventBridgeResourceSpecification + */ +export interface EventBridgeResourceSpecification { + /** + * The AWS region in which you will be receiving the notifications. + * @type {string} + * @memberof EventBridgeResourceSpecification + */ + region: string; + /** + * The identifier for the AWS account that is responsible for charges related to receiving notifications. + * @type {string} + * @memberof EventBridgeResourceSpecification + */ + accountId: string; +} +/** + * The response schema for the getDestination operation. + * @export + * @interface GetDestinationResponse + */ +export interface GetDestinationResponse { + /** + * + * @type {Destination} + * @memberof GetDestinationResponse + */ + payload?: Destination; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetDestinationResponse + */ + errors?: Array; +} +/** + * The response schema for the getDestinations operation. + * @export + * @interface GetDestinationsResponse + */ +export interface GetDestinationsResponse { + /** + * A list of destinations. + * @type {Array} + * @memberof GetDestinationsResponse + */ + payload?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetDestinationsResponse + */ + errors?: Array; +} +/** + * The response schema for the getSubscriptionById operation. + * @export + * @interface GetSubscriptionByIdResponse + */ +export interface GetSubscriptionByIdResponse { + /** + * + * @type {Subscription} + * @memberof GetSubscriptionByIdResponse + */ + payload?: Subscription; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetSubscriptionByIdResponse + */ + errors?: Array; +} +/** + * The response schema for the getSubscription operation. + * @export + * @interface GetSubscriptionResponse + */ +export interface GetSubscriptionResponse { + /** + * + * @type {Subscription} + * @memberof GetSubscriptionResponse + */ + payload?: Subscription; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetSubscriptionResponse + */ + errors?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The information required to create an Amazon Simple Queue Service (Amazon SQS) queue destination. + * @export + * @interface SqsResource + */ +export interface SqsResource { + /** + * The Amazon Resource Name (ARN) associated with the SQS queue. + * @type {string} + * @memberof SqsResource + */ + arn: string; +} +/** + * Represents a subscription to receive notifications. + * @export + * @interface Subscription + */ +export interface Subscription { + /** + * The subscription identifier generated when the subscription is created. + * @type {string} + * @memberof Subscription + */ + subscriptionId: string; + /** + * The version of the payload object to be used in the notification. + * @type {string} + * @memberof Subscription + */ + payloadVersion: string; + /** + * The identifier for the destination where notifications will be delivered. + * @type {string} + * @memberof Subscription + */ + destinationId: string; +} + +/** + * NotificationsApi - axios parameter creator + * @export + */ +export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateDestinationRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createDestination: async (body: CreateDestinationRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createDestination', 'body', body) + const localVarPath = `/notifications/v1/destinations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {CreateSubscriptionRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSubscription: async (notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', body: CreateSubscriptionRequest, options: any = {}): Promise => { + // verify required parameter 'notificationType' is not null or undefined + assertParamExists('createSubscription', 'notificationType', notificationType) + // verify required parameter 'body' is not null or undefined + assertParamExists('createSubscription', 'body', body) + const localVarPath = `/notifications/v1/subscriptions/{notificationType}` + .replace(`{${"notificationType"}}`, encodeURIComponent(String(notificationType))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier for the destination that you want to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteDestination: async (destinationId: string, options: any = {}): Promise => { + // verify required parameter 'destinationId' is not null or undefined + assertParamExists('deleteDestination', 'destinationId', destinationId) + const localVarPath = `/notifications/v1/destinations/{destinationId}` + .replace(`{${"destinationId"}}`, encodeURIComponent(String(destinationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to delete. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSubscriptionById: async (subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options: any = {}): Promise => { + // verify required parameter 'subscriptionId' is not null or undefined + assertParamExists('deleteSubscriptionById', 'subscriptionId', subscriptionId) + // verify required parameter 'notificationType' is not null or undefined + assertParamExists('deleteSubscriptionById', 'notificationType', notificationType) + const localVarPath = `/notifications/v1/subscriptions/{notificationType}/{subscriptionId}` + .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId))) + .replace(`{${"notificationType"}}`, encodeURIComponent(String(notificationType))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier generated when you created the destination. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDestination: async (destinationId: string, options: any = {}): Promise => { + // verify required parameter 'destinationId' is not null or undefined + assertParamExists('getDestination', 'destinationId', destinationId) + const localVarPath = `/notifications/v1/destinations/{destinationId}` + .replace(`{${"destinationId"}}`, encodeURIComponent(String(destinationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about all destinations. The getDestinations API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDestinations: async (options: any = {}): Promise => { + const localVarPath = `/notifications/v1/destinations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSubscription: async (notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options: any = {}): Promise => { + // verify required parameter 'notificationType' is not null or undefined + assertParamExists('getSubscription', 'notificationType', notificationType) + const localVarPath = `/notifications/v1/subscriptions/{notificationType}` + .replace(`{${"notificationType"}}`, encodeURIComponent(String(notificationType))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to get. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSubscriptionById: async (subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options: any = {}): Promise => { + // verify required parameter 'subscriptionId' is not null or undefined + assertParamExists('getSubscriptionById', 'subscriptionId', subscriptionId) + // verify required parameter 'notificationType' is not null or undefined + assertParamExists('getSubscriptionById', 'notificationType', notificationType) + const localVarPath = `/notifications/v1/subscriptions/{notificationType}/{subscriptionId}` + .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId))) + .replace(`{${"notificationType"}}`, encodeURIComponent(String(notificationType))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NotificationsApi - functional programming interface + * @export + */ +export const NotificationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) + return { + /** + * Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateDestinationRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createDestination(body: CreateDestinationRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createDestination(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {CreateSubscriptionRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSubscription(notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', body: CreateSubscriptionRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSubscription(notificationType, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier for the destination that you want to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteDestination(destinationId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDestination(destinationId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to delete. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSubscriptionById(subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSubscriptionById(subscriptionId, notificationType, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier generated when you created the destination. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDestination(destinationId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDestination(destinationId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns information about all destinations. The getDestinations API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDestinations(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDestinations(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSubscription(notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSubscription(notificationType, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to get. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSubscriptionById(subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSubscriptionById(subscriptionId, notificationType, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * NotificationsApi - factory interface + * @export + */ +export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationsApiFp(configuration) + return { + /** + * Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateDestinationRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createDestination(body: CreateDestinationRequest, options?: any): AxiosPromise { + return localVarFp.createDestination(body, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {CreateSubscriptionRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSubscription(notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', body: CreateSubscriptionRequest, options?: any): AxiosPromise { + return localVarFp.createSubscription(notificationType, body, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier for the destination that you want to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteDestination(destinationId: string, options?: any): AxiosPromise { + return localVarFp.deleteDestination(destinationId, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to delete. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSubscriptionById(subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any): AxiosPromise { + return localVarFp.deleteSubscriptionById(subscriptionId, notificationType, options).then((request) => request(axios, basePath)); + }, + /** + * Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier generated when you created the destination. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDestination(destinationId: string, options?: any): AxiosPromise { + return localVarFp.getDestination(destinationId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns information about all destinations. The getDestinations API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDestinations(options?: any): AxiosPromise { + return localVarFp.getDestinations(options).then((request) => request(axios, basePath)); + }, + /** + * Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSubscription(notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any): AxiosPromise { + return localVarFp.getSubscription(notificationType, options).then((request) => request(axios, basePath)); + }, + /** + * Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to get. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSubscriptionById(subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any): AxiosPromise { + return localVarFp.getSubscriptionById(subscriptionId, notificationType, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * NotificationsApi - object-oriented interface + * @export + * @class NotificationsApi + * @extends {BaseAPI} + */ +export class NotificationsApi extends BaseAPI { + /** + * Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateDestinationRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public createDestination(body: CreateDestinationRequest, options?: any) { + return NotificationsApiFp(this.configuration).createDestination(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {CreateSubscriptionRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public createSubscription(notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', body: CreateSubscriptionRequest, options?: any) { + return NotificationsApiFp(this.configuration).createSubscription(notificationType, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier for the destination that you want to delete. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public deleteDestination(destinationId: string, options?: any) { + return NotificationsApiFp(this.configuration).deleteDestination(destinationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to delete. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public deleteSubscriptionById(subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any) { + return NotificationsApiFp(this.configuration).deleteSubscriptionById(subscriptionId, notificationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} destinationId The identifier generated when you created the destination. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public getDestination(destinationId: string, options?: any) { + return NotificationsApiFp(this.configuration).getDestination(destinationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about all destinations. The getDestinations API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public getDestinations(options?: any) { + return NotificationsApiFp(this.configuration).getDestinations(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public getSubscription(notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any) { + return NotificationsApiFp(this.configuration).getSubscription(notificationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} subscriptionId The identifier for the subscription that you want to get. + * @param {'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED'} notificationType The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public getSubscriptionById(subscriptionId: string, notificationType: 'ANY_OFFER_CHANGED' | 'FEED_PROCESSING_FINISHED' | 'FBA_OUTBOUND_SHIPMENT_STATUS' | 'FEE_PROMOTION' | 'FULFILLMENT_ORDER_STATUS' | 'REPORT_PROCESSING_FINISHED' | 'BRANDED_ITEM_CONTENT_CHANGE' | 'ITEM_PRODUCT_TYPE_CHANGE' | 'MFN_ORDER_STATUS_CHANGE' | 'B2B_ANY_OFFER_CHANGED', options?: any) { + return NotificationsApiFp(this.configuration).getSubscriptionById(subscriptionId, notificationType, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/notifications-api-model/base.ts b/src/api-models/notifications-api-model/base.ts new file mode 100644 index 00000000..c6d936ff --- /dev/null +++ b/src/api-models/notifications-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Notifications + * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner\'s business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/notifications-api-model/common.ts b/src/api-models/notifications-api-model/common.ts new file mode 100644 index 00000000..9639912e --- /dev/null +++ b/src/api-models/notifications-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Notifications + * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner\'s business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/notifications-api-model/configuration.ts b/src/api-models/notifications-api-model/configuration.ts new file mode 100644 index 00000000..1dc2759f --- /dev/null +++ b/src/api-models/notifications-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Notifications + * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner\'s business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/notifications-api-model/git_push.sh b/src/api-models/notifications-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/notifications-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/notifications-api-model/index.ts b/src/api-models/notifications-api-model/index.ts new file mode 100644 index 00000000..a04aba6d --- /dev/null +++ b/src/api-models/notifications-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Notifications + * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner\'s business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/orders-api-model/.gitignore b/src/api-models/orders-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/orders-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/orders-api-model/.npmignore b/src/api-models/orders-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/orders-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/orders-api-model/.openapi-generator-ignore b/src/api-models/orders-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/orders-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/orders-api-model/.openapi-generator/FILES b/src/api-models/orders-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/orders-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/orders-api-model/.openapi-generator/VERSION b/src/api-models/orders-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/orders-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/orders-api-model/api.ts b/src/api-models/orders-api-model/api.ts new file mode 100644 index 00000000..df274214 --- /dev/null +++ b/src/api-models/orders-api-model/api.ts @@ -0,0 +1,1622 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Orders + * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The shipping address for the order. + * @export + * @interface Address + */ +export interface Address { + /** + * The name. + * @type {string} + * @memberof Address + */ + Name: string; + /** + * The street address. + * @type {string} + * @memberof Address + */ + AddressLine1?: string; + /** + * Additional street address information, if required. + * @type {string} + * @memberof Address + */ + AddressLine2?: string; + /** + * Additional street address information, if required. + * @type {string} + * @memberof Address + */ + AddressLine3?: string; + /** + * The city + * @type {string} + * @memberof Address + */ + City?: string; + /** + * The county. + * @type {string} + * @memberof Address + */ + County?: string; + /** + * The district. + * @type {string} + * @memberof Address + */ + District?: string; + /** + * The state or region. + * @type {string} + * @memberof Address + */ + StateOrRegion?: string; + /** + * The municipality. + * @type {string} + * @memberof Address + */ + Municipality?: string; + /** + * The postal code. + * @type {string} + * @memberof Address + */ + PostalCode?: string; + /** + * The country code. A two-character country code, in ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Address + */ + CountryCode?: string; + /** + * The phone number. Not returned for Fulfillment by Amazon (FBA) orders. + * @type {string} + * @memberof Address + */ + Phone?: string; + /** + * The address type of the shipping address. + * @type {string} + * @memberof Address + */ + AddressType?: AddressAddressTypeEnum; +} + +/** + * @export + * @enum {string} + */ +export enum AddressAddressTypeEnum { + Residential = 'Residential', + Commercial = 'Commercial' +} + +/** + * Buyer information for custom orders from the Amazon Custom program. + * @export + * @interface BuyerCustomizedInfoDetail + */ +export interface BuyerCustomizedInfoDetail { + /** + * The location of a zip file containing Amazon Custom data. + * @type {string} + * @memberof BuyerCustomizedInfoDetail + */ + CustomizedURL?: string; +} +/** + * Tax information about the buyer. + * @export + * @interface BuyerTaxInfo + */ +export interface BuyerTaxInfo { + /** + * The legal name of the company. + * @type {string} + * @memberof BuyerTaxInfo + */ + CompanyLegalName?: string; + /** + * The country or region imposing the tax. + * @type {string} + * @memberof BuyerTaxInfo + */ + TaxingRegion?: string; + /** + * A list of tax classifications that apply to the order. + * @type {Array} + * @memberof BuyerTaxInfo + */ + TaxClassifications?: Array; +} +/** + * Contains the instructions about the fulfillment like where should it be fulfilled from. + * @export + * @interface FulfillmentInstruction + */ +export interface FulfillmentInstruction { + /** + * Denotes the recommended sourceId where the order should be fulfilled from. + * @type {string} + * @memberof FulfillmentInstruction + */ + FulfillmentSupplySourceId?: string; +} +/** + * The response schema for the getOrderAddress operation. + * @export + * @interface GetOrderAddressResponse + */ +export interface GetOrderAddressResponse { + /** + * + * @type {OrderAddress} + * @memberof GetOrderAddressResponse + */ + payload?: OrderAddress; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrderAddressResponse + */ + errors?: Array; +} +/** + * The response schema for the getOrderBuyerInfo operation. + * @export + * @interface GetOrderBuyerInfoResponse + */ +export interface GetOrderBuyerInfoResponse { + /** + * + * @type {OrderBuyerInfo} + * @memberof GetOrderBuyerInfoResponse + */ + payload?: OrderBuyerInfo; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrderBuyerInfoResponse + */ + errors?: Array; +} +/** + * The response schema for the getOrderItemsBuyerInfo operation. + * @export + * @interface GetOrderItemsBuyerInfoResponse + */ +export interface GetOrderItemsBuyerInfoResponse { + /** + * + * @type {OrderItemsBuyerInfoList} + * @memberof GetOrderItemsBuyerInfoResponse + */ + payload?: OrderItemsBuyerInfoList; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrderItemsBuyerInfoResponse + */ + errors?: Array; +} +/** + * The response schema for the getOrderItems operation. + * @export + * @interface GetOrderItemsResponse + */ +export interface GetOrderItemsResponse { + /** + * + * @type {OrderItemsList} + * @memberof GetOrderItemsResponse + */ + payload?: OrderItemsList; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrderItemsResponse + */ + errors?: Array; +} +/** + * The response schema for the getOrder operation. + * @export + * @interface GetOrderResponse + */ +export interface GetOrderResponse { + /** + * + * @type {Order} + * @memberof GetOrderResponse + */ + payload?: Order; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrderResponse + */ + errors?: Array; +} +/** + * The response schema for the getOrders operation. + * @export + * @interface GetOrdersResponse + */ +export interface GetOrdersResponse { + /** + * + * @type {OrdersList} + * @memberof GetOrdersResponse + */ + payload?: OrdersList; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrdersResponse + */ + errors?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The monetary value of the order. + * @export + * @interface Money + */ +export interface Money { + /** + * The three-digit currency code. In ISO 4217 format. + * @type {string} + * @memberof Money + */ + CurrencyCode?: string; + /** + * The currency amount. + * @type {string} + * @memberof Money + */ + Amount?: string; +} +/** + * Order information. + * @export + * @interface Order + */ +export interface Order { + /** + * An Amazon-defined order identifier, in 3-7-7 format. + * @type {string} + * @memberof Order + */ + AmazonOrderId: string; + /** + * A seller-defined order identifier. + * @type {string} + * @memberof Order + */ + SellerOrderId?: string; + /** + * The date when the order was created. + * @type {string} + * @memberof Order + */ + PurchaseDate: string; + /** + * The date when the order was last updated. Note: LastUpdateDate is returned with an incorrect date for orders that were last updated before 2009-04-01. + * @type {string} + * @memberof Order + */ + LastUpdateDate: string; + /** + * The current order status. + * @type {string} + * @memberof Order + */ + OrderStatus: OrderOrderStatusEnum; + /** + * Whether the order was fulfilled by Amazon (AFN) or by the seller (MFN). + * @type {string} + * @memberof Order + */ + FulfillmentChannel?: OrderFulfillmentChannelEnum; + /** + * The sales channel of the first item in the order. + * @type {string} + * @memberof Order + */ + SalesChannel?: string; + /** + * The order channel of the first item in the order. + * @type {string} + * @memberof Order + */ + OrderChannel?: string; + /** + * The shipment service level of the order. + * @type {string} + * @memberof Order + */ + ShipServiceLevel?: string; + /** + * + * @type {Money} + * @memberof Order + */ + OrderTotal?: Money; + /** + * The number of items shipped. + * @type {number} + * @memberof Order + */ + NumberOfItemsShipped?: number; + /** + * The number of items unshipped. + * @type {number} + * @memberof Order + */ + NumberOfItemsUnshipped?: number; + /** + * A list of payment execution detail items. + * @type {Array} + * @memberof Order + */ + PaymentExecutionDetail?: Array; + /** + * The payment method for the order. This property is limited to Cash On Delivery (COD) and Convenience Store (CVS) payment methods. Unless you need the specific COD payment information provided by the PaymentExecutionDetailItem object, we recommend using the PaymentMethodDetails property to get payment method information. + * @type {string} + * @memberof Order + */ + PaymentMethod?: OrderPaymentMethodEnum; + /** + * A list of payment method detail items. + * @type {Array} + * @memberof Order + */ + PaymentMethodDetails?: Array; + /** + * The identifier for the marketplace where the order was placed. + * @type {string} + * @memberof Order + */ + MarketplaceId?: string; + /** + * The shipment service level category of the order. Possible values: Expedited, FreeEconomy, NextDay, SameDay, SecondDay, Scheduled, Standard. + * @type {string} + * @memberof Order + */ + ShipmentServiceLevelCategory?: string; + /** + * The status of the Amazon Easy Ship order. This property is included only for Amazon Easy Ship orders. Possible values: PendingPickUp, LabelCanceled, PickedUp, OutForDelivery, Damaged, Delivered, RejectedByBuyer, Undeliverable, ReturnedToSeller, ReturningToSeller. + * @type {string} + * @memberof Order + */ + EasyShipShipmentStatus?: string; + /** + * Custom ship label for Checkout by Amazon (CBA). + * @type {string} + * @memberof Order + */ + CbaDisplayableShippingLabel?: string; + /** + * The type of the order. + * @type {string} + * @memberof Order + */ + OrderType?: OrderOrderTypeEnum; + /** + * The start of the time period within which you have committed to ship the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders. Note: EarliestShipDate might not be returned for orders placed before February 1, 2013. + * @type {string} + * @memberof Order + */ + EarliestShipDate?: string; + /** + * The end of the time period within which you have committed to ship the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders. Note: LatestShipDate might not be returned for orders placed before February 1, 2013. + * @type {string} + * @memberof Order + */ + LatestShipDate?: string; + /** + * The start of the time period within which you have committed to fulfill the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders. + * @type {string} + * @memberof Order + */ + EarliestDeliveryDate?: string; + /** + * The end of the time period within which you have committed to fulfill the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders that do not have a PendingAvailability, Pending, or Canceled status. + * @type {string} + * @memberof Order + */ + LatestDeliveryDate?: string; + /** + * When true, the order is an Amazon Business order. An Amazon Business order is an order where the buyer is a Verified Business Buyer. + * @type {boolean} + * @memberof Order + */ + IsBusinessOrder?: boolean; + /** + * When true, the order is a seller-fulfilled Amazon Prime order. + * @type {boolean} + * @memberof Order + */ + IsPrime?: boolean; + /** + * When true, the order has a Premium Shipping Service Level Agreement. For more information about Premium Shipping orders, see \"Premium Shipping Options\" in the Seller Central Help for your marketplace. + * @type {boolean} + * @memberof Order + */ + IsPremiumOrder?: boolean; + /** + * When true, the order is a GlobalExpress order. + * @type {boolean} + * @memberof Order + */ + IsGlobalExpressEnabled?: boolean; + /** + * The order ID value for the order that is being replaced. Returned only if IsReplacementOrder = true. + * @type {string} + * @memberof Order + */ + ReplacedOrderId?: string; + /** + * When true, this is a replacement order. + * @type {boolean} + * @memberof Order + */ + IsReplacementOrder?: boolean; + /** + * Indicates the date by which the seller must respond to the buyer with an estimated ship date. Returned only for Sourcing on Demand orders. + * @type {string} + * @memberof Order + */ + PromiseResponseDueDate?: string; + /** + * When true, the estimated ship date is set for the order. Returned only for Sourcing on Demand orders. + * @type {boolean} + * @memberof Order + */ + IsEstimatedShipDateSet?: boolean; + /** + * When true, the item within this order was bought and re-sold by Amazon Business EU SARL (ABEU). By buying and instantly re-selling your items, ABEU becomes the seller of record, making your inventory available for sale to customers who would not otherwise purchase from a third-party seller. + * @type {boolean} + * @memberof Order + */ + IsSoldByAB?: boolean; + /** + * + * @type {Address} + * @memberof Order + */ + AssignedShipFromLocationAddress?: Address; + /** + * + * @type {FulfillmentInstruction} + * @memberof Order + */ + FulfillmentInstruction?: FulfillmentInstruction; +} + +/** + * @export + * @enum {string} + */ +export enum OrderOrderStatusEnum { + Pending = 'Pending', + Unshipped = 'Unshipped', + PartiallyShipped = 'PartiallyShipped', + Shipped = 'Shipped', + Canceled = 'Canceled', + Unfulfillable = 'Unfulfillable', + InvoiceUnconfirmed = 'InvoiceUnconfirmed', + PendingAvailability = 'PendingAvailability' +} +/** + * @export + * @enum {string} + */ +export enum OrderFulfillmentChannelEnum { + Mfn = 'MFN', + Afn = 'AFN' +} +/** + * @export + * @enum {string} + */ +export enum OrderPaymentMethodEnum { + Cod = 'COD', + Cvs = 'CVS', + Other = 'Other' +} +/** + * @export + * @enum {string} + */ +export enum OrderOrderTypeEnum { + StandardOrder = 'StandardOrder', + LongLeadTimeOrder = 'LongLeadTimeOrder', + Preorder = 'Preorder', + BackOrder = 'BackOrder', + SourcingOnDemandOrder = 'SourcingOnDemandOrder' +} + +/** + * The shipping address for the order. + * @export + * @interface OrderAddress + */ +export interface OrderAddress { + /** + * An Amazon-defined order identifier, in 3-7-7 format. + * @type {string} + * @memberof OrderAddress + */ + AmazonOrderId: string; + /** + * + * @type {Address} + * @memberof OrderAddress + */ + ShippingAddress?: Address; +} +/** + * Buyer information for an order. + * @export + * @interface OrderBuyerInfo + */ +export interface OrderBuyerInfo { + /** + * An Amazon-defined order identifier, in 3-7-7 format. + * @type {string} + * @memberof OrderBuyerInfo + */ + AmazonOrderId: string; + /** + * The anonymized email address of the buyer. + * @type {string} + * @memberof OrderBuyerInfo + */ + BuyerEmail?: string; + /** + * The name of the buyer. + * @type {string} + * @memberof OrderBuyerInfo + */ + BuyerName?: string; + /** + * The county of the buyer. + * @type {string} + * @memberof OrderBuyerInfo + */ + BuyerCounty?: string; + /** + * + * @type {BuyerTaxInfo} + * @memberof OrderBuyerInfo + */ + BuyerTaxInfo?: BuyerTaxInfo; + /** + * The purchase order (PO) number entered by the buyer at checkout. Returned only for orders where the buyer entered a PO number at checkout. + * @type {string} + * @memberof OrderBuyerInfo + */ + PurchaseOrderNumber?: string; +} +/** + * A single order item. + * @export + * @interface OrderItem + */ +export interface OrderItem { + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof OrderItem + */ + ASIN: string; + /** + * The seller stock keeping unit (SKU) of the item. + * @type {string} + * @memberof OrderItem + */ + SellerSKU?: string; + /** + * An Amazon-defined order item identifier. + * @type {string} + * @memberof OrderItem + */ + OrderItemId: string; + /** + * The name of the item. + * @type {string} + * @memberof OrderItem + */ + Title?: string; + /** + * The number of items in the order. + * @type {number} + * @memberof OrderItem + */ + QuantityOrdered: number; + /** + * The number of items shipped. + * @type {number} + * @memberof OrderItem + */ + QuantityShipped?: number; + /** + * + * @type {ProductInfoDetail} + * @memberof OrderItem + */ + ProductInfo?: ProductInfoDetail; + /** + * + * @type {PointsGrantedDetail} + * @memberof OrderItem + */ + PointsGranted?: PointsGrantedDetail; + /** + * + * @type {Money} + * @memberof OrderItem + */ + ItemPrice?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + ShippingPrice?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + ItemTax?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + ShippingTax?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + ShippingDiscount?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + ShippingDiscountTax?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + PromotionDiscount?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + PromotionDiscountTax?: Money; + /** + * A list of promotion identifiers provided by the seller when the promotions were created. + * @type {Array} + * @memberof OrderItem + */ + PromotionIds?: Array; + /** + * + * @type {Money} + * @memberof OrderItem + */ + CODFee?: Money; + /** + * + * @type {Money} + * @memberof OrderItem + */ + CODFeeDiscount?: Money; + /** + * When true, the item is a gift. + * @type {boolean} + * @memberof OrderItem + */ + IsGift?: boolean; + /** + * The condition of the item as described by the seller. + * @type {string} + * @memberof OrderItem + */ + ConditionNote?: string; + /** + * The condition of the item. Possible values: New, Used, Collectible, Refurbished, Preorder, Club. + * @type {string} + * @memberof OrderItem + */ + ConditionId?: string; + /** + * The subcondition of the item. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, Any, Other. + * @type {string} + * @memberof OrderItem + */ + ConditionSubtypeId?: string; + /** + * The start date of the scheduled delivery window in the time zone of the order destination. In ISO 8601 date time format. + * @type {string} + * @memberof OrderItem + */ + ScheduledDeliveryStartDate?: string; + /** + * The end date of the scheduled delivery window in the time zone of the order destination. In ISO 8601 date time format. + * @type {string} + * @memberof OrderItem + */ + ScheduledDeliveryEndDate?: string; + /** + * Indicates that the selling price is a special price that is available only for Amazon Business orders. For more information about the Amazon Business Seller Program, see the [Amazon Business website](https://www.amazon.com/b2b/info/amazon-business). Possible values: BusinessPrice - A special price that is available only for Amazon Business orders. + * @type {string} + * @memberof OrderItem + */ + PriceDesignation?: string; + /** + * + * @type {TaxCollection} + * @memberof OrderItem + */ + TaxCollection?: TaxCollection; + /** + * When true, the product type for this item has a serial number. Returned only for Amazon Easy Ship orders. + * @type {boolean} + * @memberof OrderItem + */ + SerialNumberRequired?: boolean; + /** + * When true, transparency codes are required. + * @type {boolean} + * @memberof OrderItem + */ + IsTransparency?: boolean; + /** + * The IOSS number of the seller. Sellers selling in the EU will be assigned a unique IOSS number that must be listed on all packages sent to the EU. + * @type {string} + * @memberof OrderItem + */ + IossNumber?: string; + /** + * The category of deemed reseller. This applies to selling partners that are not based in the EU and is used to help them meet the VAT Deemed Reseller tax laws in the EU and UK. + * @type {string} + * @memberof OrderItem + */ + DeemedResellerCategory?: OrderItemDeemedResellerCategoryEnum; +} + +/** + * @export + * @enum {string} + */ +export enum OrderItemDeemedResellerCategoryEnum { + Ioss = 'IOSS', + Uoss = 'UOSS' +} + +/** + * A single order item\'s buyer information. + * @export + * @interface OrderItemBuyerInfo + */ +export interface OrderItemBuyerInfo { + /** + * An Amazon-defined order item identifier. + * @type {string} + * @memberof OrderItemBuyerInfo + */ + OrderItemId: string; + /** + * + * @type {BuyerCustomizedInfoDetail} + * @memberof OrderItemBuyerInfo + */ + BuyerCustomizedInfo?: BuyerCustomizedInfoDetail; + /** + * + * @type {Money} + * @memberof OrderItemBuyerInfo + */ + GiftWrapPrice?: Money; + /** + * + * @type {Money} + * @memberof OrderItemBuyerInfo + */ + GiftWrapTax?: Money; + /** + * A gift message provided by the buyer. + * @type {string} + * @memberof OrderItemBuyerInfo + */ + GiftMessageText?: string; + /** + * The gift wrap level specified by the buyer. + * @type {string} + * @memberof OrderItemBuyerInfo + */ + GiftWrapLevel?: string; +} +/** + * A single order item\'s buyer information list with the order ID. + * @export + * @interface OrderItemsBuyerInfoList + */ +export interface OrderItemsBuyerInfoList { + /** + * A single order item\'s buyer information list. + * @type {Array} + * @memberof OrderItemsBuyerInfoList + */ + OrderItems: Array; + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof OrderItemsBuyerInfoList + */ + NextToken?: string; + /** + * An Amazon-defined order identifier, in 3-7-7 format. + * @type {string} + * @memberof OrderItemsBuyerInfoList + */ + AmazonOrderId: string; +} +/** + * The order items list along with the order ID. + * @export + * @interface OrderItemsList + */ +export interface OrderItemsList { + /** + * A list of order items. + * @type {Array} + * @memberof OrderItemsList + */ + OrderItems: Array; + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof OrderItemsList + */ + NextToken?: string; + /** + * An Amazon-defined order identifier, in 3-7-7 format. + * @type {string} + * @memberof OrderItemsList + */ + AmazonOrderId: string; +} +/** + * A list of orders along with additional information to make subsequent API calls. + * @export + * @interface OrdersList + */ +export interface OrdersList { + /** + * A list of orders. + * @type {Array} + * @memberof OrdersList + */ + Orders: Array; + /** + * When present and not empty, pass this string token in the next request to return the next response page. + * @type {string} + * @memberof OrdersList + */ + NextToken?: string; + /** + * A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. All dates must be in ISO 8601 format. + * @type {string} + * @memberof OrdersList + */ + LastUpdatedBefore?: string; + /** + * A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format. + * @type {string} + * @memberof OrdersList + */ + CreatedBefore?: string; +} +/** + * Information about a sub-payment method used to pay for a COD order. + * @export + * @interface PaymentExecutionDetailItem + */ +export interface PaymentExecutionDetailItem { + /** + * + * @type {Money} + * @memberof PaymentExecutionDetailItem + */ + Payment: Money; + /** + * A sub-payment method for a COD order. Possible values: * COD - Cash On Delivery. * GC - Gift Card. * PointsAccount - Amazon Points. + * @type {string} + * @memberof PaymentExecutionDetailItem + */ + PaymentMethod: string; +} +/** + * The number of Amazon Points offered with the purchase of an item, and their monetary value. + * @export + * @interface PointsGrantedDetail + */ +export interface PointsGrantedDetail { + /** + * The number of Amazon Points granted with the purchase of an item. + * @type {number} + * @memberof PointsGrantedDetail + */ + PointsNumber?: number; + /** + * + * @type {Money} + * @memberof PointsGrantedDetail + */ + PointsMonetaryValue?: Money; +} +/** + * Product information on the number of items. + * @export + * @interface ProductInfoDetail + */ +export interface ProductInfoDetail { + /** + * The total number of items that are included in the ASIN. + * @type {number} + * @memberof ProductInfoDetail + */ + NumberOfItems?: number; +} +/** + * The tax classification for the order. + * @export + * @interface TaxClassification + */ +export interface TaxClassification { + /** + * The type of tax. + * @type {string} + * @memberof TaxClassification + */ + Name?: string; + /** + * The buyer\'s tax identifier. + * @type {string} + * @memberof TaxClassification + */ + Value?: string; +} +/** + * Information about withheld taxes. + * @export + * @interface TaxCollection + */ +export interface TaxCollection { + /** + * The tax collection model applied to the item. + * @type {string} + * @memberof TaxCollection + */ + Model?: TaxCollectionModelEnum; + /** + * The party responsible for withholding the taxes and remitting them to the taxing authority. + * @type {string} + * @memberof TaxCollection + */ + ResponsibleParty?: TaxCollectionResponsiblePartyEnum; +} + +/** + * @export + * @enum {string} + */ +export enum TaxCollectionModelEnum { + MarketplaceFacilitator = 'MarketplaceFacilitator' +} +/** + * @export + * @enum {string} + */ +export enum TaxCollectionResponsiblePartyEnum { + AmazonServicesInc = 'Amazon Services, Inc.' +} + + +/** + * OrdersV0Api - axios parameter creator + * @export + */ +export const OrdersV0ApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrder: async (orderId: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrder', 'orderId', orderId) + const localVarPath = `/orders/v0/orders/{orderId}` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the shipping address for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderAddress: async (orderId: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrderAddress', 'orderId', orderId) + const localVarPath = `/orders/v0/orders/{orderId}/address` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns buyer information for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderBuyerInfo: async (orderId: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrderBuyerInfo', 'orderId', orderId) + const localVarPath = `/orders/v0/orders/{orderId}/buyerInfo` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns detailed order item information for the order indicated by the specified order ID. If NextToken is provided, it\'s used to retrieve the next page of order items. Note: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderItems: async (orderId: string, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrderItems', 'orderId', orderId) + const localVarPath = `/orders/v0/orders/{orderId}/orderItems` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns buyer information in the order items of the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderItemsBuyerInfo: async (orderId: string, nextToken?: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrderItemsBuyerInfo', 'orderId', orderId) + const localVarPath = `/orders/v0/orders/{orderId}/orderItems/buyerInfo` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. + * @param {string} [createdAfter] A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. + * @param {string} [createdBefore] A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedBefore] A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {Array} [orderStatuses] A list of OrderStatus values used to filter the results. Possible values: PendingAvailability (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.); Pending (The order has been placed but payment has not been authorized); Unshipped (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped); PartiallyShipped (One or more, but not all, items in the order have been shipped); Shipped (All items in the order have been shipped); InvoiceUnconfirmed (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.); Canceled (The order has been canceled); and Unfulfillable (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.). + * @param {Array} [fulfillmentChannels] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: FBA (Fulfillment by Amazon); SellerFulfilled (Fulfilled by the seller). + * @param {Array} [paymentMethods] A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS). + * @param {string} [buyerEmail] The email address of a buyer. Used to select orders that contain the specified email address. + * @param {string} [sellerOrderId] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified. + * @param {number} [maxResultsPerPage] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100. + * @param {Array} [easyShipShipmentStatuses] A list of EasyShipShipmentStatus values. Used to select Easy Ship orders with statuses that match the specified values. If EasyShipShipmentStatus is specified, only Amazon Easy Ship orders are returned.Possible values: PendingPickUp (Amazon has not yet picked up the package from the seller). LabelCanceled (The seller canceled the pickup). PickedUp (Amazon has picked up the package from the seller). AtOriginFC (The packaged is at the origin fulfillment center). AtDestinationFC (The package is at the destination fulfillment center). OutForDelivery (The package is out for delivery). Damaged (The package was damaged by the carrier). Delivered (The package has been delivered to the buyer). RejectedByBuyer (The package has been rejected by the buyer). Undeliverable (The package cannot be delivered). ReturnedToSeller (The package was not delivered to the buyer and was returned to the seller). ReturningToSeller (The package was not delivered to the buyer and is being returned to the seller). + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {Array} [amazonOrderIds] A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrders: async (marketplaceIds: Array, createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, orderStatuses?: Array, fulfillmentChannels?: Array, paymentMethods?: Array, buyerEmail?: string, sellerOrderId?: string, maxResultsPerPage?: number, easyShipShipmentStatuses?: Array, nextToken?: string, amazonOrderIds?: Array, options: any = {}): Promise => { + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getOrders', 'marketplaceIds', marketplaceIds) + const localVarPath = `/orders/v0/orders`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (createdAfter !== undefined) { + localVarQueryParameter['CreatedAfter'] = createdAfter; + } + + if (createdBefore !== undefined) { + localVarQueryParameter['CreatedBefore'] = createdBefore; + } + + if (lastUpdatedAfter !== undefined) { + localVarQueryParameter['LastUpdatedAfter'] = lastUpdatedAfter; + } + + if (lastUpdatedBefore !== undefined) { + localVarQueryParameter['LastUpdatedBefore'] = lastUpdatedBefore; + } + + if (orderStatuses) { + localVarQueryParameter['OrderStatuses'] = orderStatuses.join(COLLECTION_FORMATS.csv); + } + + if (marketplaceIds) { + localVarQueryParameter['MarketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + if (fulfillmentChannels) { + localVarQueryParameter['FulfillmentChannels'] = fulfillmentChannels.join(COLLECTION_FORMATS.csv); + } + + if (paymentMethods) { + localVarQueryParameter['PaymentMethods'] = paymentMethods.join(COLLECTION_FORMATS.csv); + } + + if (buyerEmail !== undefined) { + localVarQueryParameter['BuyerEmail'] = buyerEmail; + } + + if (sellerOrderId !== undefined) { + localVarQueryParameter['SellerOrderId'] = sellerOrderId; + } + + if (maxResultsPerPage !== undefined) { + localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage; + } + + if (easyShipShipmentStatuses) { + localVarQueryParameter['EasyShipShipmentStatuses'] = easyShipShipmentStatuses.join(COLLECTION_FORMATS.csv); + } + + if (nextToken !== undefined) { + localVarQueryParameter['NextToken'] = nextToken; + } + + if (amazonOrderIds) { + localVarQueryParameter['AmazonOrderIds'] = amazonOrderIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OrdersV0Api - functional programming interface + * @export + */ +export const OrdersV0ApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OrdersV0ApiAxiosParamCreator(configuration) + return { + /** + * Returns the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the shipping address for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderAddress(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderAddress(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns buyer information for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderBuyerInfo(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderBuyerInfo(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns detailed order item information for the order indicated by the specified order ID. If NextToken is provided, it\'s used to retrieve the next page of order items. Note: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderItems(orderId: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderItems(orderId, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns buyer information in the order items of the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderItemsBuyerInfo(orderId: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderItemsBuyerInfo(orderId, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. + * @param {string} [createdAfter] A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. + * @param {string} [createdBefore] A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedBefore] A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {Array} [orderStatuses] A list of OrderStatus values used to filter the results. Possible values: PendingAvailability (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.); Pending (The order has been placed but payment has not been authorized); Unshipped (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped); PartiallyShipped (One or more, but not all, items in the order have been shipped); Shipped (All items in the order have been shipped); InvoiceUnconfirmed (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.); Canceled (The order has been canceled); and Unfulfillable (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.). + * @param {Array} [fulfillmentChannels] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: FBA (Fulfillment by Amazon); SellerFulfilled (Fulfilled by the seller). + * @param {Array} [paymentMethods] A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS). + * @param {string} [buyerEmail] The email address of a buyer. Used to select orders that contain the specified email address. + * @param {string} [sellerOrderId] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified. + * @param {number} [maxResultsPerPage] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100. + * @param {Array} [easyShipShipmentStatuses] A list of EasyShipShipmentStatus values. Used to select Easy Ship orders with statuses that match the specified values. If EasyShipShipmentStatus is specified, only Amazon Easy Ship orders are returned.Possible values: PendingPickUp (Amazon has not yet picked up the package from the seller). LabelCanceled (The seller canceled the pickup). PickedUp (Amazon has picked up the package from the seller). AtOriginFC (The packaged is at the origin fulfillment center). AtDestinationFC (The package is at the destination fulfillment center). OutForDelivery (The package is out for delivery). Damaged (The package was damaged by the carrier). Delivered (The package has been delivered to the buyer). RejectedByBuyer (The package has been rejected by the buyer). Undeliverable (The package cannot be delivered). ReturnedToSeller (The package was not delivered to the buyer and was returned to the seller). ReturningToSeller (The package was not delivered to the buyer and is being returned to the seller). + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {Array} [amazonOrderIds] A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrders(marketplaceIds: Array, createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, orderStatuses?: Array, fulfillmentChannels?: Array, paymentMethods?: Array, buyerEmail?: string, sellerOrderId?: string, maxResultsPerPage?: number, easyShipShipmentStatuses?: Array, nextToken?: string, amazonOrderIds?: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, nextToken, amazonOrderIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * OrdersV0Api - factory interface + * @export + */ +export const OrdersV0ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OrdersV0ApiFp(configuration) + return { + /** + * Returns the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrder(orderId: string, options?: any): AxiosPromise { + return localVarFp.getOrder(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the shipping address for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderAddress(orderId: string, options?: any): AxiosPromise { + return localVarFp.getOrderAddress(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns buyer information for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderBuyerInfo(orderId: string, options?: any): AxiosPromise { + return localVarFp.getOrderBuyerInfo(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns detailed order item information for the order indicated by the specified order ID. If NextToken is provided, it\'s used to retrieve the next page of order items. Note: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderItems(orderId: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getOrderItems(orderId, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns buyer information in the order items of the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderItemsBuyerInfo(orderId: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getOrderItemsBuyerInfo(orderId, nextToken, options).then((request) => request(axios, basePath)); + }, + /** + * Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. + * @param {string} [createdAfter] A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. + * @param {string} [createdBefore] A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedBefore] A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {Array} [orderStatuses] A list of OrderStatus values used to filter the results. Possible values: PendingAvailability (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.); Pending (The order has been placed but payment has not been authorized); Unshipped (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped); PartiallyShipped (One or more, but not all, items in the order have been shipped); Shipped (All items in the order have been shipped); InvoiceUnconfirmed (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.); Canceled (The order has been canceled); and Unfulfillable (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.). + * @param {Array} [fulfillmentChannels] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: FBA (Fulfillment by Amazon); SellerFulfilled (Fulfilled by the seller). + * @param {Array} [paymentMethods] A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS). + * @param {string} [buyerEmail] The email address of a buyer. Used to select orders that contain the specified email address. + * @param {string} [sellerOrderId] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified. + * @param {number} [maxResultsPerPage] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100. + * @param {Array} [easyShipShipmentStatuses] A list of EasyShipShipmentStatus values. Used to select Easy Ship orders with statuses that match the specified values. If EasyShipShipmentStatus is specified, only Amazon Easy Ship orders are returned.Possible values: PendingPickUp (Amazon has not yet picked up the package from the seller). LabelCanceled (The seller canceled the pickup). PickedUp (Amazon has picked up the package from the seller). AtOriginFC (The packaged is at the origin fulfillment center). AtDestinationFC (The package is at the destination fulfillment center). OutForDelivery (The package is out for delivery). Damaged (The package was damaged by the carrier). Delivered (The package has been delivered to the buyer). RejectedByBuyer (The package has been rejected by the buyer). Undeliverable (The package cannot be delivered). ReturnedToSeller (The package was not delivered to the buyer and was returned to the seller). ReturningToSeller (The package was not delivered to the buyer and is being returned to the seller). + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {Array} [amazonOrderIds] A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrders(marketplaceIds: Array, createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, orderStatuses?: Array, fulfillmentChannels?: Array, paymentMethods?: Array, buyerEmail?: string, sellerOrderId?: string, maxResultsPerPage?: number, easyShipShipmentStatuses?: Array, nextToken?: string, amazonOrderIds?: Array, options?: any): AxiosPromise { + return localVarFp.getOrders(marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, nextToken, amazonOrderIds, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * OrdersV0Api - object-oriented interface + * @export + * @class OrdersV0Api + * @extends {BaseAPI} + */ +export class OrdersV0Api extends BaseAPI { + /** + * Returns the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersV0Api + */ + public getOrder(orderId: string, options?: any) { + return OrdersV0ApiFp(this.configuration).getOrder(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the shipping address for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersV0Api + */ + public getOrderAddress(orderId: string, options?: any) { + return OrdersV0ApiFp(this.configuration).getOrderAddress(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns buyer information for the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An orderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersV0Api + */ + public getOrderBuyerInfo(orderId: string, options?: any) { + return OrdersV0ApiFp(this.configuration).getOrderBuyerInfo(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns detailed order item information for the order indicated by the specified order ID. If NextToken is provided, it\'s used to retrieve the next page of order items. Note: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersV0Api + */ + public getOrderItems(orderId: string, nextToken?: string, options?: any) { + return OrdersV0ApiFp(this.configuration).getOrderItems(orderId, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns buyer information in the order items of the order indicated by the specified order ID. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format. + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersV0Api + */ + public getOrderItemsBuyerInfo(orderId: string, nextToken?: string, options?: any) { + return OrdersV0ApiFp(this.configuration).getOrderItemsBuyerInfo(orderId, nextToken, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. + * @param {string} [createdAfter] A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. + * @param {string} [createdBefore] A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {string} [lastUpdatedBefore] A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format. + * @param {Array} [orderStatuses] A list of OrderStatus values used to filter the results. Possible values: PendingAvailability (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.); Pending (The order has been placed but payment has not been authorized); Unshipped (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped); PartiallyShipped (One or more, but not all, items in the order have been shipped); Shipped (All items in the order have been shipped); InvoiceUnconfirmed (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.); Canceled (The order has been canceled); and Unfulfillable (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.). + * @param {Array} [fulfillmentChannels] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: FBA (Fulfillment by Amazon); SellerFulfilled (Fulfilled by the seller). + * @param {Array} [paymentMethods] A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS). + * @param {string} [buyerEmail] The email address of a buyer. Used to select orders that contain the specified email address. + * @param {string} [sellerOrderId] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified. + * @param {number} [maxResultsPerPage] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100. + * @param {Array} [easyShipShipmentStatuses] A list of EasyShipShipmentStatus values. Used to select Easy Ship orders with statuses that match the specified values. If EasyShipShipmentStatus is specified, only Amazon Easy Ship orders are returned.Possible values: PendingPickUp (Amazon has not yet picked up the package from the seller). LabelCanceled (The seller canceled the pickup). PickedUp (Amazon has picked up the package from the seller). AtOriginFC (The packaged is at the origin fulfillment center). AtDestinationFC (The package is at the destination fulfillment center). OutForDelivery (The package is out for delivery). Damaged (The package was damaged by the carrier). Delivered (The package has been delivered to the buyer). RejectedByBuyer (The package has been rejected by the buyer). Undeliverable (The package cannot be delivered). ReturnedToSeller (The package was not delivered to the buyer and was returned to the seller). ReturningToSeller (The package was not delivered to the buyer and is being returned to the seller). + * @param {string} [nextToken] A string token returned in the response of your previous request. + * @param {Array} [amazonOrderIds] A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersV0Api + */ + public getOrders(marketplaceIds: Array, createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, orderStatuses?: Array, fulfillmentChannels?: Array, paymentMethods?: Array, buyerEmail?: string, sellerOrderId?: string, maxResultsPerPage?: number, easyShipShipmentStatuses?: Array, nextToken?: string, amazonOrderIds?: Array, options?: any) { + return OrdersV0ApiFp(this.configuration).getOrders(marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, nextToken, amazonOrderIds, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/orders-api-model/base.ts b/src/api-models/orders-api-model/base.ts new file mode 100644 index 00000000..4d4317ee --- /dev/null +++ b/src/api-models/orders-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Orders + * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/orders-api-model/common.ts b/src/api-models/orders-api-model/common.ts new file mode 100644 index 00000000..b2c9379a --- /dev/null +++ b/src/api-models/orders-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Orders + * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/orders-api-model/configuration.ts b/src/api-models/orders-api-model/configuration.ts new file mode 100644 index 00000000..43f5fc78 --- /dev/null +++ b/src/api-models/orders-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Orders + * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/orders-api-model/git_push.sh b/src/api-models/orders-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/orders-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/orders-api-model/index.ts b/src/api-models/orders-api-model/index.ts new file mode 100644 index 00000000..c7feb1db --- /dev/null +++ b/src/api-models/orders-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Orders + * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/product-fees-api-model/.gitignore b/src/api-models/product-fees-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/product-fees-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/product-fees-api-model/.npmignore b/src/api-models/product-fees-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/product-fees-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/product-fees-api-model/.openapi-generator-ignore b/src/api-models/product-fees-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/product-fees-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/product-fees-api-model/.openapi-generator/FILES b/src/api-models/product-fees-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/product-fees-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/product-fees-api-model/.openapi-generator/VERSION b/src/api-models/product-fees-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/product-fees-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/product-fees-api-model/api.ts b/src/api-models/product-fees-api-model/api.ts new file mode 100644 index 00000000..5e8cc0a8 --- /dev/null +++ b/src/api-models/product-fees-api-model/api.ts @@ -0,0 +1,609 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Product Fees + * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The type of fee, fee amount, and other details. + * @export + * @interface FeeDetail + */ +export interface FeeDetail { + /** + * The type of fee charged to a seller. + * @type {string} + * @memberof FeeDetail + */ + FeeType: string; + /** + * + * @type {MoneyType} + * @memberof FeeDetail + */ + FeeAmount: MoneyType; + /** + * + * @type {MoneyType} + * @memberof FeeDetail + */ + FeePromotion?: MoneyType; + /** + * + * @type {MoneyType} + * @memberof FeeDetail + */ + TaxAmount?: MoneyType; + /** + * + * @type {MoneyType} + * @memberof FeeDetail + */ + FinalFee: MoneyType; + /** + * A list of other fees that contribute to a given fee. + * @type {Array} + * @memberof FeeDetail + */ + IncludedFeeDetailList?: Array; +} +/** + * The total estimated fees for an item and a list of details. + * @export + * @interface FeesEstimate + */ +export interface FeesEstimate { + /** + * The time at which the fees were estimated. This defaults to the time the request is made. + * @type {string} + * @memberof FeesEstimate + */ + TimeOfFeesEstimation: string; + /** + * + * @type {MoneyType} + * @memberof FeesEstimate + */ + TotalFeesEstimate?: MoneyType; + /** + * A list of other fees that contribute to a given fee. + * @type {Array} + * @memberof FeesEstimate + */ + FeeDetailList?: Array; +} +/** + * An unexpected error occurred during this operation. + * @export + * @interface FeesEstimateError + */ +export interface FeesEstimateError { + /** + * An error type, identifying either the receiver or the sender as the originator of the error. + * @type {string} + * @memberof FeesEstimateError + */ + Type: string; + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof FeesEstimateError + */ + Code: string; + /** + * A message that describes the error condition. + * @type {string} + * @memberof FeesEstimateError + */ + Message: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {Array} + * @memberof FeesEstimateError + */ + Detail: Array; +} +/** + * An item identifier, marketplace, time of request, and other details that identify an estimate. + * @export + * @interface FeesEstimateIdentifier + */ +export interface FeesEstimateIdentifier { + /** + * A marketplace identifier. + * @type {string} + * @memberof FeesEstimateIdentifier + */ + MarketplaceId?: string; + /** + * The seller identifier. + * @type {string} + * @memberof FeesEstimateIdentifier + */ + SellerId?: string; + /** + * The type of item identifier specified. + * @type {string} + * @memberof FeesEstimateIdentifier + */ + IdType?: string; + /** + * The item identifier. + * @type {string} + * @memberof FeesEstimateIdentifier + */ + IdValue?: string; + /** + * When true, the offer is fulfilled by Amazon. + * @type {boolean} + * @memberof FeesEstimateIdentifier + */ + IsAmazonFulfilled?: boolean; + /** + * + * @type {PriceToEstimateFees} + * @memberof FeesEstimateIdentifier + */ + PriceToEstimateFees?: PriceToEstimateFees; + /** + * A unique identifier provided by the caller to track this request. + * @type {string} + * @memberof FeesEstimateIdentifier + */ + SellerInputIdentifier?: string; + /** + * + * @type {OptionalFulfillmentProgram} + * @memberof FeesEstimateIdentifier + */ + OptionalFulfillmentProgram?: OptionalFulfillmentProgram; +} +/** + * + * @export + * @interface FeesEstimateRequest + */ +export interface FeesEstimateRequest { + /** + * A marketplace identifier. + * @type {string} + * @memberof FeesEstimateRequest + */ + MarketplaceId: string; + /** + * When true, the offer is fulfilled by Amazon. + * @type {boolean} + * @memberof FeesEstimateRequest + */ + IsAmazonFulfilled?: boolean; + /** + * + * @type {PriceToEstimateFees} + * @memberof FeesEstimateRequest + */ + PriceToEstimateFees: PriceToEstimateFees; + /** + * A unique identifier provided by the caller to track this request. + * @type {string} + * @memberof FeesEstimateRequest + */ + Identifier: string; + /** + * + * @type {OptionalFulfillmentProgram} + * @memberof FeesEstimateRequest + */ + OptionalFulfillmentProgram?: OptionalFulfillmentProgram; +} +/** + * An item identifier and the estimated fees for the item. + * @export + * @interface FeesEstimateResult + */ +export interface FeesEstimateResult { + /** + * The status of the fee request. Possible values: Success, ClientError, ServiceError. + * @type {string} + * @memberof FeesEstimateResult + */ + Status?: string; + /** + * + * @type {FeesEstimateIdentifier} + * @memberof FeesEstimateResult + */ + FeesEstimateIdentifier?: FeesEstimateIdentifier; + /** + * + * @type {FeesEstimate} + * @memberof FeesEstimateResult + */ + FeesEstimate?: FeesEstimate; + /** + * + * @type {FeesEstimateError} + * @memberof FeesEstimateResult + */ + Error?: FeesEstimateError; +} +/** + * Request schema. + * @export + * @interface GetMyFeesEstimateRequest + */ +export interface GetMyFeesEstimateRequest { + /** + * + * @type {FeesEstimateRequest} + * @memberof GetMyFeesEstimateRequest + */ + FeesEstimateRequest?: FeesEstimateRequest; +} +/** + * + * @export + * @interface GetMyFeesEstimateResponse + */ +export interface GetMyFeesEstimateResponse { + /** + * + * @type {GetMyFeesEstimateResult} + * @memberof GetMyFeesEstimateResponse + */ + payload?: GetMyFeesEstimateResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetMyFeesEstimateResponse + */ + errors?: Array; +} +/** + * Response schema. + * @export + * @interface GetMyFeesEstimateResult + */ +export interface GetMyFeesEstimateResult { + /** + * + * @type {FeesEstimateResult} + * @memberof GetMyFeesEstimateResult + */ + FeesEstimateResult?: FeesEstimateResult; +} +/** + * The type of fee, fee amount, and other details. + * @export + * @interface IncludedFeeDetail + */ +export interface IncludedFeeDetail { + /** + * The type of fee charged to a seller. + * @type {string} + * @memberof IncludedFeeDetail + */ + FeeType: string; + /** + * + * @type {MoneyType} + * @memberof IncludedFeeDetail + */ + FeeAmount: MoneyType; + /** + * + * @type {MoneyType} + * @memberof IncludedFeeDetail + */ + FeePromotion?: MoneyType; + /** + * + * @type {MoneyType} + * @memberof IncludedFeeDetail + */ + TaxAmount?: MoneyType; + /** + * + * @type {MoneyType} + * @memberof IncludedFeeDetail + */ + FinalFee: MoneyType; +} +/** + * + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * + * @export + * @interface MoneyType + */ +export interface MoneyType { + /** + * The currency code in ISO 4217 format. + * @type {string} + * @memberof MoneyType + */ + CurrencyCode?: string; + /** + * The monetary value. + * @type {number} + * @memberof MoneyType + */ + Amount?: number; +} +/** + * An optional enrollment program for which to return the estimated fees when the offer is fulfilled by Amazon (IsAmazonFulfilled is set to true). + * @export + * @enum {string} + */ +export enum OptionalFulfillmentProgram { + Core = 'FBA_CORE', + Snl = 'FBA_SNL', + Efn = 'FBA_EFN' +} + +/** + * + * @export + * @interface Points + */ +export interface Points { + /** + * + * @type {number} + * @memberof Points + */ + PointsNumber?: number; + /** + * + * @type {MoneyType} + * @memberof Points + */ + PointsMonetaryValue?: MoneyType; +} +/** + * Price information for an item, used to estimate fees. + * @export + * @interface PriceToEstimateFees + */ +export interface PriceToEstimateFees { + /** + * + * @type {MoneyType} + * @memberof PriceToEstimateFees + */ + ListingPrice: MoneyType; + /** + * + * @type {MoneyType} + * @memberof PriceToEstimateFees + */ + Shipping?: MoneyType; + /** + * + * @type {Points} + * @memberof PriceToEstimateFees + */ + Points?: Points; +} + +/** + * FeesApi - axios parameter creator + * @export + */ +export const FeesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyFeesEstimateForASIN: async (asin: string, body: GetMyFeesEstimateRequest, options: any = {}): Promise => { + // verify required parameter 'asin' is not null or undefined + assertParamExists('getMyFeesEstimateForASIN', 'asin', asin) + // verify required parameter 'body' is not null or undefined + assertParamExists('getMyFeesEstimateForASIN', 'body', body) + const localVarPath = `/products/fees/v0/items/{Asin}/feesEstimate` + .replace(`{${"Asin"}}`, encodeURIComponent(String(asin))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyFeesEstimateForSKU: async (sellerSKU: string, body: GetMyFeesEstimateRequest, options: any = {}): Promise => { + // verify required parameter 'sellerSKU' is not null or undefined + assertParamExists('getMyFeesEstimateForSKU', 'sellerSKU', sellerSKU) + // verify required parameter 'body' is not null or undefined + assertParamExists('getMyFeesEstimateForSKU', 'body', body) + const localVarPath = `/products/fees/v0/listings/{SellerSKU}/feesEstimate` + .replace(`{${"SellerSKU"}}`, encodeURIComponent(String(sellerSKU))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FeesApi - functional programming interface + * @export + */ +export const FeesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FeesApiAxiosParamCreator(configuration) + return { + /** + * Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMyFeesEstimateForASIN(asin: string, body: GetMyFeesEstimateRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMyFeesEstimateForASIN(asin, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMyFeesEstimateForSKU(sellerSKU: string, body: GetMyFeesEstimateRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMyFeesEstimateForSKU(sellerSKU, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FeesApi - factory interface + * @export + */ +export const FeesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FeesApiFp(configuration) + return { + /** + * Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyFeesEstimateForASIN(asin: string, body: GetMyFeesEstimateRequest, options?: any): AxiosPromise { + return localVarFp.getMyFeesEstimateForASIN(asin, body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyFeesEstimateForSKU(sellerSKU: string, body: GetMyFeesEstimateRequest, options?: any): AxiosPromise { + return localVarFp.getMyFeesEstimateForSKU(sellerSKU, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FeesApi - object-oriented interface + * @export + * @class FeesApi + * @extends {BaseAPI} + */ +export class FeesApi extends BaseAPI { + /** + * Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeesApi + */ + public getMyFeesEstimateForASIN(asin: string, body: GetMyFeesEstimateRequest, options?: any) { + return FeesApiFp(this.configuration).getMyFeesEstimateForASIN(asin, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item\'s price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 1 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} sellerSKU Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {GetMyFeesEstimateRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeesApi + */ + public getMyFeesEstimateForSKU(sellerSKU: string, body: GetMyFeesEstimateRequest, options?: any) { + return FeesApiFp(this.configuration).getMyFeesEstimateForSKU(sellerSKU, body, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/product-fees-api-model/base.ts b/src/api-models/product-fees-api-model/base.ts new file mode 100644 index 00000000..b81af8bf --- /dev/null +++ b/src/api-models/product-fees-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Product Fees + * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/product-fees-api-model/common.ts b/src/api-models/product-fees-api-model/common.ts new file mode 100644 index 00000000..16eb30f1 --- /dev/null +++ b/src/api-models/product-fees-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Product Fees + * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/product-fees-api-model/configuration.ts b/src/api-models/product-fees-api-model/configuration.ts new file mode 100644 index 00000000..e5903675 --- /dev/null +++ b/src/api-models/product-fees-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Product Fees + * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/product-fees-api-model/git_push.sh b/src/api-models/product-fees-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/product-fees-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/product-fees-api-model/index.ts b/src/api-models/product-fees-api-model/index.ts new file mode 100644 index 00000000..a6fe9152 --- /dev/null +++ b/src/api-models/product-fees-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Product Fees + * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/product-pricing-api-model/.gitignore b/src/api-models/product-pricing-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/product-pricing-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/product-pricing-api-model/.npmignore b/src/api-models/product-pricing-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/product-pricing-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/product-pricing-api-model/.openapi-generator-ignore b/src/api-models/product-pricing-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/product-pricing-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/product-pricing-api-model/.openapi-generator/FILES b/src/api-models/product-pricing-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/product-pricing-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/product-pricing-api-model/.openapi-generator/VERSION b/src/api-models/product-pricing-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/product-pricing-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/product-pricing-api-model/api.ts b/src/api-models/product-pricing-api-model/api.ts new file mode 100644 index 00000000..ff65deb0 --- /dev/null +++ b/src/api-models/product-pricing-api-model/api.ts @@ -0,0 +1,1254 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Pricing + * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * + * @export + * @interface ASINIdentifier + */ +export interface ASINIdentifier { + /** + * A marketplace identifier. + * @type {string} + * @memberof ASINIdentifier + */ + MarketplaceId: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ASINIdentifier + */ + ASIN: string; +} +/** + * + * @export + * @interface BuyBoxPriceType + */ +export interface BuyBoxPriceType { + /** + * Indicates the condition of the item. For example: New, Used, Collectible, Refurbished, or Club. + * @type {string} + * @memberof BuyBoxPriceType + */ + condition: string; + /** + * + * @type {MoneyType} + * @memberof BuyBoxPriceType + */ + LandedPrice: MoneyType; + /** + * + * @type {MoneyType} + * @memberof BuyBoxPriceType + */ + ListingPrice: MoneyType; + /** + * + * @type {MoneyType} + * @memberof BuyBoxPriceType + */ + Shipping: MoneyType; + /** + * + * @type {Points} + * @memberof BuyBoxPriceType + */ + Points?: Points; +} +/** + * + * @export + * @interface CompetitivePriceType + */ +export interface CompetitivePriceType { + /** + * The pricing model for each price that is returned. Possible values: * 1 - New Buy Box Price. * 2 - Used Buy Box Price. + * @type {string} + * @memberof CompetitivePriceType + */ + CompetitivePriceId: string; + /** + * + * @type {PriceType} + * @memberof CompetitivePriceType + */ + Price: PriceType; + /** + * Indicates the condition of the item whose pricing information is returned. Possible values are: New, Used, Collectible, Refurbished, or Club. + * @type {string} + * @memberof CompetitivePriceType + */ + condition?: string; + /** + * Indicates the subcondition of the item whose pricing information is returned. Possible values are: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other. + * @type {string} + * @memberof CompetitivePriceType + */ + subcondition?: string; + /** + * Indicates whether or not the pricing information is for an offer listing that belongs to the requester. The requester is the seller associated with the SellerId that was submitted with the request. Possible values are: true and false. + * @type {boolean} + * @memberof CompetitivePriceType + */ + belongsToRequester?: boolean; +} +/** + * Competitive pricing information for the item. + * @export + * @interface CompetitivePricingType + */ +export interface CompetitivePricingType { + /** + * A list of competitive pricing information. + * @type {Array} + * @memberof CompetitivePricingType + */ + CompetitivePrices: Array; + /** + * The number of active offer listings for the item that was submitted. The listing count is returned by condition, one for each listing condition value that is returned. + * @type {Array} + * @memberof CompetitivePricingType + */ + NumberOfOfferListings: Array; + /** + * + * @type {MoneyType} + * @memberof CompetitivePricingType + */ + TradeInValue?: MoneyType; +} +/** + * Indicates the condition of the item. Possible values: New, Used, Collectible, Refurbished, Club. + * @export + * @enum {string} + */ +export enum ConditionType { + New = 'New', + Used = 'Used', + Collectible = 'Collectible', + Refurbished = 'Refurbished', + Club = 'Club' +} + +/** + * The time range in which an item will likely be shipped once an order has been placed. + * @export + * @interface DetailedShippingTimeType + */ +export interface DetailedShippingTimeType { + /** + * The minimum time, in hours, that the item will likely be shipped after the order has been placed. + * @type {number} + * @memberof DetailedShippingTimeType + */ + minimumHours?: number; + /** + * The maximum time, in hours, that the item will likely be shipped after the order has been placed. + * @type {number} + * @memberof DetailedShippingTimeType + */ + maximumHours?: number; + /** + * The date when the item will be available for shipping. Only displayed for items that are not currently available for shipping. + * @type {number} + * @memberof DetailedShippingTimeType + */ + availableDate?: number; + /** + * Indicates whether the item is available for shipping now, or on a known or an unknown date in the future. If known, the availableDate property indicates the date that the item will be available for shipping. Possible values: NOW, FUTURE_WITHOUT_DATE, FUTURE_WITH_DATE. + * @type {string} + * @memberof DetailedShippingTimeType + */ + availabilityType?: DetailedShippingTimeTypeAvailabilityTypeEnum; +} + +/** + * @export + * @enum {string} + */ +export enum DetailedShippingTimeTypeAvailabilityTypeEnum { + Now = 'NOW', + FutureWithoutDate = 'FUTURE_WITHOUT_DATE', + FutureWithDate = 'FUTURE_WITH_DATE' +} + +/** + * Indicates whether the item is fulfilled by Amazon or by the seller (merchant). + * @export + * @enum {string} + */ +export enum FulfillmentChannelType { + Amazon = 'Amazon', + Merchant = 'Merchant' +} + +/** + * The response schema for the getListingOffers and getItemOffers operations. + * @export + * @interface GetOffersResponse + */ +export interface GetOffersResponse { + /** + * + * @type {GetOffersResult} + * @memberof GetOffersResponse + */ + payload?: GetOffersResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOffersResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetOffersResult + */ +export interface GetOffersResult { + /** + * A marketplace identifier. + * @type {string} + * @memberof GetOffersResult + */ + MarketplaceID: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof GetOffersResult + */ + ASIN?: string; + /** + * The stock keeping unit (SKU) of the item. + * @type {string} + * @memberof GetOffersResult + */ + SKU?: string; + /** + * + * @type {ConditionType} + * @memberof GetOffersResult + */ + ItemCondition: ConditionType; + /** + * The status of the operation. + * @type {string} + * @memberof GetOffersResult + */ + status: string; + /** + * + * @type {ItemIdentifier} + * @memberof GetOffersResult + */ + Identifier: ItemIdentifier; + /** + * + * @type {Summary} + * @memberof GetOffersResult + */ + Summary: Summary; + /** + * + * @type {Array} + * @memberof GetOffersResult + */ + Offers: Array; +} +/** + * The response schema for the getPricing and getCompetitivePricing operations. + * @export + * @interface GetPricingResponse + */ +export interface GetPricingResponse { + /** + * + * @type {Array} + * @memberof GetPricingResponse + */ + payload?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetPricingResponse + */ + errors?: Array; +} +/** + * Specifies the identifiers used to uniquely identify an item. + * @export + * @interface IdentifierType + */ +export interface IdentifierType { + /** + * + * @type {ASINIdentifier} + * @memberof IdentifierType + */ + MarketplaceASIN: ASINIdentifier; + /** + * + * @type {SellerSKUIdentifier} + * @memberof IdentifierType + */ + SKUIdentifier?: SellerSKUIdentifier; +} +/** + * Information that identifies an item. + * @export + * @interface ItemIdentifier + */ +export interface ItemIdentifier { + /** + * A marketplace identifier. Specifies the marketplace from which prices are returned. + * @type {string} + * @memberof ItemIdentifier + */ + MarketplaceId: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof ItemIdentifier + */ + ASIN?: string; + /** + * The seller stock keeping unit (SKU) of the item. + * @type {string} + * @memberof ItemIdentifier + */ + SellerSKU?: string; + /** + * + * @type {ConditionType} + * @memberof ItemIdentifier + */ + ItemCondition: ConditionType; +} +/** + * + * @export + * @interface LowestPriceType + */ +export interface LowestPriceType { + /** + * Indicates the condition of the item. For example: New, Used, Collectible, Refurbished, or Club. + * @type {string} + * @memberof LowestPriceType + */ + condition: string; + /** + * Indicates whether the item is fulfilled by Amazon or by the seller. + * @type {string} + * @memberof LowestPriceType + */ + fulfillmentChannel: string; + /** + * + * @type {MoneyType} + * @memberof LowestPriceType + */ + LandedPrice: MoneyType; + /** + * + * @type {MoneyType} + * @memberof LowestPriceType + */ + ListingPrice: MoneyType; + /** + * + * @type {MoneyType} + * @memberof LowestPriceType + */ + Shipping: MoneyType; + /** + * + * @type {Points} + * @memberof LowestPriceType + */ + Points?: Points; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional information that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * + * @export + * @interface MoneyType + */ +export interface MoneyType { + /** + * The currency code in ISO 4217 format. + * @type {string} + * @memberof MoneyType + */ + CurrencyCode?: string; + /** + * The monetary value. + * @type {number} + * @memberof MoneyType + */ + Amount?: number; +} +/** + * The total number of offers for the specified condition and fulfillment channel. + * @export + * @interface OfferCountType + */ +export interface OfferCountType { + /** + * Indicates the condition of the item. For example: New, Used, Collectible, Refurbished, or Club. + * @type {string} + * @memberof OfferCountType + */ + condition?: string; + /** + * + * @type {FulfillmentChannelType} + * @memberof OfferCountType + */ + fulfillmentChannel?: FulfillmentChannelType; + /** + * The number of offers in a fulfillment channel that meet a specific condition. + * @type {number} + * @memberof OfferCountType + */ + OfferCount?: number; +} +/** + * + * @export + * @interface OfferDetail + */ +export interface OfferDetail { + /** + * When true, this is the seller\'s offer. + * @type {boolean} + * @memberof OfferDetail + */ + MyOffer?: boolean; + /** + * The subcondition of the item. Subcondition values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other. + * @type {string} + * @memberof OfferDetail + */ + SubCondition: string; + /** + * + * @type {SellerFeedbackType} + * @memberof OfferDetail + */ + SellerFeedbackRating?: SellerFeedbackType; + /** + * + * @type {DetailedShippingTimeType} + * @memberof OfferDetail + */ + ShippingTime: DetailedShippingTimeType; + /** + * + * @type {MoneyType} + * @memberof OfferDetail + */ + ListingPrice: MoneyType; + /** + * + * @type {Points} + * @memberof OfferDetail + */ + Points?: Points; + /** + * + * @type {MoneyType} + * @memberof OfferDetail + */ + Shipping: MoneyType; + /** + * + * @type {ShipsFromType} + * @memberof OfferDetail + */ + ShipsFrom?: ShipsFromType; + /** + * When true, the offer is fulfilled by Amazon. + * @type {boolean} + * @memberof OfferDetail + */ + IsFulfilledByAmazon: boolean; + /** + * When true, the offer is currently in the Buy Box. There can be up to two Buy Box winners at any time per ASIN, one that is eligible for Prime and one that is not eligible for Prime. + * @type {boolean} + * @memberof OfferDetail + */ + IsBuyBoxWinner?: boolean; + /** + * When true, the seller of the item is eligible to win the Buy Box. + * @type {boolean} + * @memberof OfferDetail + */ + IsFeaturedMerchant?: boolean; +} +/** + * The number of offer listings with the specified condition. + * @export + * @interface OfferListingCountType + */ +export interface OfferListingCountType { + /** + * The number of offer listings. + * @type {number} + * @memberof OfferListingCountType + */ + Count: number; + /** + * The condition of the item. + * @type {string} + * @memberof OfferListingCountType + */ + condition: string; +} +/** + * + * @export + * @interface OfferType + */ +export interface OfferType { + /** + * + * @type {PriceType} + * @memberof OfferType + */ + BuyingPrice: PriceType; + /** + * + * @type {MoneyType} + * @memberof OfferType + */ + RegularPrice: MoneyType; + /** + * The fulfillment channel for the offer listing. Possible values: * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller. + * @type {string} + * @memberof OfferType + */ + FulfillmentChannel: string; + /** + * The item condition for the offer listing. Possible values: New, Used, Collectible, Refurbished, or Club. + * @type {string} + * @memberof OfferType + */ + ItemCondition: string; + /** + * The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other. + * @type {string} + * @memberof OfferType + */ + ItemSubCondition: string; + /** + * The seller stock keeping unit (SKU) of the item. + * @type {string} + * @memberof OfferType + */ + SellerSKU: string; +} +/** + * + * @export + * @interface Points + */ +export interface Points { + /** + * The number of points. + * @type {number} + * @memberof Points + */ + PointsNumber?: number; + /** + * + * @type {MoneyType} + * @memberof Points + */ + PointsMonetaryValue?: MoneyType; +} +/** + * + * @export + * @interface Price + */ +export interface Price { + /** + * The status of the operation. + * @type {string} + * @memberof Price + */ + status: string; + /** + * The seller stock keeping unit (SKU) of the item. + * @type {string} + * @memberof Price + */ + SellerSKU?: string; + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof Price + */ + ASIN?: string; + /** + * + * @type {Product} + * @memberof Price + */ + Product?: Product; +} +/** + * + * @export + * @interface PriceType + */ +export interface PriceType { + /** + * + * @type {MoneyType} + * @memberof PriceType + */ + LandedPrice?: MoneyType; + /** + * + * @type {MoneyType} + * @memberof PriceType + */ + ListingPrice: MoneyType; + /** + * + * @type {MoneyType} + * @memberof PriceType + */ + Shipping?: MoneyType; + /** + * + * @type {Points} + * @memberof PriceType + */ + Points?: Points; +} +/** + * An item. + * @export + * @interface Product + */ +export interface Product { + /** + * + * @type {IdentifierType} + * @memberof Product + */ + Identifiers: IdentifierType; + /** + * A list of product attributes if they are applicable to the product that is returned. + * @type {Array} + * @memberof Product + */ + AttributeSets?: Array; + /** + * A list that contains product variation information, if applicable. + * @type {Array} + * @memberof Product + */ + Relationships?: Array; + /** + * + * @type {CompetitivePricingType} + * @memberof Product + */ + CompetitivePricing?: CompetitivePricingType; + /** + * A list of sales rank information for the item, by category. + * @type {Array} + * @memberof Product + */ + SalesRankings?: Array; + /** + * A list of offers. + * @type {Array} + * @memberof Product + */ + Offers?: Array; +} +/** + * + * @export + * @interface SalesRankType + */ +export interface SalesRankType { + /** + * Identifies the item category from which the sales rank is taken. + * @type {string} + * @memberof SalesRankType + */ + ProductCategoryId: string; + /** + * The sales rank of the item within the item category. + * @type {number} + * @memberof SalesRankType + */ + Rank: number; +} +/** + * Information about the seller\'s feedback, including the percentage of positive feedback, and the total number of ratings received. + * @export + * @interface SellerFeedbackType + */ +export interface SellerFeedbackType { + /** + * The percentage of positive feedback for the seller in the past 365 days. + * @type {number} + * @memberof SellerFeedbackType + */ + SellerPositiveFeedbackRating?: number; + /** + * The number of ratings received about the seller. + * @type {number} + * @memberof SellerFeedbackType + */ + FeedbackCount: number; +} +/** + * + * @export + * @interface SellerSKUIdentifier + */ +export interface SellerSKUIdentifier { + /** + * A marketplace identifier. + * @type {string} + * @memberof SellerSKUIdentifier + */ + MarketplaceId: string; + /** + * The seller identifier submitted for the operation. + * @type {string} + * @memberof SellerSKUIdentifier + */ + SellerId: string; + /** + * The seller stock keeping unit (SKU) of the item. + * @type {string} + * @memberof SellerSKUIdentifier + */ + SellerSKU: string; +} +/** + * The state and country from where the item is shipped. + * @export + * @interface ShipsFromType + */ +export interface ShipsFromType { + /** + * The state from where the item is shipped. + * @type {string} + * @memberof ShipsFromType + */ + State?: string; + /** + * The country from where the item is shipped. + * @type {string} + * @memberof ShipsFromType + */ + Country?: string; +} +/** + * Contains price information about the product, including the LowestPrices and BuyBoxPrices, the ListPrice, the SuggestedLowerPricePlusShipping, and NumberOfOffers and NumberOfBuyBoxEligibleOffers. + * @export + * @interface Summary + */ +export interface Summary { + /** + * The number of unique offers contained in NumberOfOffers. + * @type {number} + * @memberof Summary + */ + TotalOfferCount: number; + /** + * + * @type {Array} + * @memberof Summary + */ + NumberOfOffers?: Array; + /** + * + * @type {Array} + * @memberof Summary + */ + LowestPrices?: Array; + /** + * + * @type {Array} + * @memberof Summary + */ + BuyBoxPrices?: Array; + /** + * + * @type {MoneyType} + * @memberof Summary + */ + ListPrice?: MoneyType; + /** + * + * @type {MoneyType} + * @memberof Summary + */ + SuggestedLowerPricePlusShipping?: MoneyType; + /** + * + * @type {Array} + * @memberof Summary + */ + BuyBoxEligibleOffers?: Array; + /** + * When the status is ActiveButTooSoonForProcessing, this is the time when the offers will be available for processing. + * @type {string} + * @memberof Summary + */ + OffersAvailableTime?: string; +} + +/** + * ProductPricingApi - axios parameter creator + * @export + */ +export const ProductPricingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCompetitivePricing: async (marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getCompetitivePricing', 'marketplaceId', marketplaceId) + // verify required parameter 'itemType' is not null or undefined + assertParamExists('getCompetitivePricing', 'itemType', itemType) + const localVarPath = `/products/pricing/v0/competitivePrice`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (asins) { + localVarQueryParameter['Asins'] = asins.join(COLLECTION_FORMATS.csv); + } + + if (skus) { + localVarQueryParameter['Skus'] = skus.join(COLLECTION_FORMATS.csv); + } + + if (itemType !== undefined) { + localVarQueryParameter['ItemType'] = itemType; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getItemOffers: async (marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', asin: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getItemOffers', 'marketplaceId', marketplaceId) + // verify required parameter 'itemCondition' is not null or undefined + assertParamExists('getItemOffers', 'itemCondition', itemCondition) + // verify required parameter 'asin' is not null or undefined + assertParamExists('getItemOffers', 'asin', asin) + const localVarPath = `/products/pricing/v0/items/{Asin}/offers` + .replace(`{${"Asin"}}`, encodeURIComponent(String(asin))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (itemCondition !== undefined) { + localVarQueryParameter['ItemCondition'] = itemCondition; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getListingOffers: async (marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', sellerSKU: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getListingOffers', 'marketplaceId', marketplaceId) + // verify required parameter 'itemCondition' is not null or undefined + assertParamExists('getListingOffers', 'itemCondition', itemCondition) + // verify required parameter 'sellerSKU' is not null or undefined + assertParamExists('getListingOffers', 'sellerSKU', sellerSKU) + const localVarPath = `/products/pricing/v0/listings/{SellerSKU}/offers` + .replace(`{${"SellerSKU"}}`, encodeURIComponent(String(sellerSKU))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (itemCondition !== undefined) { + localVarQueryParameter['ItemCondition'] = itemCondition; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPricing: async (marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, itemCondition?: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', options: any = {}): Promise => { + // verify required parameter 'marketplaceId' is not null or undefined + assertParamExists('getPricing', 'marketplaceId', marketplaceId) + // verify required parameter 'itemType' is not null or undefined + assertParamExists('getPricing', 'itemType', itemType) + const localVarPath = `/products/pricing/v0/price`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceId !== undefined) { + localVarQueryParameter['MarketplaceId'] = marketplaceId; + } + + if (asins) { + localVarQueryParameter['Asins'] = asins.join(COLLECTION_FORMATS.csv); + } + + if (skus) { + localVarQueryParameter['Skus'] = skus.join(COLLECTION_FORMATS.csv); + } + + if (itemType !== undefined) { + localVarQueryParameter['ItemType'] = itemType; + } + + if (itemCondition !== undefined) { + localVarQueryParameter['ItemCondition'] = itemCondition; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProductPricingApi - functional programming interface + * @export + */ +export const ProductPricingApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ProductPricingApiAxiosParamCreator(configuration) + return { + /** + * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCompetitivePricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCompetitivePricing(marketplaceId, itemType, asins, skus, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getItemOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', asin: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getItemOffers(marketplaceId, itemCondition, asin, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getListingOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', sellerSKU: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getListingOffers(marketplaceId, itemCondition, sellerSKU, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, itemCondition?: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPricing(marketplaceId, itemType, asins, skus, itemCondition, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ProductPricingApi - factory interface + * @export + */ +export const ProductPricingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProductPricingApiFp(configuration) + return { + /** + * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCompetitivePricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, options?: any): AxiosPromise { + return localVarFp.getCompetitivePricing(marketplaceId, itemType, asins, skus, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getItemOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', asin: string, options?: any): AxiosPromise { + return localVarFp.getItemOffers(marketplaceId, itemCondition, asin, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getListingOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', sellerSKU: string, options?: any): AxiosPromise { + return localVarFp.getListingOffers(marketplaceId, itemCondition, sellerSKU, options).then((request) => request(axios, basePath)); + }, + /** + * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, itemCondition?: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', options?: any): AxiosPromise { + return localVarFp.getPricing(marketplaceId, itemType, asins, skus, itemCondition, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ProductPricingApi - object-oriented interface + * @export + * @class ProductPricingApi + * @extends {BaseAPI} + */ +export class ProductPricingApi extends BaseAPI { + /** + * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductPricingApi + */ + public getCompetitivePricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, options?: any) { + return ProductPricingApiFp(this.configuration).getCompetitivePricing(marketplaceId, itemType, asins, skus, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductPricingApi + */ + public getItemOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', asin: string, options?: any) { + return ProductPricingApiFp(this.configuration).getItemOffers(marketplaceId, itemCondition, asin, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductPricingApi + */ + public getListingOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', sellerSKU: string, options?: any) { + return ProductPricingApiFp(this.configuration).getListingOffers(marketplaceId, itemCondition, sellerSKU, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. + * @param {'Asin' | 'Sku'} itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. + * @param {Array} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. + * @param {Array} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace. + * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductPricingApi + */ + public getPricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array, skus?: Array, itemCondition?: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', options?: any) { + return ProductPricingApiFp(this.configuration).getPricing(marketplaceId, itemType, asins, skus, itemCondition, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/product-pricing-api-model/base.ts b/src/api-models/product-pricing-api-model/base.ts new file mode 100644 index 00000000..52c3534f --- /dev/null +++ b/src/api-models/product-pricing-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Pricing + * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/product-pricing-api-model/common.ts b/src/api-models/product-pricing-api-model/common.ts new file mode 100644 index 00000000..de1b28f6 --- /dev/null +++ b/src/api-models/product-pricing-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Pricing + * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/product-pricing-api-model/configuration.ts b/src/api-models/product-pricing-api-model/configuration.ts new file mode 100644 index 00000000..513ca2d3 --- /dev/null +++ b/src/api-models/product-pricing-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Pricing + * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/product-pricing-api-model/git_push.sh b/src/api-models/product-pricing-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/product-pricing-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/product-pricing-api-model/index.ts b/src/api-models/product-pricing-api-model/index.ts new file mode 100644 index 00000000..b88d67dd --- /dev/null +++ b/src/api-models/product-pricing-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Pricing + * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products. + * + * The version of the OpenAPI document: v0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/reports-api-model/.gitignore b/src/api-models/reports-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/reports-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/reports-api-model/.npmignore b/src/api-models/reports-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/reports-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/reports-api-model/.openapi-generator-ignore b/src/api-models/reports-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/reports-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/reports-api-model/.openapi-generator/FILES b/src/api-models/reports-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/reports-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/reports-api-model/.openapi-generator/VERSION b/src/api-models/reports-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/reports-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/reports-api-model/api.ts b/src/api-models/reports-api-model/api.ts new file mode 100644 index 00000000..e352a494 --- /dev/null +++ b/src/api-models/reports-api-model/api.ts @@ -0,0 +1,1208 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Reports + * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The response for the cancelReport operation. + * @export + * @interface CancelReportResponse + */ +export interface CancelReportResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelReportResponse + */ + errors?: Array; +} +/** + * The response for the cancelReportSchedule operation. + * @export + * @interface CancelReportScheduleResponse + */ +export interface CancelReportScheduleResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelReportScheduleResponse + */ + errors?: Array; +} +/** + * The response for the createReport operation. + * @export + * @interface CreateReportResponse + */ +export interface CreateReportResponse { + /** + * + * @type {CreateReportResult} + * @memberof CreateReportResponse + */ + payload?: CreateReportResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateReportResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface CreateReportResult + */ +export interface CreateReportResult { + /** + * The identifier for the report. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof CreateReportResult + */ + reportId: string; +} +/** + * The response for the createReportSchedule operation. + * @export + * @interface CreateReportScheduleResponse + */ +export interface CreateReportScheduleResponse { + /** + * + * @type {CreateReportScheduleResult} + * @memberof CreateReportScheduleResponse + */ + payload?: CreateReportScheduleResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateReportScheduleResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface CreateReportScheduleResult + */ +export interface CreateReportScheduleResult { + /** + * The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof CreateReportScheduleResult + */ + reportScheduleId: string; +} +/** + * + * @export + * @interface CreateReportScheduleSpecification + */ +export interface CreateReportScheduleSpecification { + /** + * The report type. + * @type {string} + * @memberof CreateReportScheduleSpecification + */ + reportType: string; + /** + * A list of marketplace identifiers for the report schedule. + * @type {Array} + * @memberof CreateReportScheduleSpecification + */ + marketplaceIds: Array; + /** + * Additional information passed to reports. This varies by report type. + * @type {{ [key: string]: string; }} + * @memberof CreateReportScheduleSpecification + */ + reportOptions?: { [key: string]: string; }; + /** + * One of a set of predefined ISO 8601 periods that specifies how often a report should be created. + * @type {string} + * @memberof CreateReportScheduleSpecification + */ + period: CreateReportScheduleSpecificationPeriodEnum; + /** + * The date and time when the schedule will create its next report, in ISO 8601 date time format. + * @type {string} + * @memberof CreateReportScheduleSpecification + */ + nextReportCreationTime?: string; +} + +/** + * @export + * @enum {string} + */ +export enum CreateReportScheduleSpecificationPeriodEnum { + Pt5M = 'PT5M', + Pt15M = 'PT15M', + Pt30M = 'PT30M', + Pt1H = 'PT1H', + Pt2H = 'PT2H', + Pt4H = 'PT4H', + Pt8H = 'PT8H', + Pt12H = 'PT12H', + P1D = 'P1D', + P2D = 'P2D', + P3D = 'P3D', + Pt84H = 'PT84H', + P7D = 'P7D', + P14D = 'P14D', + P15D = 'P15D', + P18D = 'P18D', + P30D = 'P30D', + P1M = 'P1M' +} + +/** + * + * @export + * @interface CreateReportSpecification + */ +export interface CreateReportSpecification { + /** + * Additional information passed to reports. This varies by report type. + * @type {{ [key: string]: string; }} + * @memberof CreateReportSpecification + */ + reportOptions?: { [key: string]: string; }; + /** + * The report type. + * @type {string} + * @memberof CreateReportSpecification + */ + reportType: string; + /** + * The start of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. + * @type {string} + * @memberof CreateReportSpecification + */ + dataStartTime?: string; + /** + * The end of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. + * @type {string} + * @memberof CreateReportSpecification + */ + dataEndTime?: string; + /** + * A list of marketplace identifiers. The report document\'s contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise. + * @type {Array} + * @memberof CreateReportSpecification + */ + marketplaceIds: Array; +} +/** + * Response schema. + * @export + * @interface GetReportDocumentResponse + */ +export interface GetReportDocumentResponse { + /** + * + * @type {ReportDocument} + * @memberof GetReportDocumentResponse + */ + payload?: ReportDocument; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetReportDocumentResponse + */ + errors?: Array; +} +/** + * The response for the getReport operation. + * @export + * @interface GetReportResponse + */ +export interface GetReportResponse { + /** + * + * @type {Report} + * @memberof GetReportResponse + */ + payload?: Report; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetReportResponse + */ + errors?: Array; +} +/** + * The response for the getReportSchedule operation. + * @export + * @interface GetReportScheduleResponse + */ +export interface GetReportScheduleResponse { + /** + * + * @type {ReportSchedule} + * @memberof GetReportScheduleResponse + */ + payload?: ReportSchedule; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetReportScheduleResponse + */ + errors?: Array; +} +/** + * The response for the getReportSchedules operation. + * @export + * @interface GetReportSchedulesResponse + */ +export interface GetReportSchedulesResponse { + /** + * + * @type {Array} + * @memberof GetReportSchedulesResponse + */ + payload?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetReportSchedulesResponse + */ + errors?: Array; +} +/** + * The response for the getReports operation. + * @export + * @interface GetReportsResponse + */ +export interface GetReportsResponse { + /** + * + * @type {Array} + * @memberof GetReportsResponse + */ + payload?: Array; + /** + * Returned when the number of results exceeds pageSize. To get the next page of results, call getReports with this token as the only parameter. + * @type {string} + * @memberof GetReportsResponse + */ + nextToken?: string; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetReportsResponse + */ + errors?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * + * @export + * @interface Report + */ +export interface Report { + /** + * A list of marketplace identifiers for the report. + * @type {Array} + * @memberof Report + */ + marketplaceIds?: Array; + /** + * The identifier for the report. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof Report + */ + reportId: string; + /** + * The report type. + * @type {string} + * @memberof Report + */ + reportType: string; + /** + * The start of a date and time range used for selecting the data to report. + * @type {string} + * @memberof Report + */ + dataStartTime?: string; + /** + * The end of a date and time range used for selecting the data to report. + * @type {string} + * @memberof Report + */ + dataEndTime?: string; + /** + * The identifier of the report schedule that created this report (if any). This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof Report + */ + reportScheduleId?: string; + /** + * The date and time when the report was created. + * @type {string} + * @memberof Report + */ + createdTime: string; + /** + * The processing status of the report. + * @type {string} + * @memberof Report + */ + processingStatus: ReportProcessingStatusEnum; + /** + * The date and time when the report processing started, in ISO 8601 date time format. + * @type {string} + * @memberof Report + */ + processingStartTime?: string; + /** + * The date and time when the report processing completed, in ISO 8601 date time format. + * @type {string} + * @memberof Report + */ + processingEndTime?: string; + /** + * The identifier for the report document. Pass this into the getReportDocument operation to get the information you will need to retrieve and decrypt the report document\'s contents. + * @type {string} + * @memberof Report + */ + reportDocumentId?: string; +} + +/** + * @export + * @enum {string} + */ +export enum ReportProcessingStatusEnum { + Cancelled = 'CANCELLED', + Done = 'DONE', + Fatal = 'FATAL', + InProgress = 'IN_PROGRESS', + InQueue = 'IN_QUEUE' +} + +/** + * + * @export + * @interface ReportDocument + */ +export interface ReportDocument { + /** + * The identifier for the report document. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof ReportDocument + */ + reportDocumentId: string; + /** + * A presigned URL for the report document. This URL expires after 5 minutes. + * @type {string} + * @memberof ReportDocument + */ + url: string; + /** + * + * @type {ReportDocumentEncryptionDetails} + * @memberof ReportDocument + */ + encryptionDetails: ReportDocumentEncryptionDetails; + /** + * If present, the report document contents have been compressed with the provided algorithm. + * @type {string} + * @memberof ReportDocument + */ + compressionAlgorithm?: ReportDocumentCompressionAlgorithmEnum; +} + +/** + * @export + * @enum {string} + */ +export enum ReportDocumentCompressionAlgorithmEnum { + Gzip = 'GZIP' +} + +/** + * Encryption details required for decryption of a report document\'s contents. + * @export + * @interface ReportDocumentEncryptionDetails + */ +export interface ReportDocumentEncryptionDetails { + /** + * The encryption standard required to decrypt the document contents. + * @type {string} + * @memberof ReportDocumentEncryptionDetails + */ + standard: ReportDocumentEncryptionDetailsStandardEnum; + /** + * The vector to decrypt the document contents using Cipher Block Chaining (CBC). + * @type {string} + * @memberof ReportDocumentEncryptionDetails + */ + initializationVector: string; + /** + * The encryption key used to decrypt the document contents. + * @type {string} + * @memberof ReportDocumentEncryptionDetails + */ + key: string; +} + +/** + * @export + * @enum {string} + */ +export enum ReportDocumentEncryptionDetailsStandardEnum { + Aes = 'AES' +} + +/** + * Detailed information about a report schedule. + * @export + * @interface ReportSchedule + */ +export interface ReportSchedule { + /** + * The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @type {string} + * @memberof ReportSchedule + */ + reportScheduleId: string; + /** + * The report type. + * @type {string} + * @memberof ReportSchedule + */ + reportType: string; + /** + * A list of marketplace identifiers. The report document\'s contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise. + * @type {Array} + * @memberof ReportSchedule + */ + marketplaceIds?: Array; + /** + * Additional information passed to reports. This varies by report type. + * @type {{ [key: string]: string; }} + * @memberof ReportSchedule + */ + reportOptions?: { [key: string]: string; }; + /** + * An ISO 8601 period value that indicates how often a report should be created. + * @type {string} + * @memberof ReportSchedule + */ + period: string; + /** + * The date and time when the schedule will create its next report, in ISO 8601 date time format. + * @type {string} + * @memberof ReportSchedule + */ + nextReportCreationTime?: string; +} + +/** + * ReportsApi - axios parameter creator + * @export + */ +export const ReportsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelReport: async (reportId: string, options: any = {}): Promise => { + // verify required parameter 'reportId' is not null or undefined + assertParamExists('cancelReport', 'reportId', reportId) + const localVarPath = `/reports/2020-09-04/reports/{reportId}` + .replace(`{${"reportId"}}`, encodeURIComponent(String(reportId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelReportSchedule: async (reportScheduleId: string, options: any = {}): Promise => { + // verify required parameter 'reportScheduleId' is not null or undefined + assertParamExists('cancelReportSchedule', 'reportScheduleId', reportScheduleId) + const localVarPath = `/reports/2020-09-04/schedules/{reportScheduleId}` + .replace(`{${"reportScheduleId"}}`, encodeURIComponent(String(reportScheduleId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReport: async (body: CreateReportSpecification, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createReport', 'body', body) + const localVarPath = `/reports/2020-09-04/reports`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportScheduleSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReportSchedule: async (body: CreateReportScheduleSpecification, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createReportSchedule', 'body', body) + const localVarPath = `/reports/2020-09-04/schedules`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReport: async (reportId: string, options: any = {}): Promise => { + // verify required parameter 'reportId' is not null or undefined + assertParamExists('getReport', 'reportId', reportId) + const localVarPath = `/reports/2020-09-04/reports/{reportId}` + .replace(`{${"reportId"}}`, encodeURIComponent(String(reportId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the information required for retrieving a report document\'s contents. This includes a presigned URL for the report document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportDocumentId The identifier for the report document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReportDocument: async (reportDocumentId: string, options: any = {}): Promise => { + // verify required parameter 'reportDocumentId' is not null or undefined + assertParamExists('getReportDocument', 'reportDocumentId', reportDocumentId) + const localVarPath = `/reports/2020-09-04/documents/{reportDocumentId}` + .replace(`{${"reportDocumentId"}}`, encodeURIComponent(String(reportDocumentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReportSchedule: async (reportScheduleId: string, options: any = {}): Promise => { + // verify required parameter 'reportScheduleId' is not null or undefined + assertParamExists('getReportSchedule', 'reportScheduleId', reportScheduleId) + const localVarPath = `/reports/2020-09-04/schedules/{reportScheduleId}` + .replace(`{${"reportScheduleId"}}`, encodeURIComponent(String(reportScheduleId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} reportTypes A list of report types used to filter report schedules. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReportSchedules: async (reportTypes: Array, options: any = {}): Promise => { + // verify required parameter 'reportTypes' is not null or undefined + assertParamExists('getReportSchedules', 'reportTypes', reportTypes) + const localVarPath = `/reports/2020-09-04/schedules`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (reportTypes) { + localVarQueryParameter['reportTypes'] = reportTypes.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [reportTypes] A list of report types used to filter reports. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter reports. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of reports to return in a single call. + * @param {string} [createdSince] The earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getReports operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReports: async (reportTypes?: Array, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, marketplaceIds?: Array, pageSize?: number, createdSince?: string, createdUntil?: string, nextToken?: string, options: any = {}): Promise => { + const localVarPath = `/reports/2020-09-04/reports`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (reportTypes) { + localVarQueryParameter['reportTypes'] = reportTypes.join(COLLECTION_FORMATS.csv); + } + + if (processingStatuses) { + localVarQueryParameter['processingStatuses'] = processingStatuses.join(COLLECTION_FORMATS.csv); + } + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + if (createdSince !== undefined) { + localVarQueryParameter['createdSince'] = (createdSince as any instanceof Date) ? + (createdSince as any).toISOString() : + createdSince; + } + + if (createdUntil !== undefined) { + localVarQueryParameter['createdUntil'] = (createdUntil as any instanceof Date) ? + (createdUntil as any).toISOString() : + createdUntil; + } + + if (nextToken !== undefined) { + localVarQueryParameter['nextToken'] = nextToken; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReportsApi - functional programming interface + * @export + */ +export const ReportsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReportsApiAxiosParamCreator(configuration) + return { + /** + * Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelReport(reportId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelReport(reportId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelReportSchedule(reportScheduleId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelReportSchedule(reportScheduleId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createReport(body: CreateReportSpecification, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createReport(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportScheduleSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createReportSchedule(body: CreateReportScheduleSpecification, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createReportSchedule(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getReport(reportId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReport(reportId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the information required for retrieving a report document\'s contents. This includes a presigned URL for the report document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportDocumentId The identifier for the report document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getReportDocument(reportDocumentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReportDocument(reportDocumentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getReportSchedule(reportScheduleId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReportSchedule(reportScheduleId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} reportTypes A list of report types used to filter report schedules. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getReportSchedules(reportTypes: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReportSchedules(reportTypes, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [reportTypes] A list of report types used to filter reports. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter reports. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of reports to return in a single call. + * @param {string} [createdSince] The earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getReports operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getReports(reportTypes?: Array, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, marketplaceIds?: Array, pageSize?: number, createdSince?: string, createdUntil?: string, nextToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReports(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ReportsApi - factory interface + * @export + */ +export const ReportsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReportsApiFp(configuration) + return { + /** + * Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelReport(reportId: string, options?: any): AxiosPromise { + return localVarFp.cancelReport(reportId, options).then((request) => request(axios, basePath)); + }, + /** + * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelReportSchedule(reportScheduleId: string, options?: any): AxiosPromise { + return localVarFp.cancelReportSchedule(reportScheduleId, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReport(body: CreateReportSpecification, options?: any): AxiosPromise { + return localVarFp.createReport(body, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportScheduleSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReportSchedule(body: CreateReportScheduleSpecification, options?: any): AxiosPromise { + return localVarFp.createReportSchedule(body, options).then((request) => request(axios, basePath)); + }, + /** + * Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReport(reportId: string, options?: any): AxiosPromise { + return localVarFp.getReport(reportId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the information required for retrieving a report document\'s contents. This includes a presigned URL for the report document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportDocumentId The identifier for the report document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReportDocument(reportDocumentId: string, options?: any): AxiosPromise { + return localVarFp.getReportDocument(reportDocumentId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReportSchedule(reportScheduleId: string, options?: any): AxiosPromise { + return localVarFp.getReportSchedule(reportScheduleId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} reportTypes A list of report types used to filter report schedules. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReportSchedules(reportTypes: Array, options?: any): AxiosPromise { + return localVarFp.getReportSchedules(reportTypes, options).then((request) => request(axios, basePath)); + }, + /** + * Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [reportTypes] A list of report types used to filter reports. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter reports. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of reports to return in a single call. + * @param {string} [createdSince] The earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getReports operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReports(reportTypes?: Array, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, marketplaceIds?: Array, pageSize?: number, createdSince?: string, createdUntil?: string, nextToken?: string, options?: any): AxiosPromise { + return localVarFp.getReports(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ReportsApi - object-oriented interface + * @export + * @class ReportsApi + * @extends {BaseAPI} + */ +export class ReportsApi extends BaseAPI { + /** + * Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public cancelReport(reportId: string, options?: any) { + return ReportsApiFp(this.configuration).cancelReport(reportId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public cancelReportSchedule(reportScheduleId: string, options?: any) { + return ReportsApiFp(this.configuration).cancelReportSchedule(reportScheduleId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public createReport(body: CreateReportSpecification, options?: any) { + return ReportsApiFp(this.configuration).createReport(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateReportScheduleSpecification} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public createReportSchedule(body: CreateReportScheduleSpecification, options?: any) { + return ReportsApiFp(this.configuration).createReportSchedule(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public getReport(reportId: string, options?: any) { + return ReportsApiFp(this.configuration).getReport(reportId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the information required for retrieving a report document\'s contents. This includes a presigned URL for the report document as well as the information required to decrypt the document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportDocumentId The identifier for the report document. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public getReportDocument(reportDocumentId: string, options?: any) { + return ReportsApiFp(this.configuration).getReportDocument(reportDocumentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public getReportSchedule(reportScheduleId: string, options?: any) { + return ReportsApiFp(this.configuration).getReportSchedule(reportScheduleId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} reportTypes A list of report types used to filter report schedules. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public getReportSchedules(reportTypes: Array, options?: any) { + return ReportsApiFp(this.configuration).getReportSchedules(reportTypes, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} [reportTypes] A list of report types used to filter reports. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. + * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter reports. + * @param {Array} [marketplaceIds] A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. + * @param {number} [pageSize] The maximum number of reports to return in a single call. + * @param {string} [createdSince] The earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. + * @param {string} [createdUntil] The latest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is now. + * @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getReports operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportsApi + */ + public getReports(reportTypes?: Array, processingStatuses?: Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>, marketplaceIds?: Array, pageSize?: number, createdSince?: string, createdUntil?: string, nextToken?: string, options?: any) { + return ReportsApiFp(this.configuration).getReports(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/reports-api-model/base.ts b/src/api-models/reports-api-model/base.ts new file mode 100644 index 00000000..2288dd5c --- /dev/null +++ b/src/api-models/reports-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Reports + * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/reports-api-model/common.ts b/src/api-models/reports-api-model/common.ts new file mode 100644 index 00000000..cc89ce97 --- /dev/null +++ b/src/api-models/reports-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Reports + * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/reports-api-model/configuration.ts b/src/api-models/reports-api-model/configuration.ts new file mode 100644 index 00000000..1312b05a --- /dev/null +++ b/src/api-models/reports-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Reports + * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/reports-api-model/git_push.sh b/src/api-models/reports-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/reports-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/reports-api-model/index.ts b/src/api-models/reports-api-model/index.ts new file mode 100644 index 00000000..ea3689d6 --- /dev/null +++ b/src/api-models/reports-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Reports + * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. + * + * The version of the OpenAPI document: 2020-09-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/sales-api-model/.gitignore b/src/api-models/sales-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/sales-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/sales-api-model/.npmignore b/src/api-models/sales-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/sales-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/sales-api-model/.openapi-generator-ignore b/src/api-models/sales-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/sales-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/sales-api-model/.openapi-generator/FILES b/src/api-models/sales-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/sales-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/sales-api-model/.openapi-generator/VERSION b/src/api-models/sales-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/sales-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/sales-api-model/api.ts b/src/api-models/sales-api-model/api.ts new file mode 100644 index 00000000..b919765d --- /dev/null +++ b/src/api-models/sales-api-model/api.ts @@ -0,0 +1,302 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sales + * The Selling Partner API for Sales provides APIs related to sales performance. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The response schema for the getOrderMetrics operation. + * @export + * @interface GetOrderMetricsResponse + */ +export interface GetOrderMetricsResponse { + /** + * A set of order metrics, each scoped to a particular time interval. + * @type {Array} + * @memberof GetOrderMetricsResponse + */ + payload?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetOrderMetricsResponse + */ + errors?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occured. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The currency type and the amount. + * @export + * @interface Money + */ +export interface Money { + /** + * Three-digit currency code. In ISO 4217 format. + * @type {string} + * @memberof Money + */ + currencyCode: string; + /** + * A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation.
**Pattern** : `^-?(0|([1-9]\\d*))(\\.\\d+)?([eE][+-]?\\d+)?$`. + * @type {string} + * @memberof Money + */ + amount: string; +} +/** + * Contains order metrics. + * @export + * @interface OrderMetricsInterval + */ +export interface OrderMetricsInterval { + /** + * The interval of time based on requested granularity (ex. Hour, Day, etc.) If this is the first or the last interval from the list, it might contain incomplete data if the requested interval doesn\'t align with the requested granularity (ex. request interval 2018-09-01T02:00:00Z--2018-09-04T19:00:00Z and granularity day will result in Sept 1st UTC day and Sept 4th UTC days having partial data). + * @type {string} + * @memberof OrderMetricsInterval + */ + interval: string; + /** + * The number of units in orders based on the specified filters. + * @type {number} + * @memberof OrderMetricsInterval + */ + unitCount: number; + /** + * The number of order items based on the specified filters. + * @type {number} + * @memberof OrderMetricsInterval + */ + orderItemCount: number; + /** + * The number of orders based on the specified filters. + * @type {number} + * @memberof OrderMetricsInterval + */ + orderCount: number; + /** + * + * @type {Money} + * @memberof OrderMetricsInterval + */ + averageUnitPrice: Money; + /** + * + * @type {Money} + * @memberof OrderMetricsInterval + */ + totalSales: Money; +} + +/** + * SalesApi - axios parameter creator + * @export + */ +export const SalesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. + * @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. + * @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. + * @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. + * @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. + * @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. + * @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. + * @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. + * @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderMetrics: async (marketplaceIds: Array, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string, buyerType?: 'B2B' | 'B2C' | 'All', fulfillmentNetwork?: string, firstDayOfWeek?: 'Monday' | 'Sunday', asin?: string, sku?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getOrderMetrics', 'marketplaceIds', marketplaceIds) + // verify required parameter 'interval' is not null or undefined + assertParamExists('getOrderMetrics', 'interval', interval) + // verify required parameter 'granularity' is not null or undefined + assertParamExists('getOrderMetrics', 'granularity', granularity) + const localVarPath = `/sales/v1/orderMetrics`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + if (interval !== undefined) { + localVarQueryParameter['interval'] = interval; + } + + if (granularityTimeZone !== undefined) { + localVarQueryParameter['granularityTimeZone'] = granularityTimeZone; + } + + if (granularity !== undefined) { + localVarQueryParameter['granularity'] = granularity; + } + + if (buyerType !== undefined) { + localVarQueryParameter['buyerType'] = buyerType; + } + + if (fulfillmentNetwork !== undefined) { + localVarQueryParameter['fulfillmentNetwork'] = fulfillmentNetwork; + } + + if (firstDayOfWeek !== undefined) { + localVarQueryParameter['firstDayOfWeek'] = firstDayOfWeek; + } + + if (asin !== undefined) { + localVarQueryParameter['asin'] = asin; + } + + if (sku !== undefined) { + localVarQueryParameter['sku'] = sku; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SalesApi - functional programming interface + * @export + */ +export const SalesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SalesApiAxiosParamCreator(configuration) + return { + /** + * Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. + * @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. + * @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. + * @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. + * @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. + * @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. + * @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. + * @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. + * @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderMetrics(marketplaceIds: Array, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string, buyerType?: 'B2B' | 'B2C' | 'All', fulfillmentNetwork?: string, firstDayOfWeek?: 'Monday' | 'Sunday', asin?: string, sku?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SalesApi - factory interface + * @export + */ +export const SalesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SalesApiFp(configuration) + return { + /** + * Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. + * @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. + * @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. + * @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. + * @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. + * @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. + * @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. + * @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. + * @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderMetrics(marketplaceIds: Array, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string, buyerType?: 'B2B' | 'B2C' | 'All', fulfillmentNetwork?: string, firstDayOfWeek?: 'Monday' | 'Sunday', asin?: string, sku?: string, options?: any): AxiosPromise { + return localVarFp.getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SalesApi - object-oriented interface + * @export + * @class SalesApi + * @extends {BaseAPI} + */ +export class SalesApi extends BaseAPI { + /** + * Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. + * @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. + * @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. + * @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. + * @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. + * @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. + * @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. + * @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. + * @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SalesApi + */ + public getOrderMetrics(marketplaceIds: Array, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string, buyerType?: 'B2B' | 'B2C' | 'All', fulfillmentNetwork?: string, firstDayOfWeek?: 'Monday' | 'Sunday', asin?: string, sku?: string, options?: any) { + return SalesApiFp(this.configuration).getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/sales-api-model/base.ts b/src/api-models/sales-api-model/base.ts new file mode 100644 index 00000000..4e1cd2f8 --- /dev/null +++ b/src/api-models/sales-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sales + * The Selling Partner API for Sales provides APIs related to sales performance. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/sales-api-model/common.ts b/src/api-models/sales-api-model/common.ts new file mode 100644 index 00000000..ec98ccd4 --- /dev/null +++ b/src/api-models/sales-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sales + * The Selling Partner API for Sales provides APIs related to sales performance. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/sales-api-model/configuration.ts b/src/api-models/sales-api-model/configuration.ts new file mode 100644 index 00000000..3a671442 --- /dev/null +++ b/src/api-models/sales-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sales + * The Selling Partner API for Sales provides APIs related to sales performance. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/sales-api-model/git_push.sh b/src/api-models/sales-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/sales-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/sales-api-model/index.ts b/src/api-models/sales-api-model/index.ts new file mode 100644 index 00000000..97cc0e91 --- /dev/null +++ b/src/api-models/sales-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sales + * The Selling Partner API for Sales provides APIs related to sales performance. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/sellers-api-model/.gitignore b/src/api-models/sellers-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/sellers-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/sellers-api-model/.npmignore b/src/api-models/sellers-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/sellers-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/sellers-api-model/.openapi-generator-ignore b/src/api-models/sellers-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/sellers-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/sellers-api-model/.openapi-generator/FILES b/src/api-models/sellers-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/sellers-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/sellers-api-model/.openapi-generator/VERSION b/src/api-models/sellers-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/sellers-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/sellers-api-model/api.ts b/src/api-models/sellers-api-model/api.ts new file mode 100644 index 00000000..69413d66 --- /dev/null +++ b/src/api-models/sellers-api-model/api.ts @@ -0,0 +1,243 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sellers + * The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The response schema for the getMarketplaceParticipations operation. + * @export + * @interface GetMarketplaceParticipationsResponse + */ +export interface GetMarketplaceParticipationsResponse { + /** + * List of marketplace participations. + * @type {Array} + * @memberof GetMarketplaceParticipationsResponse + */ + payload?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetMarketplaceParticipationsResponse + */ + errors?: Array; +} +/** + * Detailed information about an Amazon market where a seller can list items for sale and customers can view and purchase items. + * @export + * @interface Marketplace + */ +export interface Marketplace { + /** + * The encrypted marketplace value. + * @type {string} + * @memberof Marketplace + */ + id: string; + /** + * Marketplace name. + * @type {string} + * @memberof Marketplace + */ + name: string; + /** + * The ISO 3166-1 alpha-2 format country code of the marketplace. + * @type {string} + * @memberof Marketplace + */ + countryCode: string; + /** + * The ISO 4217 format currency code of the marketplace. + * @type {string} + * @memberof Marketplace + */ + defaultCurrencyCode: string; + /** + * The ISO 639-1 format language code of the marketplace. + * @type {string} + * @memberof Marketplace + */ + defaultLanguageCode: string; + /** + * The domain name of the marketplace. + * @type {string} + * @memberof Marketplace + */ + domainName: string; +} +/** + * + * @export + * @interface MarketplaceParticipation + */ +export interface MarketplaceParticipation { + /** + * + * @type {Marketplace} + * @memberof MarketplaceParticipation + */ + marketplace: Marketplace; + /** + * + * @type {Participation} + * @memberof MarketplaceParticipation + */ + participation: Participation; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occured. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * Detailed information that is specific to a seller in a Marketplace. + * @export + * @interface Participation + */ +export interface Participation { + /** + * + * @type {boolean} + * @memberof Participation + */ + isParticipating: boolean; + /** + * Specifies if the seller has suspended listings. True if the seller Listing Status is set to Inactive, otherwise False. + * @type {boolean} + * @memberof Participation + */ + hasSuspendedListings: boolean; +} + +/** + * SellersApi - axios parameter creator + * @export + */ +export const SellersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMarketplaceParticipations: async (options: any = {}): Promise => { + const localVarPath = `/sellers/v1/marketplaceParticipations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SellersApi - functional programming interface + * @export + */ +export const SellersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SellersApiAxiosParamCreator(configuration) + return { + /** + * Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMarketplaceParticipations(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMarketplaceParticipations(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SellersApi - factory interface + * @export + */ +export const SellersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SellersApiFp(configuration) + return { + /** + * Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMarketplaceParticipations(options?: any): AxiosPromise { + return localVarFp.getMarketplaceParticipations(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SellersApi - object-oriented interface + * @export + * @class SellersApi + * @extends {BaseAPI} + */ +export class SellersApi extends BaseAPI { + /** + * Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SellersApi + */ + public getMarketplaceParticipations(options?: any) { + return SellersApiFp(this.configuration).getMarketplaceParticipations(options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/sellers-api-model/base.ts b/src/api-models/sellers-api-model/base.ts new file mode 100644 index 00000000..416794fa --- /dev/null +++ b/src/api-models/sellers-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sellers + * The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/sellers-api-model/common.ts b/src/api-models/sellers-api-model/common.ts new file mode 100644 index 00000000..da19c704 --- /dev/null +++ b/src/api-models/sellers-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sellers + * The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/sellers-api-model/configuration.ts b/src/api-models/sellers-api-model/configuration.ts new file mode 100644 index 00000000..8a96b2f4 --- /dev/null +++ b/src/api-models/sellers-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sellers + * The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/sellers-api-model/git_push.sh b/src/api-models/sellers-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/sellers-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/sellers-api-model/index.ts b/src/api-models/sellers-api-model/index.ts new file mode 100644 index 00000000..6cd380af --- /dev/null +++ b/src/api-models/sellers-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Sellers + * The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/services-api-model/.gitignore b/src/api-models/services-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/services-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/services-api-model/.npmignore b/src/api-models/services-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/services-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/services-api-model/.openapi-generator-ignore b/src/api-models/services-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/services-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/services-api-model/.openapi-generator/FILES b/src/api-models/services-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/services-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/services-api-model/.openapi-generator/VERSION b/src/api-models/services-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/services-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/services-api-model/api.ts b/src/api-models/services-api-model/api.ts new file mode 100644 index 00000000..4c88291c --- /dev/null +++ b/src/api-models/services-api-model/api.ts @@ -0,0 +1,1342 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Services + * With the Services API, you can build applications that help service providers get and modify their service orders. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Input for add appointment operation. + * @export + * @interface AddAppointmentRequest + */ +export interface AddAppointmentRequest { + /** + * + * @type {AppointmentTimeInput} + * @memberof AddAppointmentRequest + */ + appointmentTime: AppointmentTimeInput; +} +/** + * The shipping address for the service job. + * @export + * @interface Address + */ +export interface Address { + /** + * The name of the person, business, or institution. + * @type {string} + * @memberof Address + */ + name: string; + /** + * The first line of the address. + * @type {string} + * @memberof Address + */ + addressLine1: string; + /** + * Additional address information, if required. + * @type {string} + * @memberof Address + */ + addressLine2?: string; + /** + * Additional address information, if required. + * @type {string} + * @memberof Address + */ + addressLine3?: string; + /** + * The city. + * @type {string} + * @memberof Address + */ + city?: string; + /** + * The county. + * @type {string} + * @memberof Address + */ + county?: string; + /** + * The district. + * @type {string} + * @memberof Address + */ + district?: string; + /** + * The state or region. + * @type {string} + * @memberof Address + */ + stateOrRegion?: string; + /** + * The postal code. This can contain letters, digits, spaces, and/or punctuation. + * @type {string} + * @memberof Address + */ + postalCode?: string; + /** + * The two digit country code, in ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Address + */ + countryCode?: string; + /** + * The phone number. + * @type {string} + * @memberof Address + */ + phone?: string; +} +/** + * The details of an appointment. + * @export + * @interface Appointment + */ +export interface Appointment { + /** + * The appointment identifier. + * @type {string} + * @memberof Appointment + */ + appointmentId?: string; + /** + * The status of the appointment. + * @type {string} + * @memberof Appointment + */ + appointmentStatus?: AppointmentAppointmentStatusEnum; + /** + * + * @type {AppointmentTime} + * @memberof Appointment + */ + appointmentTime?: AppointmentTime; + /** + * A list of technicians assigned to the service job. + * @type {Array} + * @memberof Appointment + */ + assignedTechnicians?: Array; + /** + * The appointment identifier. + * @type {string} + * @memberof Appointment + */ + rescheduledAppointmentId?: string; + /** + * + * @type {Poa} + * @memberof Appointment + */ + poa?: Poa; +} + +/** + * @export + * @enum {string} + */ +export enum AppointmentAppointmentStatusEnum { + Active = 'ACTIVE', + Cancelled = 'CANCELLED', + Completed = 'COMPLETED' +} + +/** + * The time of the appointment window. + * @export + * @interface AppointmentTime + */ +export interface AppointmentTime { + /** + * The date and time of the start of the appointment window, in ISO 8601 format. + * @type {string} + * @memberof AppointmentTime + */ + startTime: string; + /** + * The duration of the appointment window, in minutes. + * @type {number} + * @memberof AppointmentTime + */ + durationInMinutes: number; +} +/** + * The input appointment time details. + * @export + * @interface AppointmentTimeInput + */ +export interface AppointmentTimeInput { + /** + * The date, time in UTC for the start time of an appointment in ISO 8601 format. + * @type {string} + * @memberof AppointmentTimeInput + */ + startTime: string; + /** + * The duration of an appointment in minutes. + * @type {number} + * @memberof AppointmentTimeInput + */ + durationInMinutes?: number; +} +/** + * Information about an item associated with the service job. + * @export + * @interface AssociatedItem + */ +export interface AssociatedItem { + /** + * The Amazon Standard Identification Number (ASIN) of the item. + * @type {string} + * @memberof AssociatedItem + */ + asin?: string; + /** + * The title of the item. + * @type {string} + * @memberof AssociatedItem + */ + title?: string; + /** + * The total number of items included in the order. + * @type {number} + * @memberof AssociatedItem + */ + quantity?: number; + /** + * The Amazon-defined identifier for an order placed by the buyer, in 3-7-7 format. + * @type {string} + * @memberof AssociatedItem + */ + orderId?: string; + /** + * The status of the item. + * @type {string} + * @memberof AssociatedItem + */ + itemStatus?: AssociatedItemItemStatusEnum; + /** + * The brand name of the item. + * @type {string} + * @memberof AssociatedItem + */ + brandName?: string; + /** + * + * @type {ItemDelivery} + * @memberof AssociatedItem + */ + itemDelivery?: ItemDelivery; +} + +/** + * @export + * @enum {string} + */ +export enum AssociatedItemItemStatusEnum { + Active = 'ACTIVE', + Cancelled = 'CANCELLED', + Shipped = 'SHIPPED', + Delivered = 'DELIVERED' +} + +/** + * Information about the buyer. + * @export + * @interface Buyer + */ +export interface Buyer { + /** + * The identifier of the buyer. + * @type {string} + * @memberof Buyer + */ + buyerId?: string; + /** + * The name of the buyer. + * @type {string} + * @memberof Buyer + */ + name?: string; + /** + * The phone number of the buyer. + * @type {string} + * @memberof Buyer + */ + phone?: string; + /** + * When true, the service is for an Amazon Prime buyer. + * @type {boolean} + * @memberof Buyer + */ + isPrimeMember?: boolean; +} +/** + * Response schema for CancelServiceJobByServiceJobId operation. + * @export + * @interface CancelServiceJobByServiceJobIdResponse + */ +export interface CancelServiceJobByServiceJobIdResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelServiceJobByServiceJobIdResponse + */ + errors?: Array; +} +/** + * Response schema for CompleteServiceJobByServiceJobId operation. + * @export + * @interface CompleteServiceJobByServiceJobIdResponse + */ +export interface CompleteServiceJobByServiceJobIdResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CompleteServiceJobByServiceJobIdResponse + */ + errors?: Array; +} +/** + * The response schema for the GetServiceJobByServiceJobId operation. + * @export + * @interface GetServiceJobByServiceJobIdResponse + */ +export interface GetServiceJobByServiceJobIdResponse { + /** + * + * @type {ServiceJob} + * @memberof GetServiceJobByServiceJobIdResponse + */ + payload?: ServiceJob; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetServiceJobByServiceJobIdResponse + */ + errors?: Array; +} +/** + * Response schema for GetJobs operation. + * @export + * @interface GetServiceJobsResponse + */ +export interface GetServiceJobsResponse { + /** + * + * @type {JobListing} + * @memberof GetServiceJobsResponse + */ + payload?: JobListing; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetServiceJobsResponse + */ + errors?: Array; +} +/** + * Delivery information for the item. + * @export + * @interface ItemDelivery + */ +export interface ItemDelivery { + /** + * The date and time of the latest Estimated Delivery Date (EDD) of all the items with an EDD. In ISO 8601 format. + * @type {string} + * @memberof ItemDelivery + */ + estimatedDeliveryDate?: string; + /** + * + * @type {ItemDeliveryPromise} + * @memberof ItemDelivery + */ + itemDeliveryPromise?: ItemDeliveryPromise; +} +/** + * Promised delivery information for the item. + * @export + * @interface ItemDeliveryPromise + */ +export interface ItemDeliveryPromise { + /** + * The date and time of the start of the promised delivery window, in ISO 8601 format. + * @type {string} + * @memberof ItemDeliveryPromise + */ + startTime?: string; + /** + * The date and time of the end of the promised delivery window, in ISO 8601 format. + * @type {string} + * @memberof ItemDeliveryPromise + */ + endTime?: string; +} +/** + * The payload for the GetJobs operation. + * @export + * @interface JobListing + */ +export interface JobListing { + /** + * Total result size of the query result. + * @type {number} + * @memberof JobListing + */ + totalResultSize?: number; + /** + * A generated string used to pass information to your next request.If nextPageToken is returned, pass the value of nextPageToken to the pageToken to get next results. + * @type {string} + * @memberof JobListing + */ + nextPageToken?: string; + /** + * A generated string used to pass information to your next request.If previousPageToken is returned, pass the value of previousPageToken to the pageToken to get previous page results. + * @type {string} + * @memberof JobListing + */ + previousPageToken?: string; + /** + * List of job details for the given input. + * @type {Array} + * @memberof JobListing + */ + jobs?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; + /** + * The type of error. + * @type {string} + * @memberof ModelError + */ + errorLevel?: ModelErrorErrorLevelEnum; +} + +/** + * @export + * @enum {string} + */ +export enum ModelErrorErrorLevelEnum { + Error = 'ERROR', + Warning = 'WARNING' +} + +/** + * Proof of Appointment (POA) details. + * @export + * @interface Poa + */ +export interface Poa { + /** + * + * @type {AppointmentTime} + * @memberof Poa + */ + appointmentTime?: AppointmentTime; + /** + * A list of technicians. + * @type {Array} + * @memberof Poa + */ + technicians?: Array; + /** + * The identifier of the technician who uploaded the POA. + * @type {string} + * @memberof Poa + */ + uploadingTechnician?: string; + /** + * The date and time when the POA was uploaded, in ISO 8601 format. + * @type {string} + * @memberof Poa + */ + uploadTime?: string; + /** + * The type of POA uploaded. + * @type {string} + * @memberof Poa + */ + poaType?: PoaPoaTypeEnum; +} + +/** + * @export + * @enum {string} + */ +export enum PoaPoaTypeEnum { + NoSignatureDummyPos = 'NO_SIGNATURE_DUMMY_POS', + CustomerSignature = 'CUSTOMER_SIGNATURE', + DummyReceipt = 'DUMMY_RECEIPT', + PoaReceipt = 'POA_RECEIPT' +} + +/** + * Input for rescheduled appointment operation. + * @export + * @interface RescheduleAppointmentRequest + */ +export interface RescheduleAppointmentRequest { + /** + * + * @type {AppointmentTimeInput} + * @memberof RescheduleAppointmentRequest + */ + appointmentTime: AppointmentTimeInput; + /** + * Appointment reschedule reason code. + * @type {string} + * @memberof RescheduleAppointmentRequest + */ + rescheduleReasonCode: string; +} +/** + * The scope of work for the order. + * @export + * @interface ScopeOfWork + */ +export interface ScopeOfWork { + /** + * The Amazon Standard Identification Number (ASIN) of the service job. + * @type {string} + * @memberof ScopeOfWork + */ + asin?: string; + /** + * The title of the service job. + * @type {string} + * @memberof ScopeOfWork + */ + title?: string; + /** + * The number of service jobs. + * @type {number} + * @memberof ScopeOfWork + */ + quantity?: number; + /** + * A list of skills required to perform the job. + * @type {Array} + * @memberof ScopeOfWork + */ + requiredSkills?: Array; +} +/** + * Information about the seller of the service job. + * @export + * @interface Seller + */ +export interface Seller { + /** + * The identifier of the seller of the service job. + * @type {string} + * @memberof Seller + */ + sellerId?: string; +} +/** + * The job details of a service. + * @export + * @interface ServiceJob + */ +export interface ServiceJob { + /** + * The date and time of the creation of the job, in ISO 8601 format. + * @type {string} + * @memberof ServiceJob + */ + createTime?: string; + /** + * Amazon identifier for the service job. + * @type {string} + * @memberof ServiceJob + */ + serviceJobId?: string; + /** + * The status of the service job. + * @type {string} + * @memberof ServiceJob + */ + serviceJobStatus?: ServiceJobServiceJobStatusEnum; + /** + * + * @type {ScopeOfWork} + * @memberof ServiceJob + */ + scopeOfWork?: ScopeOfWork; + /** + * + * @type {Seller} + * @memberof ServiceJob + */ + seller?: Seller; + /** + * + * @type {ServiceJobProvider} + * @memberof ServiceJob + */ + serviceJobProvider?: ServiceJobProvider; + /** + * A list of appointment windows preferred by the buyer. Included only if the buyer selected appointment windows when creating the order. + * @type {Array} + * @memberof ServiceJob + */ + preferredAppointmentTimes?: Array; + /** + * A list of appointments. + * @type {Array} + * @memberof ServiceJob + */ + appointments?: Array; + /** + * The Amazon-defined identifier for an order placed by the buyer, in 3-7-7 format. + * @type {string} + * @memberof ServiceJob + */ + serviceOrderId?: string; + /** + * The marketplace identifier. + * @type {string} + * @memberof ServiceJob + */ + marketplaceId?: string; + /** + * + * @type {Buyer} + * @memberof ServiceJob + */ + buyer?: Buyer; + /** + * A list of items associated with the service job. + * @type {Array} + * @memberof ServiceJob + */ + associatedItems?: Array; + /** + * + * @type {ServiceLocation} + * @memberof ServiceJob + */ + serviceLocation?: ServiceLocation; +} + +/** + * @export + * @enum {string} + */ +export enum ServiceJobServiceJobStatusEnum { + NotServiced = 'NOT_SERVICED', + Cancelled = 'CANCELLED', + Completed = 'COMPLETED', + PendingSchedule = 'PENDING_SCHEDULE', + NotFulfillable = 'NOT_FULFILLABLE', + Hold = 'HOLD', + PaymentDeclined = 'PAYMENT_DECLINED' +} + +/** + * Information about the service job provider. + * @export + * @interface ServiceJobProvider + */ +export interface ServiceJobProvider { + /** + * The identifier of the service job provider. + * @type {string} + * @memberof ServiceJobProvider + */ + serviceJobProviderId?: string; +} +/** + * Information about the location of the service job. + * @export + * @interface ServiceLocation + */ +export interface ServiceLocation { + /** + * The location of the service job. + * @type {string} + * @memberof ServiceLocation + */ + serviceLocationType?: ServiceLocationServiceLocationTypeEnum; + /** + * + * @type {Address} + * @memberof ServiceLocation + */ + address?: Address; +} + +/** + * @export + * @enum {string} + */ +export enum ServiceLocationServiceLocationTypeEnum { + InHome = 'IN_HOME', + InStore = 'IN_STORE', + Online = 'ONLINE' +} + +/** + * Response schema for add or reschedule appointment operation. + * @export + * @interface SetAppointmentResponse + */ +export interface SetAppointmentResponse { + /** + * The appointment identifier. + * @type {string} + * @memberof SetAppointmentResponse + */ + appointmentId?: string; + /** + * A list of warnings returned in the sucessful execution response of an API request. + * @type {Array} + * @memberof SetAppointmentResponse + */ + warnings?: Array; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof SetAppointmentResponse + */ + errors?: Array; +} +/** + * A technician who is assigned to perform the service job in part or in full. + * @export + * @interface Technician + */ +export interface Technician { + /** + * The technician identifier. + * @type {string} + * @memberof Technician + */ + technicianId?: string; + /** + * The name of the technician. + * @type {string} + * @memberof Technician + */ + name?: string; +} +/** + * Warning returned when the request is successful but execution have some important callouts on basis of which API clients should take defined actions. + * @export + * @interface Warning + */ +export interface Warning { + /** + * An warning code that identifies the type of warning that occurred. + * @type {string} + * @memberof Warning + */ + code: string; + /** + * A message that describes the warning condition in a human-readable form. + * @type {string} + * @memberof Warning + */ + message: string; + /** + * Additional details that can help the caller understand or address the warning. + * @type {string} + * @memberof Warning + */ + details?: string; +} + +/** + * ServiceApi - axios parameter creator + * @export + */ +export const ServiceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {AddAppointmentRequest} body Add appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addAppointmentForServiceJobByServiceJobId: async (serviceJobId: string, body: AddAppointmentRequest, options: any = {}): Promise => { + // verify required parameter 'serviceJobId' is not null or undefined + assertParamExists('addAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId) + // verify required parameter 'body' is not null or undefined + assertParamExists('addAppointmentForServiceJobByServiceJobId', 'body', body) + const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments` + .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelServiceJobByServiceJobId: async (serviceJobId: string, cancellationReasonCode: string, options: any = {}): Promise => { + // verify required parameter 'serviceJobId' is not null or undefined + assertParamExists('cancelServiceJobByServiceJobId', 'serviceJobId', serviceJobId) + // verify required parameter 'cancellationReasonCode' is not null or undefined + assertParamExists('cancelServiceJobByServiceJobId', 'cancellationReasonCode', cancellationReasonCode) + const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/cancellations` + .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (cancellationReasonCode !== undefined) { + localVarQueryParameter['cancellationReasonCode'] = cancellationReasonCode; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + completeServiceJobByServiceJobId: async (serviceJobId: string, options: any = {}): Promise => { + // verify required parameter 'serviceJobId' is not null or undefined + assertParamExists('completeServiceJobByServiceJobId', 'serviceJobId', serviceJobId) + const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/completions` + .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId A service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServiceJobByServiceJobId: async (serviceJobId: string, options: any = {}): Promise => { + // verify required parameter 'serviceJobId' is not null or undefined + assertParamExists('getServiceJobByServiceJobId', 'serviceJobId', serviceJobId) + const localVarPath = `/service/v1/serviceJobs/{serviceJobId}` + .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds Used to select jobs that were placed in the specified marketplaces. + * @param {Array} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20. + * @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs. + * @param {string} [pageToken] String returned in the response of your previous request. + * @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20. + * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output. + * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform. + * @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format. + * @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServiceJobs: async (marketplaceIds: Array, serviceOrderIds?: Array, serviceJobStatus?: Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>, pageToken?: string, pageSize?: number, sortField?: 'JOB_DATE' | 'JOB_STATUS', sortOrder?: 'ASC' | 'DESC', createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, scheduleStartDate?: string, scheduleEndDate?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getServiceJobs', 'marketplaceIds', marketplaceIds) + const localVarPath = `/service/v1/serviceJobs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (serviceOrderIds) { + localVarQueryParameter['serviceOrderIds'] = serviceOrderIds.join(COLLECTION_FORMATS.csv); + } + + if (serviceJobStatus) { + localVarQueryParameter['serviceJobStatus'] = serviceJobStatus.join(COLLECTION_FORMATS.csv); + } + + if (pageToken !== undefined) { + localVarQueryParameter['pageToken'] = pageToken; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + if (sortField !== undefined) { + localVarQueryParameter['sortField'] = sortField; + } + + if (sortOrder !== undefined) { + localVarQueryParameter['sortOrder'] = sortOrder; + } + + if (createdAfter !== undefined) { + localVarQueryParameter['createdAfter'] = createdAfter; + } + + if (createdBefore !== undefined) { + localVarQueryParameter['createdBefore'] = createdBefore; + } + + if (lastUpdatedAfter !== undefined) { + localVarQueryParameter['lastUpdatedAfter'] = lastUpdatedAfter; + } + + if (lastUpdatedBefore !== undefined) { + localVarQueryParameter['lastUpdatedBefore'] = lastUpdatedBefore; + } + + if (scheduleStartDate !== undefined) { + localVarQueryParameter['scheduleStartDate'] = scheduleStartDate; + } + + if (scheduleEndDate !== undefined) { + localVarQueryParameter['scheduleEndDate'] = scheduleEndDate; + } + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} appointmentId An existing appointment identifier for the Service Job. + * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + rescheduleAppointmentForServiceJobByServiceJobId: async (serviceJobId: string, appointmentId: string, body: RescheduleAppointmentRequest, options: any = {}): Promise => { + // verify required parameter 'serviceJobId' is not null or undefined + assertParamExists('rescheduleAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId) + // verify required parameter 'appointmentId' is not null or undefined + assertParamExists('rescheduleAppointmentForServiceJobByServiceJobId', 'appointmentId', appointmentId) + // verify required parameter 'body' is not null or undefined + assertParamExists('rescheduleAppointmentForServiceJobByServiceJobId', 'body', body) + const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}` + .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))) + .replace(`{${"appointmentId"}}`, encodeURIComponent(String(appointmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ServiceApi - functional programming interface + * @export + */ +export const ServiceApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ServiceApiAxiosParamCreator(configuration) + return { + /** + * Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {AddAppointmentRequest} body Add appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addAppointmentForServiceJobByServiceJobId(serviceJobId: string, body: AddAppointmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelServiceJobByServiceJobId(serviceJobId: string, cancellationReasonCode: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async completeServiceJobByServiceJobId(serviceJobId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.completeServiceJobByServiceJobId(serviceJobId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId A service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getServiceJobByServiceJobId(serviceJobId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceJobByServiceJobId(serviceJobId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds Used to select jobs that were placed in the specified marketplaces. + * @param {Array} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20. + * @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs. + * @param {string} [pageToken] String returned in the response of your previous request. + * @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20. + * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output. + * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform. + * @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format. + * @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getServiceJobs(marketplaceIds: Array, serviceOrderIds?: Array, serviceJobStatus?: Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>, pageToken?: string, pageSize?: number, sortField?: 'JOB_DATE' | 'JOB_STATUS', sortOrder?: 'ASC' | 'DESC', createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, scheduleStartDate?: string, scheduleEndDate?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} appointmentId An existing appointment identifier for the Service Job. + * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId: string, appointmentId: string, body: RescheduleAppointmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ServiceApi - factory interface + * @export + */ +export const ServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ServiceApiFp(configuration) + return { + /** + * Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {AddAppointmentRequest} body Add appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addAppointmentForServiceJobByServiceJobId(serviceJobId: string, body: AddAppointmentRequest, options?: any): AxiosPromise { + return localVarFp.addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelServiceJobByServiceJobId(serviceJobId: string, cancellationReasonCode: string, options?: any): AxiosPromise { + return localVarFp.cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options).then((request) => request(axios, basePath)); + }, + /** + * Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + completeServiceJobByServiceJobId(serviceJobId: string, options?: any): AxiosPromise { + return localVarFp.completeServiceJobByServiceJobId(serviceJobId, options).then((request) => request(axios, basePath)); + }, + /** + * Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId A service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServiceJobByServiceJobId(serviceJobId: string, options?: any): AxiosPromise { + return localVarFp.getServiceJobByServiceJobId(serviceJobId, options).then((request) => request(axios, basePath)); + }, + /** + * Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds Used to select jobs that were placed in the specified marketplaces. + * @param {Array} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20. + * @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs. + * @param {string} [pageToken] String returned in the response of your previous request. + * @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20. + * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output. + * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform. + * @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format. + * @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServiceJobs(marketplaceIds: Array, serviceOrderIds?: Array, serviceJobStatus?: Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>, pageToken?: string, pageSize?: number, sortField?: 'JOB_DATE' | 'JOB_STATUS', sortOrder?: 'ASC' | 'DESC', createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, scheduleStartDate?: string, scheduleEndDate?: string, options?: any): AxiosPromise { + return localVarFp.getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options).then((request) => request(axios, basePath)); + }, + /** + * Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} appointmentId An existing appointment identifier for the Service Job. + * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId: string, appointmentId: string, body: RescheduleAppointmentRequest, options?: any): AxiosPromise { + return localVarFp.rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ServiceApi - object-oriented interface + * @export + * @class ServiceApi + * @extends {BaseAPI} + */ +export class ServiceApi extends BaseAPI { + /** + * Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {AddAppointmentRequest} body Add appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServiceApi + */ + public addAppointmentForServiceJobByServiceJobId(serviceJobId: string, body: AddAppointmentRequest, options?: any) { + return ServiceApiFp(this.configuration).addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServiceApi + */ + public cancelServiceJobByServiceJobId(serviceJobId: string, cancellationReasonCode: string, options?: any) { + return ServiceApiFp(this.configuration).cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServiceApi + */ + public completeServiceJobByServiceJobId(serviceJobId: string, options?: any) { + return ServiceApiFp(this.configuration).completeServiceJobByServiceJobId(serviceJobId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId A service job identifier. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServiceApi + */ + public getServiceJobByServiceJobId(serviceJobId: string, options?: any) { + return ServiceApiFp(this.configuration).getServiceJobByServiceJobId(serviceJobId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds Used to select jobs that were placed in the specified marketplaces. + * @param {Array} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20. + * @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs. + * @param {string} [pageToken] String returned in the response of your previous request. + * @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20. + * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output. + * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform. + * @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format. + * @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error. + * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format. + * @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServiceApi + */ + public getServiceJobs(marketplaceIds: Array, serviceOrderIds?: Array, serviceJobStatus?: Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>, pageToken?: string, pageSize?: number, sortField?: 'JOB_DATE' | 'JOB_STATUS', sortOrder?: 'ASC' | 'DESC', createdAfter?: string, createdBefore?: string, lastUpdatedAfter?: string, lastUpdatedBefore?: string, scheduleStartDate?: string, scheduleEndDate?: string, options?: any) { + return ServiceApiFp(this.configuration).getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} serviceJobId An Amazon defined service job identifier. + * @param {string} appointmentId An existing appointment identifier for the Service Job. + * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServiceApi + */ + public rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId: string, appointmentId: string, body: RescheduleAppointmentRequest, options?: any) { + return ServiceApiFp(this.configuration).rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/services-api-model/base.ts b/src/api-models/services-api-model/base.ts new file mode 100644 index 00000000..beda2004 --- /dev/null +++ b/src/api-models/services-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Services + * With the Services API, you can build applications that help service providers get and modify their service orders. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/services-api-model/common.ts b/src/api-models/services-api-model/common.ts new file mode 100644 index 00000000..b3135987 --- /dev/null +++ b/src/api-models/services-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Services + * With the Services API, you can build applications that help service providers get and modify their service orders. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/services-api-model/configuration.ts b/src/api-models/services-api-model/configuration.ts new file mode 100644 index 00000000..76ec861f --- /dev/null +++ b/src/api-models/services-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Services + * With the Services API, you can build applications that help service providers get and modify their service orders. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/services-api-model/git_push.sh b/src/api-models/services-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/services-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/services-api-model/index.ts b/src/api-models/services-api-model/index.ts new file mode 100644 index 00000000..eec92307 --- /dev/null +++ b/src/api-models/services-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Services + * With the Services API, you can build applications that help service providers get and modify their service orders. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/shipping-api-model/.gitignore b/src/api-models/shipping-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/shipping-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/shipping-api-model/.npmignore b/src/api-models/shipping-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/shipping-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/shipping-api-model/.openapi-generator-ignore b/src/api-models/shipping-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/shipping-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/shipping-api-model/.openapi-generator/FILES b/src/api-models/shipping-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/shipping-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/shipping-api-model/.openapi-generator/VERSION b/src/api-models/shipping-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/shipping-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/shipping-api-model/api.ts b/src/api-models/shipping-api-model/api.ts new file mode 100644 index 00000000..27f9e180 --- /dev/null +++ b/src/api-models/shipping-api-model/api.ts @@ -0,0 +1,1773 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Shipping + * Provides programmatic access to Amazon Shipping APIs. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The specific rate purchased for the shipment, or null if unpurchased. + * @export + * @interface AcceptedRate + */ +export interface AcceptedRate { + /** + * + * @type {Currency} + * @memberof AcceptedRate + */ + totalCharge?: Currency; + /** + * + * @type {Weight} + * @memberof AcceptedRate + */ + billedWeight?: Weight; + /** + * + * @type {ServiceType} + * @memberof AcceptedRate + */ + serviceType?: ServiceType; + /** + * + * @type {ShippingPromiseSet} + * @memberof AcceptedRate + */ + promise?: ShippingPromiseSet; +} +/** + * The account related data. + * @export + * @interface Account + */ +export interface Account { + /** + * This is the Amazon Shipping account id generated during the Amazon Shipping onboarding process. + * @type {string} + * @memberof Account + */ + accountId: string; +} +/** + * The address. + * @export + * @interface Address + */ +export interface Address { + /** + * The name of the person, business or institution at that address. + * @type {string} + * @memberof Address + */ + name: string; + /** + * First line of that address. + * @type {string} + * @memberof Address + */ + addressLine1: string; + /** + * Additional address information, if required. + * @type {string} + * @memberof Address + */ + addressLine2?: string; + /** + * Additional address information, if required. + * @type {string} + * @memberof Address + */ + addressLine3?: string; + /** + * The state or region where the person, business or institution is located. + * @type {string} + * @memberof Address + */ + stateOrRegion: string; + /** + * The city where the person, business or institution is located. + * @type {string} + * @memberof Address + */ + city: string; + /** + * The two digit country code. In ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Address + */ + countryCode: string; + /** + * The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation. + * @type {string} + * @memberof Address + */ + postalCode: string; + /** + * The email address of the contact associated with the address. + * @type {string} + * @memberof Address + */ + email?: string; + /** + * The email cc addresses of the contact associated with the address. + * @type {Array} + * @memberof Address + */ + copyEmails?: Array; + /** + * The phone number of the person, business or institution located at that address. + * @type {string} + * @memberof Address + */ + phoneNumber?: string; +} +/** + * The response schema for the cancelShipment operation. + * @export + * @interface CancelShipmentResponse + */ +export interface CancelShipmentResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CancelShipmentResponse + */ + errors?: Array; +} +/** + * Container in the shipment. + * @export + * @interface Container + */ +export interface Container { + /** + * The type of physical container being used. (always \'PACKAGE\') + * @type {string} + * @memberof Container + */ + containerType?: ContainerContainerTypeEnum; + /** + * An identifier for the container. This must be unique within all the containers in the same shipment. + * @type {string} + * @memberof Container + */ + containerReferenceId: string; + /** + * + * @type {Currency} + * @memberof Container + */ + value: Currency; + /** + * + * @type {Dimensions} + * @memberof Container + */ + dimensions: Dimensions; + /** + * A list of the items in the container. + * @type {Array} + * @memberof Container + */ + items: Array; + /** + * + * @type {Weight} + * @memberof Container + */ + weight: Weight; +} + +/** + * @export + * @enum {string} + */ +export enum ContainerContainerTypeEnum { + Package = 'PACKAGE' +} + +/** + * Item in the container. + * @export + * @interface ContainerItem + */ +export interface ContainerItem { + /** + * The quantity of the items of this type in the container. + * @type {number} + * @memberof ContainerItem + */ + quantity: number; + /** + * + * @type {Currency} + * @memberof ContainerItem + */ + unitPrice: Currency; + /** + * + * @type {Weight} + * @memberof ContainerItem + */ + unitWeight: Weight; + /** + * A descriptive title of the item. + * @type {string} + * @memberof ContainerItem + */ + title: string; +} +/** + * Container specification for checking the service rate. + * @export + * @interface ContainerSpecification + */ +export interface ContainerSpecification { + /** + * + * @type {Dimensions} + * @memberof ContainerSpecification + */ + dimensions: Dimensions; + /** + * + * @type {Weight} + * @memberof ContainerSpecification + */ + weight: Weight; +} +/** + * The request schema for the createShipment operation. + * @export + * @interface CreateShipmentRequest + */ +export interface CreateShipmentRequest { + /** + * Client reference id. + * @type {string} + * @memberof CreateShipmentRequest + */ + clientReferenceId: string; + /** + * + * @type {Address} + * @memberof CreateShipmentRequest + */ + shipTo: Address; + /** + * + * @type {Address} + * @memberof CreateShipmentRequest + */ + shipFrom: Address; + /** + * A list of container. + * @type {Array} + * @memberof CreateShipmentRequest + */ + containers: Array; +} +/** + * The response schema for the createShipment operation. + * @export + * @interface CreateShipmentResponse + */ +export interface CreateShipmentResponse { + /** + * + * @type {CreateShipmentResult} + * @memberof CreateShipmentResponse + */ + payload?: CreateShipmentResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateShipmentResponse + */ + errors?: Array; +} +/** + * The payload schema for the createShipment operation. + * @export + * @interface CreateShipmentResult + */ +export interface CreateShipmentResult { + /** + * The unique shipment identifier. + * @type {string} + * @memberof CreateShipmentResult + */ + shipmentId: string; + /** + * A list of all the available rates that can be used to send the shipment. + * @type {Array} + * @memberof CreateShipmentResult + */ + eligibleRates: Array; +} +/** + * The total value of all items in the container. + * @export + * @interface Currency + */ +export interface Currency { + /** + * The amount of currency. + * @type {number} + * @memberof Currency + */ + value: number; + /** + * A 3-character currency code. + * @type {string} + * @memberof Currency + */ + unit: string; +} +/** + * A set of measurements for a three-dimensional object. + * @export + * @interface Dimensions + */ +export interface Dimensions { + /** + * The length of the container. + * @type {number} + * @memberof Dimensions + */ + length: number; + /** + * The width of the container. + * @type {number} + * @memberof Dimensions + */ + width: number; + /** + * The height of the container. + * @type {number} + * @memberof Dimensions + */ + height: number; + /** + * The unit of these measurements. + * @type {string} + * @memberof Dimensions + */ + unit: DimensionsUnitEnum; +} + +/** + * @export + * @enum {string} + */ +export enum DimensionsUnitEnum { + In = 'IN', + Cm = 'CM' +} + +/** + * An event of a shipment + * @export + * @interface Event + */ +export interface Event { + /** + * The event code of a shipment, such as Departed, Received, and ReadyForReceive. + * @type {string} + * @memberof Event + */ + eventCode: string; + /** + * The date and time of an event for a shipment. + * @type {string} + * @memberof Event + */ + eventTime: string; + /** + * + * @type {Location} + * @memberof Event + */ + location?: Location; +} +/** + * The response schema for the getAccount operation. + * @export + * @interface GetAccountResponse + */ +export interface GetAccountResponse { + /** + * + * @type {Account} + * @memberof GetAccountResponse + */ + payload?: Account; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetAccountResponse + */ + errors?: Array; +} +/** + * The payload schema for the getRates operation. + * @export + * @interface GetRatesRequest + */ +export interface GetRatesRequest { + /** + * + * @type {Address} + * @memberof GetRatesRequest + */ + shipTo: Address; + /** + * + * @type {Address} + * @memberof GetRatesRequest + */ + shipFrom: Address; + /** + * A list of service types that can be used to send the shipment. + * @type {Array} + * @memberof GetRatesRequest + */ + serviceTypes: Array; + /** + * The start date and time. This defaults to the current date and time. + * @type {string} + * @memberof GetRatesRequest + */ + shipDate?: string; + /** + * A list of container specifications. + * @type {Array} + * @memberof GetRatesRequest + */ + containerSpecifications: Array; +} +/** + * The response schema for the getRates operation. + * @export + * @interface GetRatesResponse + */ +export interface GetRatesResponse { + /** + * + * @type {GetRatesResult} + * @memberof GetRatesResponse + */ + payload?: GetRatesResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetRatesResponse + */ + errors?: Array; +} +/** + * The payload schema for the getRates operation. + * @export + * @interface GetRatesResult + */ +export interface GetRatesResult { + /** + * A list of service rates. + * @type {Array} + * @memberof GetRatesResult + */ + serviceRates: Array; +} +/** + * The response schema for the getShipment operation. + * @export + * @interface GetShipmentResponse + */ +export interface GetShipmentResponse { + /** + * + * @type {Shipment} + * @memberof GetShipmentResponse + */ + payload?: Shipment; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetShipmentResponse + */ + errors?: Array; +} +/** + * The response schema for the getTrackingInformation operation. + * @export + * @interface GetTrackingInformationResponse + */ +export interface GetTrackingInformationResponse { + /** + * + * @type {TrackingInformation} + * @memberof GetTrackingInformationResponse + */ + payload?: TrackingInformation; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetTrackingInformationResponse + */ + errors?: Array; +} +/** + * The label details of the container. + * @export + * @interface Label + */ +export interface Label { + /** + * Contains binary image data encoded as a base-64 string. + * @type {string} + * @memberof Label + */ + labelStream?: string; + /** + * + * @type {LabelSpecification} + * @memberof Label + */ + labelSpecification?: LabelSpecification; +} +/** + * Label details including label stream, format, size. + * @export + * @interface LabelResult + */ +export interface LabelResult { + /** + * An identifier for the container. This must be unique within all the containers in the same shipment. + * @type {string} + * @memberof LabelResult + */ + containerReferenceId?: string; + /** + * The tracking identifier assigned to the container. + * @type {string} + * @memberof LabelResult + */ + trackingId?: string; + /** + * + * @type {Label} + * @memberof LabelResult + */ + label?: Label; +} +/** + * The label specification info. + * @export + * @interface LabelSpecification + */ +export interface LabelSpecification { + /** + * The format of the label. Enum of PNG only for now. + * @type {string} + * @memberof LabelSpecification + */ + labelFormat: LabelSpecificationLabelFormatEnum; + /** + * The label stock size specification in length and height. Enum of 4x6 only for now. + * @type {string} + * @memberof LabelSpecification + */ + labelStockSize: LabelSpecificationLabelStockSizeEnum; +} + +/** + * @export + * @enum {string} + */ +export enum LabelSpecificationLabelFormatEnum { + Png = 'PNG' +} +/** + * @export + * @enum {string} + */ +export enum LabelSpecificationLabelStockSizeEnum { + _4x6 = '4x6' +} + +/** + * The location where the person, business or institution is located. + * @export + * @interface Location + */ +export interface Location { + /** + * The state or region where the person, business or institution is located. + * @type {string} + * @memberof Location + */ + stateOrRegion?: string; + /** + * The city where the person, business or institution is located. + * @type {string} + * @memberof Location + */ + city?: string; + /** + * The two digit country code. In ISO 3166-1 alpha-2 format. + * @type {string} + * @memberof Location + */ + countryCode?: string; + /** + * The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation. + * @type {string} + * @memberof Location + */ + postalCode?: string; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occured. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * The account related with the shipment. + * @export + * @interface Party + */ +export interface Party { + /** + * This is the Amazon Shipping account id generated during the Amazon Shipping onboarding process. + * @type {string} + * @memberof Party + */ + accountId?: string; +} +/** + * The request schema for the purchaseLabels operation. + * @export + * @interface PurchaseLabelsRequest + */ +export interface PurchaseLabelsRequest { + /** + * An identifier for the rating. + * @type {string} + * @memberof PurchaseLabelsRequest + */ + rateId: string; + /** + * + * @type {LabelSpecification} + * @memberof PurchaseLabelsRequest + */ + labelSpecification: LabelSpecification; +} +/** + * The response schema for the purchaseLabels operation. + * @export + * @interface PurchaseLabelsResponse + */ +export interface PurchaseLabelsResponse { + /** + * + * @type {PurchaseLabelsResult} + * @memberof PurchaseLabelsResponse + */ + payload?: PurchaseLabelsResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof PurchaseLabelsResponse + */ + errors?: Array; +} +/** + * The payload schema for the purchaseLabels operation. + * @export + * @interface PurchaseLabelsResult + */ +export interface PurchaseLabelsResult { + /** + * The unique shipment identifier. + * @type {string} + * @memberof PurchaseLabelsResult + */ + shipmentId: string; + /** + * Client reference id. + * @type {string} + * @memberof PurchaseLabelsResult + */ + clientReferenceId?: string; + /** + * + * @type {AcceptedRate} + * @memberof PurchaseLabelsResult + */ + acceptedRate: AcceptedRate; + /** + * A list of label results + * @type {Array} + * @memberof PurchaseLabelsResult + */ + labelResults: Array; +} +/** + * The payload schema for the purchaseShipment operation. + * @export + * @interface PurchaseShipmentRequest + */ +export interface PurchaseShipmentRequest { + /** + * Client reference id. + * @type {string} + * @memberof PurchaseShipmentRequest + */ + clientReferenceId: string; + /** + * + * @type {Address} + * @memberof PurchaseShipmentRequest + */ + shipTo: Address; + /** + * + * @type {Address} + * @memberof PurchaseShipmentRequest + */ + shipFrom: Address; + /** + * The start date and time. This defaults to the current date and time. + * @type {string} + * @memberof PurchaseShipmentRequest + */ + shipDate?: string; + /** + * + * @type {ServiceType} + * @memberof PurchaseShipmentRequest + */ + serviceType: ServiceType; + /** + * A list of container. + * @type {Array} + * @memberof PurchaseShipmentRequest + */ + containers: Array; + /** + * + * @type {LabelSpecification} + * @memberof PurchaseShipmentRequest + */ + labelSpecification: LabelSpecification; +} +/** + * The response schema for the purchaseShipment operation. + * @export + * @interface PurchaseShipmentResponse + */ +export interface PurchaseShipmentResponse { + /** + * + * @type {PurchaseShipmentResult} + * @memberof PurchaseShipmentResponse + */ + payload?: PurchaseShipmentResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof PurchaseShipmentResponse + */ + errors?: Array; +} +/** + * The payload schema for the purchaseShipment operation. + * @export + * @interface PurchaseShipmentResult + */ +export interface PurchaseShipmentResult { + /** + * The unique shipment identifier. + * @type {string} + * @memberof PurchaseShipmentResult + */ + shipmentId: string; + /** + * + * @type {ServiceRate} + * @memberof PurchaseShipmentResult + */ + serviceRate: ServiceRate; + /** + * A list of label results + * @type {Array} + * @memberof PurchaseShipmentResult + */ + labelResults: Array; +} +/** + * The available rate that can be used to send the shipment + * @export + * @interface Rate + */ +export interface Rate { + /** + * An identifier for the rate. + * @type {string} + * @memberof Rate + */ + rateId?: string; + /** + * + * @type {Currency} + * @memberof Rate + */ + totalCharge?: Currency; + /** + * + * @type {Weight} + * @memberof Rate + */ + billedWeight?: Weight; + /** + * The time after which the offering will expire. + * @type {string} + * @memberof Rate + */ + expirationTime?: string; + /** + * + * @type {ServiceType} + * @memberof Rate + */ + serviceType?: ServiceType; + /** + * + * @type {ShippingPromiseSet} + * @memberof Rate + */ + promise?: ShippingPromiseSet; +} +/** + * The request schema for the retrieveShippingLabel operation. + * @export + * @interface RetrieveShippingLabelRequest + */ +export interface RetrieveShippingLabelRequest { + /** + * + * @type {LabelSpecification} + * @memberof RetrieveShippingLabelRequest + */ + labelSpecification: LabelSpecification; +} +/** + * The response schema for the retrieveShippingLabel operation. + * @export + * @interface RetrieveShippingLabelResponse + */ +export interface RetrieveShippingLabelResponse { + /** + * + * @type {RetrieveShippingLabelResult} + * @memberof RetrieveShippingLabelResponse + */ + payload?: RetrieveShippingLabelResult; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof RetrieveShippingLabelResponse + */ + errors?: Array; +} +/** + * The payload schema for the retrieveShippingLabel operation. + * @export + * @interface RetrieveShippingLabelResult + */ +export interface RetrieveShippingLabelResult { + /** + * Contains binary image data encoded as a base-64 string. + * @type {string} + * @memberof RetrieveShippingLabelResult + */ + labelStream: string; + /** + * + * @type {LabelSpecification} + * @memberof RetrieveShippingLabelResult + */ + labelSpecification: LabelSpecification; +} +/** + * The specific rate for a shipping service, or null if no service available. + * @export + * @interface ServiceRate + */ +export interface ServiceRate { + /** + * + * @type {Currency} + * @memberof ServiceRate + */ + totalCharge: Currency; + /** + * + * @type {Weight} + * @memberof ServiceRate + */ + billableWeight: Weight; + /** + * + * @type {ServiceType} + * @memberof ServiceRate + */ + serviceType: ServiceType; + /** + * + * @type {ShippingPromiseSet} + * @memberof ServiceRate + */ + promise: ShippingPromiseSet; +} +/** + * The type of shipping service that will be used for the service offering. + * @export + * @enum {string} + */ +export enum ServiceType { + Ground = 'Amazon Shipping Ground', + Standard = 'Amazon Shipping Standard', + Premium = 'Amazon Shipping Premium' +} + +/** + * The shipment related data. + * @export + * @interface Shipment + */ +export interface Shipment { + /** + * The unique shipment identifier. + * @type {string} + * @memberof Shipment + */ + shipmentId: string; + /** + * Client reference id. + * @type {string} + * @memberof Shipment + */ + clientReferenceId: string; + /** + * + * @type {Address} + * @memberof Shipment + */ + shipFrom: Address; + /** + * + * @type {Address} + * @memberof Shipment + */ + shipTo: Address; + /** + * + * @type {AcceptedRate} + * @memberof Shipment + */ + acceptedRate?: AcceptedRate; + /** + * + * @type {Party} + * @memberof Shipment + */ + shipper?: Party; + /** + * A list of container. + * @type {Array} + * @memberof Shipment + */ + containers: Array; +} +/** + * The promised delivery time and pickup time. + * @export + * @interface ShippingPromiseSet + */ +export interface ShippingPromiseSet { + /** + * + * @type {TimeRange} + * @memberof ShippingPromiseSet + */ + deliveryWindow?: TimeRange; + /** + * + * @type {TimeRange} + * @memberof ShippingPromiseSet + */ + receiveWindow?: TimeRange; +} +/** + * The time range. + * @export + * @interface TimeRange + */ +export interface TimeRange { + /** + * The start date and time. This defaults to the current date and time. + * @type {string} + * @memberof TimeRange + */ + start?: string; + /** + * The end date and time. This must come after the value of start. This defaults to the next business day from the start. + * @type {string} + * @memberof TimeRange + */ + end?: string; +} +/** + * The payload schema for the getTrackingInformation operation. + * @export + * @interface TrackingInformation + */ +export interface TrackingInformation { + /** + * The tracking id generated to each shipment. It contains a series of letters or digits or both. + * @type {string} + * @memberof TrackingInformation + */ + trackingId: string; + /** + * + * @type {TrackingSummary} + * @memberof TrackingInformation + */ + summary: TrackingSummary; + /** + * The promised delivery date and time of a shipment. + * @type {string} + * @memberof TrackingInformation + */ + promisedDeliveryDate: string; + /** + * A list of events of a shipment. + * @type {Array} + * @memberof TrackingInformation + */ + eventHistory: Array; +} +/** + * The tracking summary. + * @export + * @interface TrackingSummary + */ +export interface TrackingSummary { + /** + * The derived status based on the events in the eventHistory. + * @type {string} + * @memberof TrackingSummary + */ + status?: string; +} +/** + * The weight. + * @export + * @interface Weight + */ +export interface Weight { + /** + * The unit of measurement. + * @type {string} + * @memberof Weight + */ + unit: WeightUnitEnum; + /** + * The measurement value. + * @type {number} + * @memberof Weight + */ + value: number; +} + +/** + * @export + * @enum {string} + */ +export enum WeightUnitEnum { + G = 'g', + Kg = 'kg', + Oz = 'oz', + Lb = 'lb' +} + + +/** + * ShippingApi - axios parameter creator + * @export + */ +export const ShippingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelShipment: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('cancelShipment', 'shipmentId', shipmentId) + const localVarPath = `/shipping/v1/shipments/{shipmentId}/cancel` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createShipment: async (body: CreateShipmentRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createShipment', 'body', body) + const localVarPath = `/shipping/v1/shipments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccount: async (options: any = {}): Promise => { + const localVarPath = `/shipping/v1/account`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetRatesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRates: async (body: GetRatesRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('getRates', 'body', body) + const localVarPath = `/shipping/v1/rates`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipment: async (shipmentId: string, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('getShipment', 'shipmentId', shipmentId) + const localVarPath = `/shipping/v1/shipments/{shipmentId}` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} trackingId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackingInformation: async (trackingId: string, options: any = {}): Promise => { + // verify required parameter 'trackingId' is not null or undefined + assertParamExists('getTrackingInformation', 'trackingId', trackingId) + const localVarPath = `/shipping/v1/tracking/{trackingId}` + .replace(`{${"trackingId"}}`, encodeURIComponent(String(trackingId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {PurchaseLabelsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + purchaseLabels: async (shipmentId: string, body: PurchaseLabelsRequest, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('purchaseLabels', 'shipmentId', shipmentId) + // verify required parameter 'body' is not null or undefined + assertParamExists('purchaseLabels', 'body', body) + const localVarPath = `/shipping/v1/shipments/{shipmentId}/purchaseLabels` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {PurchaseShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + purchaseShipment: async (body: PurchaseShipmentRequest, options: any = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('purchaseShipment', 'body', body) + const localVarPath = `/shipping/v1/purchaseShipment`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {string} trackingId + * @param {RetrieveShippingLabelRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveShippingLabel: async (shipmentId: string, trackingId: string, body: RetrieveShippingLabelRequest, options: any = {}): Promise => { + // verify required parameter 'shipmentId' is not null or undefined + assertParamExists('retrieveShippingLabel', 'shipmentId', shipmentId) + // verify required parameter 'trackingId' is not null or undefined + assertParamExists('retrieveShippingLabel', 'trackingId', trackingId) + // verify required parameter 'body' is not null or undefined + assertParamExists('retrieveShippingLabel', 'body', body) + const localVarPath = `/shipping/v1/shipments/{shipmentId}/containers/{trackingId}/label` + .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))) + .replace(`{${"trackingId"}}`, encodeURIComponent(String(trackingId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ShippingApi - functional programming interface + * @export + */ +export const ShippingApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ShippingApiAxiosParamCreator(configuration) + return { + /** + * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelShipment(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelShipment(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createShipment(body: CreateShipmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createShipment(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAccount(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetRatesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRates(body: GetRatesRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRates(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getShipment(shipmentId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} trackingId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackingInformation(trackingId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackingInformation(trackingId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {PurchaseLabelsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async purchaseLabels(shipmentId: string, body: PurchaseLabelsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.purchaseLabels(shipmentId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {PurchaseShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async purchaseShipment(body: PurchaseShipmentRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.purchaseShipment(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {string} trackingId + * @param {RetrieveShippingLabelRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveShippingLabel(shipmentId: string, trackingId: string, body: RetrieveShippingLabelRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveShippingLabel(shipmentId, trackingId, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ShippingApi - factory interface + * @export + */ +export const ShippingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ShippingApiFp(configuration) + return { + /** + * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelShipment(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.cancelShipment(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createShipment(body: CreateShipmentRequest, options?: any): AxiosPromise { + return localVarFp.createShipment(body, options).then((request) => request(axios, basePath)); + }, + /** + * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccount(options?: any): AxiosPromise { + return localVarFp.getAccount(options).then((request) => request(axios, basePath)); + }, + /** + * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetRatesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRates(body: GetRatesRequest, options?: any): AxiosPromise { + return localVarFp.getRates(body, options).then((request) => request(axios, basePath)); + }, + /** + * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getShipment(shipmentId: string, options?: any): AxiosPromise { + return localVarFp.getShipment(shipmentId, options).then((request) => request(axios, basePath)); + }, + /** + * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} trackingId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackingInformation(trackingId: string, options?: any): AxiosPromise { + return localVarFp.getTrackingInformation(trackingId, options).then((request) => request(axios, basePath)); + }, + /** + * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {PurchaseLabelsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + purchaseLabels(shipmentId: string, body: PurchaseLabelsRequest, options?: any): AxiosPromise { + return localVarFp.purchaseLabels(shipmentId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {PurchaseShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + purchaseShipment(body: PurchaseShipmentRequest, options?: any): AxiosPromise { + return localVarFp.purchaseShipment(body, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {string} trackingId + * @param {RetrieveShippingLabelRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveShippingLabel(shipmentId: string, trackingId: string, body: RetrieveShippingLabelRequest, options?: any): AxiosPromise { + return localVarFp.retrieveShippingLabel(shipmentId, trackingId, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ShippingApi - object-oriented interface + * @export + * @class ShippingApi + * @extends {BaseAPI} + */ +export class ShippingApi extends BaseAPI { + /** + * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public cancelShipment(shipmentId: string, options?: any) { + return ShippingApiFp(this.configuration).cancelShipment(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {CreateShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public createShipment(body: CreateShipmentRequest, options?: any) { + return ShippingApiFp(this.configuration).createShipment(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public getAccount(options?: any) { + return ShippingApiFp(this.configuration).getAccount(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {GetRatesRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public getRates(body: GetRatesRequest, options?: any) { + return ShippingApiFp(this.configuration).getRates(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public getShipment(shipmentId: string, options?: any) { + return ShippingApiFp(this.configuration).getShipment(shipmentId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} trackingId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public getTrackingInformation(trackingId: string, options?: any) { + return ShippingApiFp(this.configuration).getTrackingInformation(trackingId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {PurchaseLabelsRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public purchaseLabels(shipmentId: string, body: PurchaseLabelsRequest, options?: any) { + return ShippingApiFp(this.configuration).purchaseLabels(shipmentId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {PurchaseShipmentRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public purchaseShipment(body: PurchaseShipmentRequest, options?: any) { + return ShippingApiFp(this.configuration).purchaseShipment(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} shipmentId + * @param {string} trackingId + * @param {RetrieveShippingLabelRequest} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ShippingApi + */ + public retrieveShippingLabel(shipmentId: string, trackingId: string, body: RetrieveShippingLabelRequest, options?: any) { + return ShippingApiFp(this.configuration).retrieveShippingLabel(shipmentId, trackingId, body, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/shipping-api-model/base.ts b/src/api-models/shipping-api-model/base.ts new file mode 100644 index 00000000..df9ae1ec --- /dev/null +++ b/src/api-models/shipping-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Shipping + * Provides programmatic access to Amazon Shipping APIs. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/shipping-api-model/common.ts b/src/api-models/shipping-api-model/common.ts new file mode 100644 index 00000000..30c971a1 --- /dev/null +++ b/src/api-models/shipping-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Shipping + * Provides programmatic access to Amazon Shipping APIs. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/shipping-api-model/configuration.ts b/src/api-models/shipping-api-model/configuration.ts new file mode 100644 index 00000000..f6741978 --- /dev/null +++ b/src/api-models/shipping-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Shipping + * Provides programmatic access to Amazon Shipping APIs. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/shipping-api-model/git_push.sh b/src/api-models/shipping-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/shipping-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/shipping-api-model/index.ts b/src/api-models/shipping-api-model/index.ts new file mode 100644 index 00000000..8bee01b2 --- /dev/null +++ b/src/api-models/shipping-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Shipping + * Provides programmatic access to Amazon Shipping APIs. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/solicitations-api-model/.gitignore b/src/api-models/solicitations-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/solicitations-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/solicitations-api-model/.npmignore b/src/api-models/solicitations-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/solicitations-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/solicitations-api-model/.openapi-generator-ignore b/src/api-models/solicitations-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/solicitations-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/solicitations-api-model/.openapi-generator/FILES b/src/api-models/solicitations-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/solicitations-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/solicitations-api-model/.openapi-generator/VERSION b/src/api-models/solicitations-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/solicitations-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/solicitations-api-model/api.ts b/src/api-models/solicitations-api-model/api.ts new file mode 100644 index 00000000..a1243685 --- /dev/null +++ b/src/api-models/solicitations-api-model/api.ts @@ -0,0 +1,436 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Solicitations + * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient\'s Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The response schema for the createProductReviewAndSellerFeedbackSolicitation operation. + * @export + * @interface CreateProductReviewAndSellerFeedbackSolicitationResponse + */ +export interface CreateProductReviewAndSellerFeedbackSolicitationResponse { + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateProductReviewAndSellerFeedbackSolicitationResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetSchemaResponse + */ +export interface GetSchemaResponse { + /** + * + * @type {GetSchemaResponseLinks} + * @memberof GetSchemaResponse + */ + _links?: GetSchemaResponseLinks; + /** + * A JSON schema document describing the expected payload of the action. This object can be validated against http://json-schema.org/draft-04/schema. + * @type {object} + * @memberof GetSchemaResponse + */ + payload?: object; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetSchemaResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetSchemaResponseLinks + */ +export interface GetSchemaResponseLinks { + /** + * + * @type {LinkObject} + * @memberof GetSchemaResponseLinks + */ + self: LinkObject; +} +/** + * Describes a solicitation action that can be taken for an order. Provides a JSON Hypertext Application Language (HAL) link to the JSON schema document that describes the expected input. + * @export + * @interface GetSolicitationActionResponse + */ +export interface GetSolicitationActionResponse { + /** + * + * @type {GetSolicitationActionResponseLinks} + * @memberof GetSolicitationActionResponse + */ + _links?: GetSolicitationActionResponseLinks; + /** + * + * @type {GetSolicitationActionResponseEmbedded} + * @memberof GetSolicitationActionResponse + */ + _embedded?: GetSolicitationActionResponseEmbedded; + /** + * + * @type {SolicitationsAction} + * @memberof GetSolicitationActionResponse + */ + payload?: SolicitationsAction; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetSolicitationActionResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetSolicitationActionResponseEmbedded + */ +export interface GetSolicitationActionResponseEmbedded { + /** + * + * @type {GetSchemaResponse} + * @memberof GetSolicitationActionResponseEmbedded + */ + schema?: GetSchemaResponse; +} +/** + * + * @export + * @interface GetSolicitationActionResponseLinks + */ +export interface GetSolicitationActionResponseLinks { + /** + * + * @type {LinkObject} + * @memberof GetSolicitationActionResponseLinks + */ + self: LinkObject; + /** + * + * @type {LinkObject} + * @memberof GetSolicitationActionResponseLinks + */ + schema: LinkObject; +} +/** + * The response schema for the getSolicitationActionsForOrder operation. + * @export + * @interface GetSolicitationActionsForOrderResponse + */ +export interface GetSolicitationActionsForOrderResponse { + /** + * + * @type {GetSolicitationActionsForOrderResponseLinks} + * @memberof GetSolicitationActionsForOrderResponse + */ + _links?: GetSolicitationActionsForOrderResponseLinks; + /** + * + * @type {GetSolicitationActionsForOrderResponseEmbedded} + * @memberof GetSolicitationActionsForOrderResponse + */ + _embedded?: GetSolicitationActionsForOrderResponseEmbedded; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof GetSolicitationActionsForOrderResponse + */ + errors?: Array; +} +/** + * + * @export + * @interface GetSolicitationActionsForOrderResponseEmbedded + */ +export interface GetSolicitationActionsForOrderResponseEmbedded { + /** + * + * @type {Array} + * @memberof GetSolicitationActionsForOrderResponseEmbedded + */ + actions: Array; +} +/** + * + * @export + * @interface GetSolicitationActionsForOrderResponseLinks + */ +export interface GetSolicitationActionsForOrderResponseLinks { + /** + * + * @type {LinkObject} + * @memberof GetSolicitationActionsForOrderResponseLinks + */ + self: LinkObject; + /** + * Eligible actions for the specified amazonOrderId. + * @type {Array} + * @memberof GetSolicitationActionsForOrderResponseLinks + */ + actions: Array; +} +/** + * A Link object. + * @export + * @interface LinkObject + */ +export interface LinkObject { + /** + * A URI for this object. + * @type {string} + * @memberof LinkObject + */ + href: string; + /** + * An identifier for this object. + * @type {string} + * @memberof LinkObject + */ + name?: string; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * A simple object containing the name of the template. + * @export + * @interface SolicitationsAction + */ +export interface SolicitationsAction { + /** + * + * @type {string} + * @memberof SolicitationsAction + */ + name: string; +} + +/** + * SolicitationsApi - axios parameter creator + * @export + */ +export const SolicitationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createProductReviewAndSellerFeedbackSolicitation: async (amazonOrderId: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('createProductReviewAndSellerFeedbackSolicitation', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createProductReviewAndSellerFeedbackSolicitation', 'marketplaceIds', marketplaceIds) + const localVarPath = `/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSolicitationActionsForOrder: async (amazonOrderId: string, marketplaceIds: Array, options: any = {}): Promise => { + // verify required parameter 'amazonOrderId' is not null or undefined + assertParamExists('getSolicitationActionsForOrder', 'amazonOrderId', amazonOrderId) + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('getSolicitationActionsForOrder', 'marketplaceIds', marketplaceIds) + const localVarPath = `/solicitations/v1/orders/{amazonOrderId}` + .replace(`{${"amazonOrderId"}}`, encodeURIComponent(String(amazonOrderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SolicitationsApi - functional programming interface + * @export + */ +export const SolicitationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SolicitationsApiAxiosParamCreator(configuration) + return { + /** + * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createProductReviewAndSellerFeedbackSolicitation(amazonOrderId: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSolicitationActionsForOrder(amazonOrderId: string, marketplaceIds: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SolicitationsApi - factory interface + * @export + */ +export const SolicitationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SolicitationsApiFp(configuration) + return { + /** + * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createProductReviewAndSellerFeedbackSolicitation(amazonOrderId: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSolicitationActionsForOrder(amazonOrderId: string, marketplaceIds: Array, options?: any): AxiosPromise { + return localVarFp.getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SolicitationsApi - object-oriented interface + * @export + * @class SolicitationsApi + * @extends {BaseAPI} + */ +export class SolicitationsApi extends BaseAPI { + /** + * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SolicitationsApi + */ + public createProductReviewAndSellerFeedbackSolicitation(amazonOrderId: string, marketplaceIds: Array, options?: any) { + return SolicitationsApiFp(this.configuration).createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. + * @param {Array} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SolicitationsApi + */ + public getSolicitationActionsForOrder(amazonOrderId: string, marketplaceIds: Array, options?: any) { + return SolicitationsApiFp(this.configuration).getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/solicitations-api-model/base.ts b/src/api-models/solicitations-api-model/base.ts new file mode 100644 index 00000000..61908fde --- /dev/null +++ b/src/api-models/solicitations-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Solicitations + * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient\'s Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/solicitations-api-model/common.ts b/src/api-models/solicitations-api-model/common.ts new file mode 100644 index 00000000..39bf2701 --- /dev/null +++ b/src/api-models/solicitations-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Solicitations + * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient\'s Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/solicitations-api-model/configuration.ts b/src/api-models/solicitations-api-model/configuration.ts new file mode 100644 index 00000000..1b55a975 --- /dev/null +++ b/src/api-models/solicitations-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Solicitations + * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient\'s Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/solicitations-api-model/git_push.sh b/src/api-models/solicitations-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/solicitations-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/solicitations-api-model/index.ts b/src/api-models/solicitations-api-model/index.ts new file mode 100644 index 00000000..0611b48e --- /dev/null +++ b/src/api-models/solicitations-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Solicitations + * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient\'s Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard. + * + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/src/api-models/uploads-api-model/.gitignore b/src/api-models/uploads-api-model/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/src/api-models/uploads-api-model/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/api-models/uploads-api-model/.npmignore b/src/api-models/uploads-api-model/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/src/api-models/uploads-api-model/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/src/api-models/uploads-api-model/.openapi-generator-ignore b/src/api-models/uploads-api-model/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/src/api-models/uploads-api-model/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/api-models/uploads-api-model/.openapi-generator/FILES b/src/api-models/uploads-api-model/.openapi-generator/FILES new file mode 100644 index 00000000..16b445ee --- /dev/null +++ b/src/api-models/uploads-api-model/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/src/api-models/uploads-api-model/.openapi-generator/VERSION b/src/api-models/uploads-api-model/.openapi-generator/VERSION new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/src/api-models/uploads-api-model/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/src/api-models/uploads-api-model/api.ts b/src/api-models/uploads-api-model/api.ts new file mode 100644 index 00000000..e040ab15 --- /dev/null +++ b/src/api-models/uploads-api-model/api.ts @@ -0,0 +1,222 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Uploads + * The Selling Partner API for Uploads provides operations that support uploading files. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * The response schema for the createUploadDestination operation. + * @export + * @interface CreateUploadDestinationResponse + */ +export interface CreateUploadDestinationResponse { + /** + * + * @type {UploadDestination} + * @memberof CreateUploadDestinationResponse + */ + payload?: UploadDestination; + /** + * A list of error responses returned when a request is unsuccessful. + * @type {Array} + * @memberof CreateUploadDestinationResponse + */ + errors?: Array; +} +/** + * Error response returned when the request is unsuccessful. + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * An error code that identifies the type of error that occurred. + * @type {string} + * @memberof ModelError + */ + code: string; + /** + * A message that describes the error condition in a human-readable form. + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * Additional details that can help the caller understand or fix the issue. + * @type {string} + * @memberof ModelError + */ + details?: string; +} +/** + * Information about an upload destination. + * @export + * @interface UploadDestination + */ +export interface UploadDestination { + /** + * The unique identifier for the upload destination. + * @type {string} + * @memberof UploadDestination + */ + uploadDestinationId?: string; + /** + * The URL for the upload destination. + * @type {string} + * @memberof UploadDestination + */ + url?: string; + /** + * The headers to include in the upload request. + * @type {object} + * @memberof UploadDestination + */ + headers?: object; +} + +/** + * UploadsApi - axios parameter creator + * @export + */ +export const UploadsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates an upload destination for a resource that you specify and returns the information required to upload to that destination. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. + * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. + * @param {string} resource The URL of the resource for the upload destination that you are creating. For example, to create an upload destination for a Buyer-Seller Messaging message, the {resource} would be /messaging and the path would be /uploads/v1/uploadDestinations/messaging + * @param {string} [contentType] The content type of the file to be uploaded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUploadDestinationForResource: async (marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options: any = {}): Promise => { + // verify required parameter 'marketplaceIds' is not null or undefined + assertParamExists('createUploadDestinationForResource', 'marketplaceIds', marketplaceIds) + // verify required parameter 'contentMD5' is not null or undefined + assertParamExists('createUploadDestinationForResource', 'contentMD5', contentMD5) + // verify required parameter 'resource' is not null or undefined + assertParamExists('createUploadDestinationForResource', 'resource', resource) + const localVarPath = `/uploads/2020-11-01/uploadDestinations/{resource}` + .replace(`{${"resource"}}`, encodeURIComponent(String(resource))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplaceIds) { + localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv); + } + + if (contentMD5 !== undefined) { + localVarQueryParameter['contentMD5'] = contentMD5; + } + + if (contentType !== undefined) { + localVarQueryParameter['contentType'] = contentType; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UploadsApi - functional programming interface + * @export + */ +export const UploadsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UploadsApiAxiosParamCreator(configuration) + return { + /** + * Creates an upload destination for a resource that you specify and returns the information required to upload to that destination. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. + * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. + * @param {string} resource The URL of the resource for the upload destination that you are creating. For example, to create an upload destination for a Buyer-Seller Messaging message, the {resource} would be /messaging and the path would be /uploads/v1/uploadDestinations/messaging + * @param {string} [contentType] The content type of the file to be uploaded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUploadDestinationForResource(marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUploadDestinationForResource(marketplaceIds, contentMD5, resource, contentType, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UploadsApi - factory interface + * @export + */ +export const UploadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UploadsApiFp(configuration) + return { + /** + * Creates an upload destination for a resource that you specify and returns the information required to upload to that destination. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. + * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. + * @param {string} resource The URL of the resource for the upload destination that you are creating. For example, to create an upload destination for a Buyer-Seller Messaging message, the {resource} would be /messaging and the path would be /uploads/v1/uploadDestinations/messaging + * @param {string} [contentType] The content type of the file to be uploaded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUploadDestinationForResource(marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options?: any): AxiosPromise { + return localVarFp.createUploadDestinationForResource(marketplaceIds, contentMD5, resource, contentType, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UploadsApi - object-oriented interface + * @export + * @class UploadsApi + * @extends {BaseAPI} + */ +export class UploadsApi extends BaseAPI { + /** + * Creates an upload destination for a resource that you specify and returns the information required to upload to that destination. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. + * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. + * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. + * @param {string} resource The URL of the resource for the upload destination that you are creating. For example, to create an upload destination for a Buyer-Seller Messaging message, the {resource} would be /messaging and the path would be /uploads/v1/uploadDestinations/messaging + * @param {string} [contentType] The content type of the file to be uploaded. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UploadsApi + */ + public createUploadDestinationForResource(marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options?: any) { + return UploadsApiFp(this.configuration).createUploadDestinationForResource(marketplaceIds, contentMD5, resource, contentType, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/src/api-models/uploads-api-model/base.ts b/src/api-models/uploads-api-model/base.ts new file mode 100644 index 00000000..f63ae937 --- /dev/null +++ b/src/api-models/uploads-api-model/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Uploads + * The Selling Partner API for Uploads provides operations that support uploading files. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api-models/uploads-api-model/common.ts b/src/api-models/uploads-api-model/common.ts new file mode 100644 index 00000000..9d96185e --- /dev/null +++ b/src/api-models/uploads-api-model/common.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Uploads + * The Selling Partner API for Uploads provides operations that support uploading files. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + searchParams.set(key, object[key]); + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/src/api-models/uploads-api-model/configuration.ts b/src/api-models/uploads-api-model/configuration.ts new file mode 100644 index 00000000..8e5b658a --- /dev/null +++ b/src/api-models/uploads-api-model/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Uploads + * The Selling Partner API for Uploads provides operations that support uploading files. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/api-models/uploads-api-model/git_push.sh b/src/api-models/uploads-api-model/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/src/api-models/uploads-api-model/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api-models/uploads-api-model/index.ts b/src/api-models/uploads-api-model/index.ts new file mode 100644 index 00000000..5433ee02 --- /dev/null +++ b/src/api-models/uploads-api-model/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Selling Partner API for Uploads + * The Selling Partner API for Uploads provides operations that support uploading files. + * + * The version of the OpenAPI document: 2020-11-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; +