diff --git a/src/types/CommunicationEvent.ts b/src/types/CommunicationEvent.ts new file mode 100644 index 0000000..24c4069 --- /dev/null +++ b/src/types/CommunicationEvent.ts @@ -0,0 +1,24 @@ +export interface CommunicationEvent { + communicationEventId: string, + communicationEventTypeId?: string, + contactMechTypeEnumId?: string, + statusId?: string, + parentCommEventId?: string, + rootCommEventId?: string, + fromContactMechId?: string, + toContactMechId?: string, + fromPartyId?: string, + fromRoleTypeId?: string, + toPartyId?: string, + toRoleTypeId?: string, + entryDate?: string, + datetimeStarted?: string, + datetimeEnded?: string, + subject?: string, + contentType?: string, + body?: string, + note?: string, + reasonEnumId?: string, + contactListId?: string, + emailMessageId?: string +} \ No newline at end of file diff --git a/src/types/ContactMech.ts b/src/types/ContactMech.ts new file mode 100644 index 0000000..5219ed7 --- /dev/null +++ b/src/types/ContactMech.ts @@ -0,0 +1,51 @@ +import { Geo } from "./index" + +export interface ContactMech { + contactMechId: string, + contactMechTypeEnumId?: string, + dataSourceId?: string, + infoString?: string, + gatewayCimId?: string, + trustLevelEnumId?: string, + validateMessage?: string, + paymentFraudEvidenceId?: string, + replacesContactMechId?: string, + telecomNumber?: { + contactMechId: string, + countryCode?: string, + areaCode?: string, + contactNumber?: string, + askForName?: string, + }, + postalAddress?: { + contactMechId: string, + toName?: string, + attnName?: string, + address1?: string, + address2?: string, + unitNumber?: string, + directions?: string, + city?: string, + cityGeoId?: string, + schoolDistrictGeoId?: string, + countyGeoId?: string, + stateProvinceGeoId?: string, + countryGeoId?: string, + postalCode?: string, + postalCodeExt?: string, + postalCodeGeoId?: string, + geoPointId?: string, + commercial?: string, + accessCode?: string, + telecomContactMechId?: string, + emailContactMechId?: string, + shipGatewayAddressId?: string, + cityGeo?: Geo, + countyGeo?: Geo, + stateProvinceGeo?: Geo, + postalCodeGeo?: Geo, + countryGeo?: Geo, + telecomContactMech?: string, + emailContactMech?: string + } +} \ No newline at end of file diff --git a/src/types/Enumeration.ts b/src/types/Enumeration.ts new file mode 100644 index 0000000..7d7976c --- /dev/null +++ b/src/types/Enumeration.ts @@ -0,0 +1,13 @@ +export interface Enumeration { + enumId: string, + enumTypeId?: string, + parentEnumId?: string, + enumCode?: string, + sequenceNum?: number, + description?: string, + optionValue?: string, + optionIndicator?: string, + relatedEnumId?: string, + relatedEnumTypeId?: string, + statusFlowId?: string, +} \ No newline at end of file diff --git a/src/types/Geo.ts b/src/types/Geo.ts new file mode 100644 index 0000000..8d359ac --- /dev/null +++ b/src/types/Geo.ts @@ -0,0 +1,10 @@ +export interface Geo { + geoId: string, + geoTypeEnumId?: string, + geoName?: string, + geoNameLocal?: string, + geoCodeAlpha2?: string, + geoCodeAlpha3?: string, + geoCodeNumeric?: string, + wellKnownText?: string, +} \ No newline at end of file diff --git a/src/types/Order.ts b/src/types/Order.ts new file mode 100644 index 0000000..09fc850 --- /dev/null +++ b/src/types/Order.ts @@ -0,0 +1,339 @@ +import { ContactMech, Enumeration, Party, Status, Uom } from "./index" + +export interface Order { + orderId: string, + orderName?: string, + entryDate?: string, + placedDate?: string, + approvedDate?: string, + completedDate?: string, + statusId?: string, + processingStatusId?: string, + orderRevision?: number, + currencyUomId?: string, + billingAccountId?: string, + productStoreId?: string, + salesChannelEnumId?: string, + externalId?: string, + externalRevision?: string, + originId?: string, + originUrl?: string, + syncStatusId?: string, + systemMessageRemoteId?: string, + enteredByPartyId?: string, + parentOrderId?: string, + lastOrderedDate?: string, + recurAutoInvoice?: string, + remainingSubTotal?: number, + grandTotal?: number, + status?: Status, + currencyUom?: Uom, + salesChannel?: Enumeration, + parts?: Array, + communicationEvents?: Array<{ + orderId: string, + communicationEventId: string + }> +} + + +export interface OrderItem { + orderId: string, + orderItemSeqId: string, + orderPartSeqId?: string, + parentItemSeqId?: string, + itemTypeEnumId?: string, + productId?: string, + productFeatureId?: string, + otherPartyProductId?: string, + productParameterSetId?: string, + itemDescription?: string, + comments?: string, + quantity?: number, + quantityUomId?: string, + quantityCancelled?: number, + selectedAmount?: number, + priority?: number, + requiredByDate?: string, + unitAmount?: number, + unitListPrice?: number, + isModifiedPrice?: string, + standardCost?: number, + externalItemSeqId?: string, + fromAssetId?: string, + productPriceId?: string, + productCategoryId?: string, + isPromo?: string, + promoQuantity?: number, + promoTimesUsed?: number, + storePromotionId?: string, + promoCodeId?: string, + promoCodeText?: string, + subscriptionId?: string, + finAccountId?: string, + finAccountTransId?: string, + overrideGlAccountId?: string, + salesOpportunityId?: string, + sourceReferenceId?: string, + sourcePercentage?: number, + amountAlreadyIncluded?: number, + exemptAmount?: number, + customerReferenceId?: string, + taxAuthorityId?: string, + itemType?: Enumeration, + product?: { + productId: string, + pseudoId?: string, + productTypeEnumId?: string, + productClassEnumId?: string, + assetTypeEnumId?: string, + assetClassEnumId?: string, + statusId?: string, + ownerPartyId?: string, + productName?: string, + description?: string, + comments?: string, + salesIntroductionDate?: string, + salesDiscontinuationDate?: string, + salesDiscWhenNotAvail?: string, + supportDiscontinuationDate?: string, + requireInventory?: string, + chargeShipping?: string, + signatureRequiredEnumId?: string, + shippingInsuranceReqd?: string, + inShippingBox?: string, + defaultShipmentBoxTypeId?: string, + taxable?: string, + taxCode?: string, + returnable?: string, + amountUomId?: string, + amountFixed?: number, + amountRequire?: string, + originGeoId?: string, + }, + quantityUom?: Uom, + reservations?: Array<{ + assetReservationId: string, + assetId?: string, + productId?: string, + orderId?: string, + orderItemSeqId?: string, + reservationOrderEnumId?: string, + quantity?: number, + quantityNotAvailable?: number, + quantityNotIssued?: number, + reservedDate?: string, + originalPromisedDate?: string, + currentPromisedDate?: string, + priority?: number, + sequenceNum?: number, + }>, + issuances?: Array<{ + assetIssuanceId: string, + assetId?: string, + assetReservationId?: string, + orderId?: string, + orderItemSeqId?: string, + shipmentId?: string, + shipmentItemSourceId?: string, + productId?: string, + invoiceId?: string, + invoiceItemSeqId?: string, + returnId?: string, + returnItemSeqId?: string, + workEffortId?: string, + facilityId?: string, + assetMaintenanceId?: string, + issuedByUserId?: string, + issuedDate?: string, + quantity?: number, + quantityCancelled?: number, + acctgTransResultEnumId?: string + }>, + receipts?: Array<{ + assetReceiptId: string, + assetId?: string, + productId?: string, + orderId?: string, + orderItemSeqId?: string, + shipmentId?: string, + shipmentItemSourceId?: string, + shipmentPackageSeqId?: string, + invoiceId?: string, + invoiceItemSeqId?: string, + returnId?: string, + returnItemSeqId?: string, + workEffortId?: string, + receivedByUserId?: string, + receivedDate?: string, + itemDescription?: string, + quantityAccepted?: number, + quantityRejected?: number, + rejectionReasonEnumId?: string, + acctgTransResultEnumId?: string + }>, + shipmentSources?: Array<{ + shipmentItemSourceId: string, + shipmentId?: string, + productId?: string, + binLocationNumber?: number, + orderId?: string, + orderItemSeqId?: string, + returnId?: string, + returnItemSeqId?: string, + statusId?: string, + quantity?: number, + quantityNotHandled?: number, + quantityPicked?: number, + invoiceId?: string, + invoiceItemSeqId?: string + }>, + billings?: Array<{ + orderItemBillingId: string, + orderId?: string, + orderItemSeqId?: string, + invoiceId?: string, + invoiceItemSeqId?: string, + assetIssuanceId?: string, + assetReceiptId?: string, + shipmentId?: string, + quantity?: number, + amount?: number + }> +} + +export interface OrderPart { + orderId: string, + orderPartSeqId: string, + parentPartSeqId?: string, + partName?: string, + statusId?: string, + vendorPartyId?: string, + customerPartyId?: string, + otherPartyOrderId?: string, + otherPartyOrderDate?: string, + facilityId?: string, + carrierPartyId?: string, + shipmentMethodEnumId?: string, + postalContactMechId?: string, + telecomContactMechId?: string, + trackingNumber?: string, + shippingInstructions?: string, + maySplit?: string, + signatureRequiredEnumId?: string, + giftMessage?: string, + isGift?: string, + isNewCustomer?: string, + partTotal?: number, + priority?: number, + shipAfterDate?: string, + shipBeforeDate?: string, + estimatedShipDate?: string, + estimatedDeliveryDate?: string, + estimatedPickUpDate?: string, + validFromDate?: string, + validThruDate?: string, + autoCancelDate?: string, + dontCancelSetDate?: string, + dontCancelSetUserId?: string, + disablePromotions?: string, + disableShippingCalc?: string, + disableTaxCalc?: string, + reservationAutoEnumId?: string, + status?: Status, + items?: Array, + parties?: Array<{ + orderId: string, + orderPartSeqId: string, + partyId: string, + roleTypeId: string, + sequenceNum?: number, + party?: Party, + roleType?: { + roleTypeId: string, + parentTypeId?: string, + description?: string + } + }>, + contactMechs?: Array<{ + orderId: string, + orderPartSeqId: string, + contactMechPurposeId: string, + contactMechId: string, + contactMech?: ContactMech + }>, + vendor?: Party, + customer?: Party, + carrier?: Party, + shipmentMethod?: Enumeration, + postal?: ContactMech, + telecom?: ContactMech, + facility?: { + facilityId: string, + pseudoId?: string, + facilityTypeEnumId?: string, + parentFacilityId?: string, + statusId?: string, + ownerPartyId?: string, + facilityName?: string, + facilitySize?: number, + facilitySizeUomId?: string, + openedDate?: string, + closedDate?: string, + description?: string, + geoId?: string, + geoPointId?: string, + countyGeoId?: string, + stateGeoId?: string, + assetAllowOtherOwner?: string, + assetAllowIssueOverQoh?: string, + assetInventoryLocRequire?: string, + defaultDaysToShip?: number, + externalId?: string, + originId?: string, + }, + payments?: Array<{ + paymentId: string, + paymentTypeEnumId?: string, + fromPartyId?: string, + toPartyId?: string, + paymentInstrumentEnumId?: string, + paymentMethodId?: string, + toPaymentMethodId?: string, + paymentGatewayConfigId?: string, + orderId?: string, + orderPartSeqId?: string, + orderItemSeqId?: string, + statusId?: string, + effectiveDate?: string, + settlementDate?: string, + dueDate?: string, + paymentAuthCode?: string, + paymentRefNum?: string, + comments?: string, + memo?: string, + distGroupEnumId?: string, + amount?: number, + amountUomId?: string, + appliedTotal?: number, + unappliedTotal?: number, + forInvoiceId?: string, + refundForPaymentId?: string, + finAccountId?: string, + finAccountAuthId?: string, + finAccountTransId?: string, + overrideGlAccountId?: string, + overrideOrgPartyId?: string, + partyRelationshipId?: string, + timePeriodId?: string, + originalCurrencyAmount?: number, + originalCurrencyUomId?: string, + presentFlag?: string, + swipedFlag?: string, + processAttempt?: number, + needsNsfRetry?: string, + acctgTransResultEnumId?: string, + reconcileStatusId?: string, + paymentMethodFileId?: string, + }> +} diff --git a/src/types/Party.ts b/src/types/Party.ts new file mode 100644 index 0000000..da6a444 --- /dev/null +++ b/src/types/Party.ts @@ -0,0 +1,61 @@ +import { ContactMech, Enumeration } from "./index" + +export interface Party { + partyId: string, + pseudoId?: string, + partyTypeEnumId?: string, + disabled?: string, + customerStatusId?: string, + ownerPartyId?: string, + externalId?: string, + dataSourceId?: string, + gatewayCimId?: string, + comments?: string, + shippingInstructions?: string, + hasDuplicates?: string, + lastDupCheckDate?: string, + mergedToPartyId?: string, + type?: Enumeration, + organization?: { + partyId: string, + organizationName?: string, + }, + person?: { + partyId: string, + firstName?: string, + middleName?: string, + lastName?: string, + }, + identifications?: Array, + contactMechs?: Array<{ + partyId: string, + contactMechId: string, + contactMechPurposeId: string, + fromDate: string, + thruDate?: string, + extension?: string, + comments?: string, + allowSolicitation?: string, + usedSince?: string, + usedUntil?: string, + verifyCode?: string, + verifyCodeDate?: string, + verifyCodeAttempts?: number, + contactMech?: ContactMech, + purpose?: { + contactMechPurposeId: string, + contactMechTypeEnumId?: string, + description?: string + } + }> +} + +export interface PartyIdentification { + partyId: string, + partyIdTypeEnumId: string, + idValue?: string, + issuedBy?: string, + issuedByPartyId?: string, + expireDate?: string, + type?: Enumeration +} diff --git a/src/types/Status.ts b/src/types/Status.ts new file mode 100644 index 0000000..99f2d22 --- /dev/null +++ b/src/types/Status.ts @@ -0,0 +1,6 @@ +export interface Status { + statusId: string; + statusTypeId?: string; + statusCode?: string; + description?: string; +} \ No newline at end of file diff --git a/src/types/Uom.ts b/src/types/Uom.ts new file mode 100644 index 0000000..671ff5d --- /dev/null +++ b/src/types/Uom.ts @@ -0,0 +1,6 @@ +export interface Uom { + uomId: string, + uomTypeEnumId?: string, + abbreviation?: string, + description?: string +} \ No newline at end of file diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..2f8181b --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,22 @@ +import { CommunicationEvent } from "./CommunicationEvent"; +import { ContactMech } from "./ContactMech"; +import { Enumeration } from "./Enumeration"; +import { Geo } from "./Geo"; +import { Order, OrderItem, OrderPart } from "./Order"; +import { Party, PartyIdentification } from "./Party"; +import { Status } from "./Status"; +import { Uom } from "./Uom"; + +export { + CommunicationEvent, + ContactMech, + Enumeration, + Geo, + PartyIdentification, + Order, + OrderItem, + OrderPart, + Party, + Status, + Uom +} \ No newline at end of file