Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix: api-extractor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
justinemmanuelmercado committed Jul 7, 2020
1 parent 6710542 commit 85780de
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export * from './sections/finances/finances'
export * from './sections/finances/codec'
export * from './sections/fulfillment-inventory'
export * from './sections/merchant-fulfillment/merchant-fulfillment'
export * from './sections/merchant-fulfillment/type'
export * from './sections/merchant-fulfillment/codec'
export * from './sections/subscriptions'
export * from './sections/orders'
export * from './sections/products/products'
Expand Down
32 changes: 16 additions & 16 deletions src/sections/merchant-fulfillment/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const TemporarilyUnavailableCarrier = Codec.interface({
CarrierName: string,
})

export const CurrencyAmount = Codec.interface({
const CurrencyAmount = Codec.interface({
CurrencyCode: string,
Amount: number,
})
Expand All @@ -20,7 +20,7 @@ export const RejectedShippingService = Codec.interface({
ShippingServiceName: string,
})

enum DeliveryExperienceEnum {
export enum DeliveryExperienceEnum {
DeliveryConfirmationWithAdultSignature = 'DeliveryConfirmationWithAdultSignature',
DeliveryConfirmationWithSignature = 'DeliveryConfirmationWithSignature',
DeliveryConfirmationWithoutSignature = 'DeliveryConfirmationWithoutSignature',
Expand All @@ -29,9 +29,9 @@ enum DeliveryExperienceEnum {
DELIVERY_CONFIRMATION = 'DELIVERY_CONFIRMATION',
}

export const DeliveryExperience = enumeration(DeliveryExperienceEnum)
const DeliveryExperience = enumeration(DeliveryExperienceEnum)

export const ShippingServiceOptions = Codec.interface({
const ShippingServiceOptions = Codec.interface({
DeliveryExperience,
DeclaredValue: optional(CurrencyAmount),
CarrierWillPickUp: boolean,
Expand Down Expand Up @@ -73,7 +73,7 @@ export const GetEligibleShippingServicesResponse = Codec.interface({
}),
})

enum DataTypeEnum {
export enum DataTypeEnum {
String = 'String',
Boolean = 'Boolean',
Integer = 'Integer',
Expand All @@ -99,14 +99,14 @@ export const Constraints = Codec.interface({
ValidationString: string,
})

enum InputTargetEnum {
export enum InputTargetEnum {
ITEM_LEVEL = 'ITEM_LEVEL',
SHIPMENT_LEVEL = 'SHIPMENT_LEVEL',
}

export const InputTarget = enumeration(InputTargetEnum)

export const Address = Codec.interface({
const Address = Codec.interface({
Name: string,
AddressLine1: string,
AddressLine2: optional(string),
Expand All @@ -120,21 +120,21 @@ export const Address = Codec.interface({
Phone: ensureString,
})

export const Weight = Codec.interface({
const Weight = Codec.interface({
Value: number,
Unit: string,
})

export const PredefinedPackageDimensions = enumeration(PredefinedPackageDimensionsEnum)
const PredefinedPackageDimensions = enumeration(PredefinedPackageDimensionsEnum)

enum DimensionsUnitEnum {
export enum DimensionsUnitEnum {
inches = 'inches',
centimeters = 'centimeters',
}

export const DimensionsUnit = enumeration(DimensionsUnitEnum)

export const PackageDimensions = Codec.interface({
const PackageDimensions = Codec.interface({
Length: optional(number),
Width: optional(number),
Height: optional(number),
Expand Down Expand Up @@ -165,7 +165,7 @@ export const SellerInputDefinition = Codec.interface({
RestrictedSetValues: optional(ensureArray('member', string)),
})

enum AdditionalInputFieldNameEnum {
export enum AdditionalInputFieldNameEnum {
NON_DELIVERABLE_INSTRUCTIONS = 'NON_DELIVERABLE_INSTRUCTIONS',
SENDER_ADDRESS_TRANSLATED = 'SENDER_ADDRESS_TRANSLATED',
}
Expand Down Expand Up @@ -199,7 +199,7 @@ export const GetAdditionalSellerInputsResponse = Codec.interface({
}),
})

enum StatusEnum {
export enum MerchantFulfillmentStatusEnum {
Purchase = 'Purchased',
RefundPending = 'RefundPending',
RefundRejected = 'RefundRejected',
Expand All @@ -218,7 +218,7 @@ const ItemLevelSellerInputsList = Codec.interface({
ValueAsCurrency: optional(CurrencyAmount),
})

const Status = enumeration(StatusEnum)
const Status = enumeration(MerchantFulfillmentStatusEnum)
const Item = Codec.interface({
OrderItemId: ensureString,
Quantity: number,
Expand Down Expand Up @@ -278,7 +278,7 @@ export const CreateShipmentResponse = Codec.interface({
}),
})

const GetShipment = Codec.interface({
export const GetShipment = Codec.interface({
Shipment,
})

Expand All @@ -290,7 +290,7 @@ export const GetShipmentResponse = Codec.interface({
}),
})

const CancelShipment = Codec.interface({
export const CancelShipment = Codec.interface({
Shipment,
})

Expand Down
12 changes: 6 additions & 6 deletions src/sections/merchant-fulfillment/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface CanonicalizedAddtionalSellerInput {
export interface CanonicalizedAddtionalSellerInput {
ValueAsString?: string
ValueAsBoolean?: boolean
ValueAsInteger?: number
Expand All @@ -19,7 +19,7 @@ interface CanonicalizedAddtionalSellerInput {
| string
| undefined
}
interface CanonicalizedSellerInputs {
export interface CanonicalizedSellerInputs {
AdditionalInputFieldName: string
AdditionalSellerInput: CanonicalizedAddtionalSellerInput
[key: string]: string | CanonicalizedAddtionalSellerInput
Expand Down Expand Up @@ -59,7 +59,7 @@ export const canonicalizeAdditionalSellerInputs = (
})
}

interface CanonicalizedItem {
export interface CanonicalizedItem {
OrderItemId: string
Quantity: number
ItemWeight?: Weight
Expand All @@ -69,7 +69,7 @@ interface CanonicalizedItem {
[key: string]: string | number | Weight | string[] | CanonicalizedSellerInputs[] | undefined
}

interface CanonicalizedShipmentRequestDetails {
export interface CanonicalizedShipmentRequestDetails {
AmazonOrderId: string
SellerOrderId?: string
'ItemList.Item': CanonicalizedItem[]
Expand Down Expand Up @@ -258,7 +258,7 @@ export interface AdditionalSellerInput {
ValueAsCurrency?: CurrencyAmount
[key: string]: undefined | string | boolean | number | object
}
interface AdditionalSellerInputs {
export interface AdditionalSellerInputs {
AdditionalInputFieldName: string
AdditionalSellerInput: AdditionalSellerInput
[key: string]: string | AdditionalSellerInput
Expand Down Expand Up @@ -356,7 +356,7 @@ export interface CreateShipmentParameters {
ShipmentLevelSellerInputsList?: AdditionalSellerInputs[]
}

interface CanonicalizedCreateShipmentParameters {
export interface CanonicalizedCreateShipmentParameters {
ShipmentRequestDetails: CanonicalizedShipmentRequestDetails
ShippingServiceId: string
ShippingServiceOfferId?: string
Expand Down

0 comments on commit 85780de

Please sign in to comment.